jef / streetmerchant

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

Error: Request Interception is not enabled! #1311

Closed xeaon closed 3 years ago

xeaon commented 3 years ago

Expected Behavior

npm run start should run as expected

Current Behavior

from time to time, I'm puppeteer throws following error

/home/user/development/streetmerchant/node_modules/puppeteer/lib/cjs/puppeteer/common/assert.js:26
        throw new Error(message);
              ^

Error: Request Interception is not enabled!
    at Object.exports.assert (/home/user/development/streetmerchant/node_modules/puppeteer/lib/cjs/puppeteer/common/assert.js:26:15)
    at Proxy.respond (/home/user/development/streetmerchant/node_modules/puppeteer/lib/cjs/puppeteer/common/HTTPRequest.js:270:21)
    at PuppeteerBlocker.onRequest (/home/user/development/streetmerchant/node_modules/@cliqz/adblocker-puppeteer/dist/cjs/adblocker.js:241:29)
    at BlockingContext.onRequest (/home/user/development/streetmerchant/node_modules/@cliqz/adblocker-puppeteer/dist/cjs/adblocker.js:64:47)
    at /home/user/development/streetmerchant/build/store/lookup.js:91:9
    at new Promise (<anonymous>)
    at handleAdBlock (/home/user/development/streetmerchant/build/store/lookup.js:69:12)
    at /home/user/development/streetmerchant/build/store/lookup.js:164:23
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! streetmerchant@ start: `npm run build && node build/index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the streetmerchant@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2020-12-08T17_00_39_796Z-debug.log

Steps to Reproduce

npm run start & wait

Environment

OS: Pop!_OS 20.10 .env file:

# ** All configuration variables are optional **
# Read https://github.com/jef/streetmerchant#customization for help on customizing this file
#############################################################################################

ASCII_BANNER=""
ASCII_COLOR=""
AUTO_ADD_TO_CART=""
BROWSER_TRUSTED=""
COUNTRY="germany"
DESKTOP_NOTIFICATIONS=""
DISCORD_NOTIFY_GROUP=""
DISCORD_WEB_HOOK=""
EMAIL_PASSWORD=""
EMAIL_TO=""
EMAIL_USERNAME=""
HEADLESS="true"
IN_STOCK_WAIT_TIME=""
LOG_LEVEL=""
LOW_BANDWIDTH=""
MAX_PRICE_SERIES_3070=""
MAX_PRICE_SERIES_3080="700"
MAX_PRICE_SERIES_3090=""
MAX_PRICE_SERIES_RX6800="600"
MAX_PRICE_SERIES_RX6800XT="700"
MAX_PRICE_SERIES_RX6900XT="800"
MAX_PRICE_SERIES_RYZEN5600=""
MAX_PRICE_SERIES_RYZEN5800=""
MAX_PRICE_SERIES_RYZEN5900="650"
MAX_PRICE_SERIES_RYZEN5950="900"
MAX_PRICE_CORSAIR_SF=""
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_TOKEN=""
PUSHOVER_USER=""
PUSHOVER_PRIORITY=""
SCREENSHOT=""
SHOW_ONLY_BRANDS="amd,sapphire,xfx,nvidia"
SHOW_ONLY_MODELS=""
SHOW_ONLY_SERIES="rx6800,rx6800xt,3080,3070"
SLACK_CHANNEL=""
SLACK_TOKEN=""
SMTP_ADDRESS=""
SMTP_PORT=""
STORES="medimax,expert,euronics-de,amazon-de-warehouse,otto,alternate,amazon-de, amazon-uk, amazon-it, amazon-es, amazon-nl,amd-de,asus-de,arlt,caseking,computeruniverse,cyberport,galaxus,mediamarkt,mindfactory,notebooksbilliger,proshop-de,saturn,zotac,nvidia"
TELEGRAM_ACCESS_TOKEN="<redacted>"
TELEGRAM_CHAT_ID="<redacted>"
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=""
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
WEB_PORT=""

Logs

Contents of the debug log:


0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'start' ]
2 info using npm@6.14.9
3 info using node@v15.3.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle streetmerchant@~prestart: streetmerchant@
6 info lifecycle streetmerchant@~start: streetmerchant@
7 verbose lifecycle streetmerchant@~start: unsafe-perm in lifecycle true
8 verbose lifecycle streetmerchant@~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/user/development/streetmerchant/node_modules/.bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
9 verbose lifecycle streetmerchant@~start: CWD: /home/user/development/streetmerchant
10 silly lifecycle streetmerchant@~start: Args: [ '-c', 'npm run build && node build/index.js' ]
11 silly lifecycle streetmerchant@~start: Returned: code: 1  signal: null
12 info lifecycle streetmerchant@~start: Failed to exec start script
13 verbose stack Error: streetmerchant@ start: `npm run build && node build/index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (node:events:376:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (node:events:376:20)
13 verbose stack     at maybeClose (node:internal/child_process:1055:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)
14 verbose pkgid streetmerchant@
15 verbose cwd /home/user/development/streetmerchant
16 verbose Linux 5.9.12-050912-generic
17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "start"
18 verbose node v15.3.0
19 verbose npm  v6.14.9
20 error code ELIFECYCLE
21 error errno 1
22 error streetmerchant@ start: `npm run build && node build/index.js`
22 error Exit status 1
23 error Failed at the streetmerchant@ start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
``
jef commented 3 years ago

https://github.com/jef/streetmerchant/issues/826