jef / streetmerchant

🤖 The world's easiest, most powerful stock checker
https://jef.buzz/streetmerchant
MIT License
4.97k stars 1.3k forks source link

All stores have Navigation timeout of 30,000ms #1520

Closed nmcc1212 closed 3 years ago

nmcc1212 commented 3 years ago

Expected Behavior

report instock or out of stock on command line

Current Behavior

All stores have error Navigation timeout of 30,000ms exceeded

Steps to Reproduce

  1. Followed (https://github.com/jef/streetmerchant/wiki/Installation:-Linux:-Raspberry-Pi-OS) and (https://jef.codes/streetmerchant/getting-started/)
  2. npm install
  3. Changed dotenv for use case 4.Errors

Environment

OS:

Raspberry Pi running Raspberry Pi OS

dotenv file:

# ** All configuration variables are optional **
# Copy this file and name it as `dotenv` (without backticks)
# Read https://jef.codes/streetmerchant/getting-started/#customization for help on customizing this file
########################################################################################################

ASCII_BANNER=
ASCII_COLOR=
AUTO_ADD_TO_CART=
BROWSER_TRUSTED=
COUNTRY=great_britain
DESKTOP_NOTIFICATIONS=
DISCORD_NOTIFY_GROUP=ps5-stock
DISCORD_NOTIFY_GROUP_3060TI=
DISCORD_NOTIFY_GROUP_3070=
DISCORD_NOTIFY_GROUP_3080=
DISCORD_NOTIFY_GROUP_3090=
DISCORD_NOTIFY_GROUP_CORSAIR_SF=
DISCORD_NOTIFY_GROUP_RX6800=
DISCORD_NOTIFY_GROUP_RX6800XT=
DISCORD_NOTIFY_GROUP_RX6900XT=
DISCORD_NOTIFY_GROUP_RYZEN5600=
DISCORD_NOTIFY_GROUP_RYZEN5800=
DISCORD_NOTIFY_GROUP_RYZEN5900=
DISCORD_NOTIFY_GROUP_RYZEN5950=
DISCORD_NOTIFY_GROUP_SONYPS5C=ps5-stock
DISCORD_NOTIFY_GROUP_SONYPS5DE=
DISCORD_NOTIFY_GROUP_XBOXSX=
DISCORD_NOTIFY_GROUP_XBOXSS=
DISCORD_NOTIFY_GROUP_TEST=ps5-stock
DISCORD_WEB_HOOK=https://discord.com/api/webhooks/[redacted]
EMAIL_PASSWORD=
EMAIL_TO=
EMAIL_USERNAME=
HEADLESS=
IN_STOCK_WAIT_TIME=
LOG_LEVEL=
LOW_BANDWIDTH=false
MAX_PRICE_SERIES_3060TI=
MAX_PRICE_SERIES_3070=
MAX_PRICE_SERIES_3080=
MAX_PRICE_SERIES_3090=
MAX_PRICE_SERIES_CORSAIR_SF=
MAX_PRICE_SERIES_RX6800=
MAX_PRICE_SERIES_RX6800XT=
MAX_PRICE_SERIES_RX6900XT=
MAX_PRICE_SERIES_RYZEN5600=
MAX_PRICE_SERIES_RYZEN5800=
MAX_PRICE_SERIES_RYZEN5900=
MAX_PRICE_SERIES_RYZEN5950=
MAX_PRICE_SERIES_SONYPS5C=
MAX_PRICE_SERIES_SONYPS5DE=
MAX_PRICE_SERIES_XBOXSS=
MAX_PRICE_SERIES_XBOXSX=
MAX_PRICE_SERIES_TEST=
MICROCENTER_LOCATION=
MQTT_BROKER_ADDRESS=
MQTT_BROKER_PORT=
MQTT_CLIENT_ID=
MQTT_PASSWORD=
MQTT_QOS=
MQTT_TOPIC=
MQTT_USERNAME=
NVIDIA_ADD_TO_CART_ATTEMPTS=
NVIDIA_SESSION_TTL=
OPEN_BROWSER=
PAGE_BACKOFF_MIN=
PAGE_BACKOFF_MAX=
PAGE_SLEEP_MIN=
PAGE_SLEEP_MAX=
PAGE_TIMEOUT=
PAGERDUTY_INTEGRATION_KEY=
PAGERDUTY_SEVERITY=
PHILIPS_HUE_API_KEY=
PHILIPS_HUE_CLOUD_ACCESS_TOKEN=
PHILIPS_HUE_CLOUD_CLIENT_ID=
PHILIPS_HUE_CLOUD_CLIENT_SECRET=
PHILIPS_HUE_CLOUD_REFRESH_TOKEN=
PHILIPS_HUE_LAN_BRIDGE_IP=
PHILIPS_HUE_LIGHT_COLOR=
PHILIPS_HUE_LIGHT_IDS=
PHILIPS_HUE_LIGHT_PATTERN=
PHONE_CARRIER=
PHONE_NUMBER=
PLAY_SOUND=
PROXY_ADDRESS=
PROXY_PROTOCOL=
PROXY_PORT=
PUSHBULLET=
PUSHOVER_EXPIRE=
PUSHOVER_RETRY=
PUSHOVER_TOKEN=
PUSHOVER_USER=
PUSHOVER_PRIORITY=
SCREENSHOT=
SHOW_ONLY_BRANDS=sony
SHOW_ONLY_MODELS=ps5 console
SHOW_ONLY_SERIES=sonyps5c
SLACK_CHANNEL=
SLACK_TOKEN=
SMTP_ADDRESS=
SMTP_PORT=
STORES=amazon-uk,argos,currys,ebuyer,game,johnlewis,smythstoys,very
TELEGRAM_ACCESS_TOKEN=
TELEGRAM_CHAT_ID=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_FROM_NUMBER=
TWILIO_TO_NUMBER=
TWITCH_ACCESS_TOKEN=
TWITCH_CHANNEL=
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
TWITCH_REFRESH_TOKEN=
TWITTER_ACCESS_TOKEN_KEY=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_TWEET_TAGS=
WEB_PORT=1202

Logs

Screenshot 2020-12-26 at 20 28 39
neatchee commented 3 years ago

First and foremost, your Discord groups are not in the correct format. Please refer to the documentation about getting the proper ID number from discord and how to format it.

This could be related to the timeouts, but probably not.

Is the Pi itself headless? Please try opening some of these addresses from the Raspberry Pi to see if you can reproduce the problem in a normal browser:

https://www.amazon.co.uk/dp/B08H93GKNJ https://www.amazon.co.uk/dp/B08GD9MNZB https://www.currys.co.uk/gbuk/gaming/console-gaming/consoles/microsoft-xbox-series-x-1-tb-10203371-pdt.html https://www.currys.co.uk/gbuk/gaming/console-gaming/consoles/microsoft-xbox-series-s-512-gb-ssd-10205195-pdt.html https://www.game.co.uk/en/playstation-5-digital-edition-2826341 https://www.game.co.uk/en/ea-sports-fifa-21-500gb-ps4-bundle-2832947

nmcc1212 commented 3 years ago

My pi is connected to a monitor via hdmi, but there is no keyboard or mouse connected. when using chromium on the pi the websites load fine

nmcc1212 commented 3 years ago

I control the pi over vnc, the display is just for gui use

wofnull commented 3 years ago

As far as my experience with an headless system goes: On a ryzen 1800x ( 8 Cores / 4 GHz ) and 32 GB of RAM , the system usage of this script is around 20-50% percent from time to time. The system is based on Debian 9.5. I would assume that the load from 8 stores and 1 product could drive your system to slowing down / choke. please run an additional SSH connection and check htop. i assume that the Load is maxed out on RAM and CPU usage.

Please keep in mind, that the bot opens in the background many Chrome Tabs ( and closes them again ) which is massively using CPU / Memory ressources, which leads to the point where the bot becomes a timeout because the site is not loaded up in 30000 ms as suspected.

nmcc1212 commented 3 years ago

This was the issue, in Netdata I was getting 100% cpu usage when the program was running (about 15% at idle)