Skip to content
This repository was archived by the owner on Jun 24, 2024. It is now read-only.

Error: Invalid request. The number of bytes uploaded is required to be equal or greater than 262144... #17

Closed
7amim opened this issue Oct 18, 2016 · 3 comments
Assignees
Labels
api: storage Issues related to the googleapis/gcs-resumable-upload API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@7amim
Copy link

7amim commented Oct 18, 2016

Error: Invalid request. The number of bytes uploaded is required to be equal or greater than 262144, except for the final request (it's recommended to be the exact multiple of 262144). The received request contained 16384 bytes, which does not meet this requirement.

(See here for the error trace: http://pastebin.com/PhukYCUq)

I'm trying to resumably upload a couple of videos to my google cloud storage bucket. So far I've tested the resumable upload code from this package with three videos. The first video is ~16 MB, the second ~15 MB, and the final, ~150 MB. The error above occurs for the first video, and a similar error occurs for the second video, except that instead of saying the request is 16384 Bytes, the request is apparently 81920 Bytes. The error does not occur for the third video file, presumably because it passes the threshold.

I'm not sure why this error is occurring, and while I did see the solution posted here: googleapis/google-cloud-node#1044, I can't find the files that were deleted to fix the code functionality. I am assuming this issue was fixed for the current version of the package.

My upload code is almost identical to what is shown in the readme for this package, except that I included the external code for automatic authentication (which is also almost identical).

I thought it might be useful to post this error for the benefit of everyone. Any help would be much appreciated!

@stephenplusplus
Copy link
Contributor

Thanks for reporting! So there isn't a file that exists at:

~/.config/configstore/gcs-resumable-upload.json

Also, if you're on a machine with $XDG_CONFIG_HOME, that will be honored as the location where the config file gets stored. All the possible paths are here: https://github.com/yeoman/configstore/blob/master/index.js

Let me know if you still can't find the config file, or are able to remove it, and the error still happens.

@7amim
Copy link
Author

7amim commented Oct 19, 2016

Thanks so much Stephen! Your solution worked out successfully for the videos that weren't working before. I was finally able to find where the file was and delete it. Your help is much appreciated.

@stephenplusplus
Copy link
Contributor

Phew! I'm glad it worked out. Feel free to chat with any problems at any time!

@google-cloud-label-sync google-cloud-label-sync bot added the api: storage Issues related to the googleapis/gcs-resumable-upload API. label Jan 31, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: storage Issues related to the googleapis/gcs-resumable-upload API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants