nodejs-storage
nodejs-storage copied to clipboard
ERR_MULTIPLE_CALLBACK on file.download()
-
Is this a client library issue or a product issue? yes
-
Did someone already solve this?
- Search the issues already opened: https://github.com/googleapis/nodejs-storage/issues
- Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node
- Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js no
- Do you have a support contract? no
If the support paths suggested above still do not result in a resolution, please provide the following details.
Environment details
- OS: Win10 21H2
- Node.js version: 16.13.2
- npm version: 8.1.2
@google-cloud/storageversion: 6.5.2
Steps to reproduce
Try to download a file:
try {
await file.download({
destination: destination
})
} catch(e) {
console.log(e);
}
As the result catching error ERR_MULTIPLE_CALLBACK
Hi @Aliaksandr-Kasko-JazzTeam thank you for opening an issue. Can you provide us with a bit more information, how often are you seeing this error? Was the code you provided previously working in a different version of the library? Do other operations (i.e. upload) work correctly?
Hi, @ddelgrosso1.
- I see this error every time with this mentioned version of library.
- The code was working with previous versions of library (now I tried with 6.5.0).
- I can't try other operations like upload because our project is very complex (first we download a file, then we make computations, at last we upload another computed file).
@Aliaksandr-Kasko-JazzTeam by chance have you tried the above on a platform other than Windows, if so what was the result? Is there anything special or different about destination argument? Could you provide a more detailed stack trace? Have you also recently changed versions of Node, if so from what version to 16.13.2.
I tried this in both a Linux and Mac environment with v6.5.2 and was unable to recreate the error you are seeing.
I also tested this in a Windows 10 environment but did not see the issue. @Aliaksandr-Kasko-JazzTeam if you can provide the information from my previous comment I will investigate further.
Don't know if it helps, but getting the same problem on macOS Monterey version 12.6, node version 14.17.6, @google-cloud/storage version 6.5.4. Fixed by switching on node version 16.18.0 (LTS)
Thanks @amerej we believe we have found the cause of this issue and we will be releasing a fix shortly.
@ddelgrosso1 sorry for my long response and big thanks for fix. Now it works for me
Thanks for letting me know @Aliaksandr-Kasko-JazzTeam. Glad this resolved your issue.