-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
(node:133220) UnhandledPromiseRejectionWarning: Error: [object Object] at Gaxios.<anonymous> …at Generator.next (<anonymous>) #1651
Comments
Greetings! Can you share the code you're using? |
I just have run https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/drive/download.js script |
This actually worked with another file (normal pdf). The file which cause this error is template. Looks like it needs additional treating. |
Thanks! Can you share the type of file you're downloading? |
@aminasya 👋 are you still bumping into issues? what was the extension of the file you were attempting to download. |
The file that I tried do download was google template document. In order to download it the type should be specified. I managed to do it using api.epxort method specifying 'application/pdf' as type. |
@aminasya (CC: @aminasyaEpam are you the same person?), if I understand you are able to download templates as long as you specify the |
Greetings! We haven't seen any action on this issue for a while, so we're going to go ahead and close it out. If this is still a problem... please do let us know! |
I was just able to reproduce this bug and fix it as well. I was mistaken by thinking that the issue is having alt: 'media' under params of drive.files.get I was using the token.json file which got saved before all the needed scopes were defined.
But after adding all the required scopes (required for download) as below,
And deleted the old token.json file. This created a new token.json file, and then the download started working. |
Environment details
googleapis
version: 38Steps to reproduce
This code produces following error:
Running
quickstart.js
works ok so authentication is not a problem I think.Here is stackoverflow question https://stackoverflow.com/questions/55326387/node133220-unhandledpromiserejectionwarning-error-object-object-at-gaxios
The text was updated successfully, but these errors were encountered: