(node:133220) UnhandledPromiseRejectionWarning: Error: [object Object] at Gaxios.<anonymous> …at Generator.next (<anonymous>)
See original GitHub issueEnvironment details
- OS: Windows 10
- Node.js version: v10.14.1
- npm version: 6.4.1
googleapis
version: 38
Steps to reproduce
- node .\download.js 1Z9c119EzgR4Dd5Woi-C34Xl6Qu_87FugdlwwYRJhzlE
This code produces following error:
writing to C:\Users\ASHOT_~1\AppData\Local\Temp\a9b522b9-0582-4dc3-b73c-0b9593892ff3
(node:143084) UnhandledPromiseRejectionWarning: Error: [object Object]
at Gaxios.<anonymous> (C:\Users\Ashot_Minasyan\Downloads\google-api-nodejs-client-master\google-api-nodejs-client-master\node_modules\gaxios\build\src\gaxios.js:72:27)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Ashot_Minasyan\Downloads\google-api-nodejs-client-master\google-api-nodejs-client-master\node_modules\gaxios\build\src\gaxios.js:16:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:143084) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without
a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:143084) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
UnhandledPromiseRejectionWar...
UnhandledPromiseRejectionWarning : Error: Not Found at Gaxios.<anonymous> when trying to add event to Google Calendar.
Read more >Async Generators and Async Iteration in Node.js
An object implements the the iterator protocol when it has a next method, and that next method returns an object with a value...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 But for me issue turned out to be an insufficient permissions.
I was using the token.json file which got saved before all the needed scopes were defined. I initially had only below two scopes,
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.
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!