onokje / node-red-contrib-tesla

Node red nodes to control Tesla vehicles and devices
MIT License
20 stars 11 forks source link

UnhandledPromiseRejectionWarning - Getting new token error #47

Open TomNijsen opened 2 years ago

TomNijsen commented 2 years ago

Since a week or two, I'm not able to authenticate anymore... I regenerated V3 access tokens on Teslafi to make sure tokens are correct. I used the 'Tesla API Access Token' although the node config states 'Refresh token' (incorrectly?). But even with the 'Refresh Token' from Teslafi I get the same result, so I'm assuming it has nothing to do with my tokens...

This is what I see in the NodeRed log file, hopefully some experts can point me or the developer in the right direction of a solution?

Tesla API: No token found. Getting new token now... Tesla API: doing api call to fetch new access token (node:12971) UnhandledPromiseRejectionWarning: Error at getNewTokenFromApi (/home/pi/.node-red/node_modules/node-red-contrib-tesla/src/tesla.js:35:19) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async /home/pi/.node-red/node_modules/node-red-contrib-tesla/src/tesla.js:282:31 (node:12971) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9) (node:12971) [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.