Closed oprudkyi closed 8 months ago
Hi @oprudkyi, I cannot reproduce this issue on my end. I can ensure that I am calling resume()
but my uploads resume and go without any pain.
It seems rangeStart
is getting its value from a PUT
call to the resume URI so can't really do much on the library unless I validate that getStatusResponse
can generate a response without (or a null) Range
header. If this issue persists maybe you can instrument the library (maybe print the resumeUri
, Content-Range
passed in getStatusResponse
and the value of Range
header returned).
However, I do see a guidance where HTTP PUT's Content-Range
header should have total bytes rather than a */*
, so I am updating that.
Hi @vishwarajanand
it is very transient issue. I have seen it two times only on project with thousands uploads per day
it might be that it is only the case when something broken on api side , i.e. no header at all by example
Environment details
PHP Notice: TypeError: GuzzleHttp\Psr7\LimitStream::__construct(): Argument #3 ($offset) must be of type int, null given, called in /var/www/vendor/google/cloud-core/src/Upload/ResumableUploader.php on line 158 and defined in /var/www/vendor/guzzlehttp/psr7/src/LimitStream.php:32 Stack trace:
0 /var/www/vendor/google/cloud-core/src/Upload/ResumableUploader.php(158): GuzzleHttp\Psr7\LimitStream->__construct(Object(GuzzleHttp\Psr7\Stream), -1, NULL)
1 /var/www/vendor/google/cloud-core/src/Upload/ResumableUploader.php(138): Google\Cloud\Core\Upload\ResumableUploader->upload()
2 /var/www/app/Services/upload.php(1): Google\Cloud\Core\Upload\ResumableUploader->resume('https://storage.googleapis.com/upload/storage/v1/b/bucket/o?uploadType=resumable&...')
$this->rangeStart = $this->getRangeStart($response->getHeaderLine('Range'));