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

Request Interception is not enabled! #826

Closed
neocleous opened this issue Nov 17, 2020 · 20 comments · Fixed by #1312
Closed

Request Interception is not enabled! #826

neocleous opened this issue Nov 17, 2020 · 20 comments · Fixed by #1312
Assignees

Comments

@neocleous
Copy link

neocleous commented Nov 17, 2020

Hi everyone,

The script runs for a while then I get an error: Error: Request Interception is not enabled!

It sounds like something I need to configure in the variable file but I'm not sure what it relates too.

The error log is below.

0 verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'run',
0 verbose cli 'start'
0 verbose cli ]
1 info using npm@7.0.8
2 info using node@v15.2.1
3 timing config:load:defaults Completed in 0ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 0ms
5 timing config:load:builtin Completed in 0ms
6 timing config:load:cli Completed in 0ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:C:\Users\Neocleous\desktop\streetmerchant.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:C:\Users\Neocleous.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\Neocleous\AppData\Roaming\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 0ms
19 verbose npm-session 25cfdaceb49391ef
20 timing npm:load Completed in 31ms
21 timing command:run-script Completed in 952656ms
22 verbose stack Error: command failed
22 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\promise-spawn\index.js:64:27)
22 verbose stack at ChildProcess.emit (node:events:329:20)
22 verbose stack at maybeClose (node:internal/child_process:1055:16)
22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)
23 verbose cwd C:\Users\Neocleous\desktop\streetmerchant
24 verbose Windows_NT 10.0.18362
25 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start"
26 verbose node v15.2.1
27 verbose npm v7.0.8
28 error code 1
29 error path C:\Users\Neocleous\desktop\streetmerchant
30 error command failed
31 error command C:\Windows\system32\cmd.exe /d /s /c "npm run build && node build/index.js"
32 verbose exit 1

Thanks

@neocleous neocleous changed the title Port Issue Request Interception is not enabled! Nov 18, 2020
@jef
Copy link
Owner

jef commented Nov 21, 2020

Did you run npm install?

@neocleous
Copy link
Author

Yes I did, the script runs for a while (the time varies) then stops with the error mentioned above

@jef
Copy link
Owner

jef commented Nov 21, 2020

Are you using the latest code and have you ran npm install to update the dependencies? Particularly puppeteer?

I'm asking because this was a known issue in the library.

@neocleous
Copy link
Author

I ran a pull yesterday and then followed up with npm install, happy to try it again if you thin kit will help

@jef
Copy link
Owner

jef commented Nov 21, 2020

We recently updated puppeteer plugins today. Do you mind trying that?

@neocleous
Copy link
Author

Sure, just so I know I'm doing it correctly would you mind posting the commands you want me to enter and I'll copy and paste them in?

@neocleous
Copy link
Author

neocleous commented Nov 21, 2020

I've ran the following:

PS C:\Users\Neocleous\Desktop\streetmerchant> git pull origin main

remote: Enumerating objects: 71, done.
remote: Counting objects: 100% (71/71), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 71 (delta 49), reused 37 (delta 34), pack-reused 0
Unpacking objects: 100% (71/71), 134.11 KiB | 213.00 KiB/s, done.
From https://github.com/jef/streetmerchant

  • branch main -> FETCH_HEAD
    d792116..2d01cfd main -> origin/main
    error: Your local changes to the following files would be overwritten by merge:
    package-lock.json
    Please commit your changes or stash them before you merge.
    Aborting
    Updating d0ebffd..2d01cfd
    PS C:\Users\Neocleous\Desktop\streetmerchant> npm install

up to date, audited 1360 packages in 4s

6 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
PS C:\Users\Neocleous\Desktop\streetmerchant> npm fund
streetmerchant
+-- https://github.com/sponsors/isaacs
| -- rimraf@3.0.2, json-stringify-nice@1.1.1, promise-all-reject-late@1.0.1, promise-call-limit@1.0.1 +-- https://github.com/sponsors/sindresorhus | -- p-map@4.0.0
-- https://github.com/sponsors/ljharb -- resolve@1.17.0

@neocleous
Copy link
Author

To give an update, I have tried pulling it down again and reinstalling it, I am getting the same issue.

@jef
Copy link
Owner

jef commented Nov 22, 2020

Please commit your changes or stash them before you merge.
Aborting
Updating d0ebffd..2d01cfd

It looks like it didn't update.

To give an update, I have tried pulling it down again and reinstalling it, I am getting the same issue.

This would definitely update.

It's hard for me to reproduce... Can you post your .env and remove any secrets?

@neocleous
Copy link
Author

Please see my .env file below, I noticed when I copied it in I don't have "" around EMAIL_PASSWORD or EMAIL_TO fields, I'm not sure if that will cause an issue but I did the notifications test and it worked.

Thanks for all the help

** 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=
DESKTOP_NOTIFICATIONS=
DISCORD_NOTIFY_GROUP=
DISCORD_WEB_HOOK=
EMAIL_PASSWORD=""
EMAIL_TO=

EMAIL_USERNAME=***********************
HEADLESS=
IN_STOCK_WAIT_TIME=
LOG_LEVEL=
LOW_BANDWIDTH=
MAX_PRICE_SERIES_3070=
MAX_PRICE_SERIES_3080=
MAX_PRICE_SERIES_3090=
MAX_PRICE_SERIES_RYZEN5600=
MAX_PRICE_SERIES_RYZEN5800=
MAX_PRICE_SERIES_RYZEN5900=
MAX_PRICE_SERIES_RYZEN5950=
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_PORT=
PUSHBULLET=
PUSHOVER_TOKEN=
PUSHOVER_USER=
PUSHOVER_PRIORITY=
SCREENSHOT=
SHOW_ONLY_BRANDS="asus,nvidia,amd"
SHOW_ONLY_MODELS=
SHOW_ONLY_SERIES="3080,ryzen5900"
SLACK_CHANNEL=
SLACK_TOKEN=
SMTP_ADDRESS=
SMTP_PORT=
STORES="amazon-uk,overclockers,scan,very,nvidia,novatech,game,currys,aria"
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=
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36"
WEB_PORT=

@neocleous
Copy link
Author

Error

This is the error I am seeing, in this screenshot it ran for less than 10 mins and on other occasions it can run for a few hours. It seems to be the same error each time.

@brok3nstrings
Copy link
Contributor

I'm also having this issue. I am not sure if this is a solid workaround, but it hasn't crashed on me since making this edit.

streetmerchant/node_modules/@cliqz/adblocker-puppeteer/dist/cjs/adblocker.js
    async disable() {
        if (this.blocker.config.loadNetworkFilters === true) {
            this.page.removeListener('request', this.onRequest);
            await this.page.setRequestInterception(true);

@sloshappy
Copy link

sloshappy commented Dec 7, 2020

Screenshot_1
I am having this same issue, any way to get this fixed? It usually runs completly through once or twice then it crashes with this same thing

@howdoicomputer
Copy link

So it seems like it's a problem with the adblocker dependency. Adding this.page.removeListener('request', this.onRequest); to the adblocker code fixed my problem as well. Not sure what is happening since I'm not an expert on Puppeteer. I'm guessing that promise doesn't resolve and so when request interception is done later on in the code base it errors out. A ticket should probably be filed.

@sloshappy
Copy link

This may have nothing to do with it. I am not sure. But if I connect to a different server on my VPN I will not experience this error. I am super green so I have no other thoughts than this on how to fix it. But it does work. But not all servers, it only works forever on specific ones on the vpn

@jef
Copy link
Owner

jef commented Dec 8, 2020

Perhaps let's make a report to that repository. I can downgrade if necessary.

jef pushed a commit that referenced this issue Dec 11, 2020
@sloshappy
Copy link

sloshappy commented Dec 11, 2020

Perhaps let's make a report to that repository. I can downgrade if necessary.

I have no clue how to do that. Sorry I am very new to git. The VPN thing definitely works though. There are certain nodes when I can predict it will come up with this error.

ven0ms99 pushed a commit to ven0ms99/streetmerchant that referenced this issue Dec 11, 2020
@jef
Copy link
Owner

jef commented Dec 11, 2020

Perhaps let's make a report to that repository. I can downgrade if necessary.

I have no clue how to do that. Sorry I am very new to git. The VPN thing definitely works though. There are certain nodes when I can predict it will come up with this error.

That's ok! It's fixed now, so you should be good to go. Thank you!

@AlexP11223
Copy link
Contributor

Why this issue is still pinned? :)

@jef
Copy link
Owner

jef commented Apr 14, 2021

Good point, thanks for the reminder!

@jef jef unpinned this issue Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants