Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

YouTube API code all of a sudden returning an error

$
0
0

We have used the YouTube Data API for several years to upload videos to our channels, however as of yesterday I am now getting this error.

Call to undefined method Google\Service\YouTube\Video::getHeaderLine()

Our upload code hasn't changed in months, and we haven't deployed any new versions of our system in a while, so the vendor code in place is unchanged.

This is the code that calls the upload service (i didn't write this but am in the process of writing a new version so its possible this code is out of date with what it should be doing)

$media = new Google_Http_MediaFileUpload($client, $request, $mimeType, null, true, $chunkSizeBytes);$media->setFileSize(filesize($filePath));// Read the media file and upload it chunk by chunk.$status = false;$handle = fopen($filePath, "rb");while (!$status && !feof($handle)) {   $chunk = fread($handle, $chunkSizeBytes);   $status = $media->nextChunk($chunk);}fclose($handle);return $status;

This is a partial stack trace from the moment that the video upload process starts

Call to undefined method Google\Service\YouTube\Video::getHeaderLine(){"file":"/var/www/create.whatculture.com/release/20220602115951/vendor/google/apiclient/src/Http/MediaFileUpload.php","line":310,"code":0,"trace":[{"file":"/var/www/create.whatculture.com/release/20220602115951/vendor/google/apiclient/src/Http/MediaFileUpload.php","line":289,"function":"fetchResumeUri","class":"Google\\Http\\MediaFileUpload"},{"file":"/var/www/create.whatculture.com/release/20220602115951/vendor/google/apiclient/src/Http/MediaFileUpload.php","line":126,"function":"getResumeUri","class":"Google\\Http\\MediaFileUpload"},{"file":"/var/www/create.whatculture.com/release/20220602115951/modules/you_tube/src/Services/YouTube.php","line":93,"function":"nextChunk","class":"Google\\Http\\MediaFileUpload"},{"file":"/var/www/create.whatculture.com/release/20220602115951/modules/you_tube/src/Services/YouTube.php","line":573,"function":"uploadVideoFile","class":"YouTube\\Services\\YouTube"}

Any help would be appreciated


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>