Skip to content
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

error :: ✖ [nvidia] Unexpected token < in JSON at position 0 #359

Closed
poly-mathic opened this issue Sep 28, 2020 · 7 comments
Closed

error :: ✖ [nvidia] Unexpected token < in JSON at position 0 #359

poly-mathic opened this issue Sep 28, 2020 · 7 comments
Assignees

Comments

@poly-mathic
Copy link

Description

After running successfully for about a minute [nvidia] starts throwing an error that says unexpected token < in JSON at position 0
It still seems to succeed at checking every so often but it is throwing more errors than successes. Any suggestions? I'm not a programmer.
Screenshot 2020-09-28 093113

Here is my .env, made minimal changes:
OS: Windows

BROWSER_TRUSTED=""
DESKTOP_NOTIFICATIONS="true"
DISCORD_NOTIFY_GROUP=""
DISCORD_WEB_HOOK=""
EMAIL_USERNAME=""
EMAIL_TO=""
EMAIL_PASSWORD=""
HEADLESS=""
IN_STOCK_WAIT_TIME=""
LOG_LEVEL=""
LOW_BANDWIDTH=""
MICROCENTER_LOCATION=""
NVIDIA_ADD_TO_CART_ATTEMPTS=""
NVIDIA_SESSION_TTL=""
OPEN_BROWSER="true"
PAGE_TIMEOUT=""
PHONE_NUMBER=""
PHONE_CARRIER=""
PLAY_SOUND="got-it-done.mp3"
PUSHBULLET=""
PUSHOVER_TOKEN=""
PUSHOVER_USER=""
PUSHOVER_PRIORITY=""
PAGE_BACKOFF_MIN=""
PAGE_BACKOFF_MAX=""
PAGE_SLEEP_MIN=""
PAGE_SLEEP_MAX=""
SHOW_ONLY_BRANDS=""
SHOW_ONLY_MODELS="founders edition"
SHOW_ONLY_SERIES="3080"
SLACK_CHANNEL=""
SLACK_TOKEN=""
STORES="nvidia-api,nvidia,bestbuy"
COUNTRY=""
SCREENSHOT="false"
TELEGRAM_ACCESS_TOKEN=""
TELEGRAM_CHAT_ID=""
TWITTER_CONSUMER_KEY=""
TWITTER_CONSUMER_SECRET=""
TWITTER_ACCESS_TOKEN_KEY=""
TWITTER_ACCESS_TOKEN_SECRET=""
TWITTER_TWEET_TAGS=""
USER_AGENT=""

@poly-mathic
Copy link
Author

Never mind, as of now i'm no longer seeing this so I'll close. I'd like to know that happened though if anyone can explain.

@JeffyW
Copy link

JeffyW commented Sep 28, 2020

I'm seeing this come and go. If I stop and restart it goes away for some period of time but has been coming back. It seems like this is occurring due to the call to "Refresh session token":

image

@poly-mathic
Copy link
Author

Yeah its still happening for me as well, restarting fixes it for a moment

@poly-mathic poly-mathic reopened this Sep 28, 2020
@JeffyW
Copy link

JeffyW commented Sep 28, 2020

It seems to only be occurring for nvidia-api, not plain nvidia as a store.

I think it's related to #347

@andrewmackrodt
Copy link
Contributor

It seems to only be occurring for nvidia-api, not plain nvidia as a store.

I think it's related to #347

Thanks, having a look at it now.

@xninjax
Copy link
Contributor

xninjax commented Sep 28, 2020

I just opened issue #363 (comment)

I think this may be the cause - with no value in .env supplied, it appears the token refresh is rapid, and not taking the 60000ms default. Nvidia I don't think is liking the rapid pinging behaviour and starts providing erroneous returns.

By setting these values in .env, I have been able to stop the rapid pinging. Now testing to see if Nvida stops throwing the erroneous replies.

`NVIDIA_ADD_TO_CART_ATTEMPTS="10"

NVIDIA_SESSION_TTL="60000"`

@andrewmackrodt
Copy link
Contributor

Should be fixed in #364, thanks @xninjax for tracking down the source of the error!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants