Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Unhandled promise rejections #42

Closed
SkYNewZ opened this issue Mar 28, 2018 · 4 comments
Closed

Unhandled promise rejections #42

SkYNewZ opened this issue Mar 28, 2018 · 4 comments

Comments

@SkYNewZ
Copy link

SkYNewZ commented Mar 28, 2018

When my token is too used (when consecutively testing for example), I obtain this error but the process don't exit...
Can you test the valid access token before start using this ? https://github.com/qlaffont/fortnite-api/blob/master/index.js#L51

(node:17) 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:17) [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.```
@ItsCEED
Copy link

ItsCEED commented Mar 28, 2018

Simple solution for this is to add multi acc support by yourself, wont be that hard.

@SkYNewZ
Copy link
Author

SkYNewZ commented Mar 29, 2018

Sorry, can you explain "add multi acc support", i don't understand 😕

(node:15) UnhandledPromiseRejectionWarning: Please enter good token
(node:15) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing 

@qlaffont
Copy link
Owner

I will add the catch block no problem. But actually on stats-fortnite.com, I use only one account/session and it's work very well !

@SkYNewZ
Copy link
Author

SkYNewZ commented Mar 30, 2018

Yes i agree and understand. But because I testing my api, when I test consecutively, the login() method ask a new bearer token that create a new session on Epic Games servers.
So when this case arrived, even launching my epic games launcher in order to play, it's impossible because I if this this error : "too many session, please disconect". If you don't need to kill session, what do you think about provide a getToken() method ? I could kill my session (with the current access_token), at the end of my test and avoid "too many session" because in this case a will have one 1 session for the production env, 1 forthe developement env and "temporary" session for token

SkYNewZ added a commit to SkYNewZ/rest-fornite-api that referenced this issue Apr 3, 2018
* Change docker image for fixing this issue sass/node-sass#2031
* `clinet.connect()` only once
* Use one variable `DATABSE_CONNECTION_STING` instead of 5 other variables
* Use 3 different account to prevent [this type](qlaffont/fortnite-api#42) of error...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants