-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
state.buffer[0].length Cannot read properties of null (reading 'length') #2368
Comments
I am seeing the same problem. But for me it seems to be an issue with most versions, not just 7.6.0. I have tested all the way back to 6.12 and it is broken for me |
Has to do with this: Downgrade your node.js version to below 21.2 |
@unifractal can you confirm you were also using node 21.2+? |
Hi, I have the same problem. I cannot upload files larger than approximately 70KB. Does it work if I downgrade my Node.js version, or is it a library issue? |
Yes, i can confirm. I was also on node 21.2+ and downgrading to e.g. Node version LTS 18 fixed my problems. Definitely a problem caused when upgrading node. It just sucks when it happens automatically using e.g. Google Cloud run 😂 |
I was also having the same issue with NodeJS 21.2+ and downgrading to NodeJS 21.1+ fixed the issue. |
It doesn't work for me, even after downgrading Node.js to 21.1. I'm using Bun. Could it be an issue with Bun and this library? I posted a question; it's my first time using this library with Bun. My problem is when I want to download a file from my bucket |
For those having problems on Node 21.2 it appears the solution is to downgrade to get around the problem. Looking at the provided stack trace it appears to mainly be coming from Node internal libs / |
Ditto this. Downgrading to node v20.10 resolved fixed it. |
FYI I ran into this with current LTS of node (20.11.0). I worked around it by removing the |
I experienced the same issue with Node 20 although my error message was slightly different:
To work around I changed my code from: To: Like in this example downloadFileInChunksWithTransferManager.js |
stream-shift 1.0.2 works fine with node 20.11.0 |
Can confirm that 💯 we had to add an override to our package.json to enforce stream-shift 1.0.2. |
Can also confirm that setting stream-shift to 1.0.2 for all dependencies (used the overrides method) works with node 20.11.0 🎉 |
Those who might end up here whilst running a Google Cloud Function, theres a chance the underlying image of your cloud function has been updated and this bug has manifested itself! For the time being, you can add the following to your package.json to get around the issue the storage API is updated: JSON
Worth noting that stream-shift is a dependency of duplexify which appears unmaintained... |
Can also confirm this works in the package json to override to 1.0.2 using the overrides block above. Using the functions-framework to run the function locally doesn't cause the |
Thanks for the investigation! |
Had the problem with node v20.11, downgraded to v20.10 and the problem went away. Thank you. |
downgrading to 20.10 seems to work for now |
Environment details
@google-cloud/storage
version: 7.6.0Getting the following error when trying to download a file:
This only happens when I download the file from a certain project. If I copy the exact same config and code but initiate it within a script, it works
The text was updated successfully, but these errors were encountered: