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

Created on 28 Sep 2020  Â·  7Comments  Â·  Source: jef/streetmerchant

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=""

Most helpful comment

I just opened issue https://github.com/jef/nvidia-snatcher/issues/363#issue-710457570

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"`

All 7 comments

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.

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

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

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

I think it's related to #347

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.

I just opened issue https://github.com/jef/nvidia-snatcher/issues/363#issue-710457570

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"`

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

louij2 picture louij2  Â·  3Comments

poly-mathic picture poly-mathic  Â·  5Comments

brybry77104 picture brybry77104  Â·  4Comments

dochodges picture dochodges  Â·  5Comments

AlphaOmega2020 picture AlphaOmega2020  Â·  4Comments