-
Notifications
You must be signed in to change notification settings - Fork 219
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
"UnhandledPromiseRejectionWarning" in git bash #79
Comments
Same here: epardee@nhan7: ~$ nba-go game
|
Same deal here: njombwe@NJOMBWE-M-G1AS:~/Downloads/nba-go-master$ ./run.sh ██████╗ ██████╗ ██╗ █████╗ ██╗ ██╗ ██████╗ ██╗ ██████╗ ███████╗ ⠹ Loading Game Schedule(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): FetchError: request to https://stats.nba.com/stats/teaminfocommon?LeagueID=00&Season=2017-18&SeasonType=Regular%20Season&TeamID=1610612762 failed, reason: socket hang up macOS 10.14 |
stats.nba.com not coming back from the command line, if you paste that into a browser you'll notice it does return data. Might have to mess with the headers to trick nba.com into thinking its a desktop request |
This issue happens with me too. This is my error: |
Adding these headers worked for me too :
in the getHeaders() function of NbaStatsClient.js in the nba-stats-client package, probably need to let them know. |
Also having this issue, for me, occasionally it will just hang on
I'm using macOS High Sierra 10.13.4 17E202 x86_64 with iTerm2. @qorrect, I made the edit you recommended, but it didn't seem to work for me (although I'm not a regular npm user or node developer, so it's probably my lack of knowledge). I ran
I'm using |
@simonkeng this is how im building
|
Hi @qorrect, thanks so much for showing me the steps you took! I went through it and everything appeared to run properly, but mine is still hanging at Below is the edited code block I made in key: 'getHeaders',
value: function getHeaders() {
return { 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',
'referer': 'http://stats.nba.com/scores/', 'Connection': 'keep-alive', 'Accept-Language': 'en-US' };
} UPDATE:It worked! |
I'm having this problem as well. I'm trying to solve it with @qorrect's method, however it's failing at the npm install step, with the following message:
Any ideas what could be wrong? S UPDATE: |
This is actually unrelated to the problem, its a build issue with NPM, googling on it seems to have found https://stackoverflow.com/questions/21855035/ssl-error-cert-untrusted-while-using-npm-command |
Okay, so having successfully followed @qorrect's instructions, now I'm running into this error when running
I've run it twice and I'm getting the same message. |
You have an underlying SSL problem, Im guessing some sort of proxy - are you able to curl or wget that stats.nba.com url ? |
@qorrect, so I'm actually having intermittent success now. I would say 1/10 attempts is successful. When it's not working, this is the error I'm getting when I try to wget the url (it hasn't been working in the last little bit so don't know what it's doing when it does work):
Edit: I hope I'm not making a really obvious, newbie mistake here, but I am also running all of this through docker. Could that be what's contributing to the SSL problem? UPDATE
Argh nevermind, just tested it again and this was not the cause. I think my connection just synced to my tests. I'm puzzled at how erratically this problem seems to appear and disappear. |
When I ran
nba-go g
in a git bash tool on WIN10, the following error occurred:It seems that the
window-size
package is undefined.The error didn't come up when using other CLI tool, like PowerShell and VSCode.
I'm using:
The text was updated successfully, but these errors were encountered: