Comments (25)
I got it working with the pkg. I included the whole stealth module in the package.json
file:
"pkg": {
"scripts": ["node_modules/puppeteer/lib/*.js", "node_modules/puppeteer-extra-plugin-stealth/**/*.js"]
}
While compiling with pkg you will get bunch of warnings that 'ava' module not found. You can ignore them. That module is used in an example .js file which is included with the plugin. You won't be needing that.
from puppeteer-extra.
Thanks a lot for the quick reply!
from puppeteer-extra.
@AsianPotato I just published [email protected]
with a fix, everything should work now.
Rerunning yarn add puppeteer-extra-plugin-stealth
in your project should be enough to fetch the new version.
Apologies for that bug, I rewrote parts in typescript just yesterday and for some mysterious reasons the CI tests didn't complain about this issue. 😄
from puppeteer-extra.
Keep in mind that the example script you're using is making use of two plugins that need to be installed.
So next to yarn add puppeteer puppeteer-extra
you also need to run yarn add puppeteer-extra-plugin-stealth puppeteer-extra-plugin-anonymize-ua
for the example script to work.
Maybe I should make that clearer in the readme.
from puppeteer-extra.
@eduardoewgo I fixed it using nexe instead of pkg
from puppeteer-extra.
In the output dir, simply run npm install
for both packages - it will create the node_modules within all dependencies of this package. This is ugly and defeats the purpose of having a .exec
, but it's my only working version atm.
from puppeteer-extra.
After giving up, a new requirement brought me again to this issue and I finally got it to work using @lockHrt 's suggestion THANKS A LOT... in my case I added node_modules/puppeteer-extra-plugin-stealth/**/*.js
to the scripts array (I already had the other one)
I got it working with the pkg. I included the whole stealth module in the
package.json
file:"pkg": { "scripts": ["node_modules/puppeteer/lib/*.js", "node_modules/puppeteer-extra-plugin-stealth/**/*.js"] }
While compiling with pkg you will get bunch of warnings that 'ava' module not found. You can ignore them. That module is used in an example .js file which is included with the plugin. You won't be needing that.
from puppeteer-extra.
Whoops, I have an idea why that might be - I rewrote the base plugin in typescript and changed the exports to be named. Let me check!
from puppeteer-extra.
@AsianPotato could you run yarn list puppeteer-extra-*
real quick and paste the output here? thanks!
from puppeteer-extra.
Nevermind I found the issue - fixing it now 😄
from puppeteer-extra.
@AsianPotato thanks a lot for the issue, I've improved the main example to be much clearer for the next person. :-)
from puppeteer-extra.
Hi
I have this problem with puppeteer-extra-plugin-stealth version 2.4.9
If I execute my software in cli with npm start, all work fine but if I create an exe with pkg I will receive this error:
A plugin listed 'puppeteer-extra-plugin-stealth/evasions/chrome.runtime' as dependency,
which is currently missing. Please install it:
yarn add puppeteer-extra-plugin-stealth
Note: You don't need to require the plugin yourself,
unless you want to modify it's default settings.
How can I fix this?
thank you @berstend
from puppeteer-extra.
Getting the same issue as @Dam998...
"puppeteer": "^8.0.0",
"puppeteer-extra": "^3.1.16",
"puppeteer-extra-plugin-stealth": "^2.7.5"
from puppeteer-extra.
@eduardoewgo could you check with the latest versions?
(at the time of writing):
from puppeteer-extra.
@Dam998 kinda hard to move away from pkg
at this point and I've tried nexe in the past; just can't remember what was the issue back then.. anyway, I'll try a bit more on this and last resource nexe.
@berstend I've installed the newest version and the error persists 😞
Just to give some context
This is the module loading up puppeteer.
const chromeExecutablePath = path.join(execPath, 'chromium/win64-856583/chrome-win/chrome.exe')
const puppeteer = require(`puppeteer-extra`)
const StealthPlugin = require(`puppeteer-extra-plugin-stealth`)
puppeteer.use(StealthPlugin())
This is the message I got
A plugin listed 'puppeteer-extra-plugin-stealth/evasions/chrome.app' as dependency,
which is currently missing. Please install it:
yarn add puppeteer-extra-plugin-stealth
Any other suggestion, @berstend ?
from puppeteer-extra.
@eduardoewgo well, the issue is that their bundler trips over the dynamic imports: vercel/pkg#343
so what you might want to try is hardcoding the evasion imports somewhere in your code like this (to make the bundler aware of them):
require('puppeteer-extra-plugin-stealth/evasions/chrome.app')
// ...
from puppeteer-extra.
There's also stuff like this you might want to look into:
"pkg": {
"scripts": "node_modules/puppeteer/lib/*.js"
}
(using that for the stealth evasions)
from puppeteer-extra.
@berstend only solution was to manually install both puppeteer-extra-plugin-stealth
and puppeteer-extra
to the output dir 😞
It's the only packag that is not being properly compiled by pkg/nexe. Well, not sure how viable this is gonna be once this is finished, but it's the only way I could get a working .exe
now.
from puppeteer-extra.
btw, I am using typescript - shouldn't matter, but just in case.
from puppeteer-extra.
@eduardoewgo what do you mean by
@berstend only solution was to manually install both
puppeteer-extra-plugin-stealth
andpuppeteer-extra
to the output dir 😞
from puppeteer-extra.
@eduardoewgo I fixed it using nexe instead of pkg
i
Hi, im also encountering this issue in pkg, how do I workaround using nexe? thanks.
from puppeteer-extra.
@eduardoewgo I fixed it using nexe instead of pkg
i
Hi, im also encountering this issue in pkg, how do I workaround using nexe? thanks.
Wdym?
just go to github page of nexe and follow their istruction to build an exe file : 3
from puppeteer-extra.
Did anybody get it working?
from puppeteer-extra.
@rabbit-yashow I updated my global pkg
to the latest version (5.4.1
) and am no longer having this issue.
from puppeteer-extra.
in which package package.json you write this json so that it would work?
from puppeteer-extra.
Related Issues (20)
- Webdriver can be detected HOT 1
- [Bug] Puppeteer is detected HOT 3
- Unable to detect verification code [Bug]
- [Bug] Extract Stealth Evasions stealth.min.js does not exist in gitcdn.xyz
- [Feature] npx extract-stealth-evasions in Docker
- missing error imports
- [Bug] Web Worker detect actual Navigation. HOT 2
- [Bug] Recaptchaplugin gets detected HOT 1
- Puppeteer v22.0.0 [Bug]
- userPrefs.protocol_handlers.exclude_schemes property set with puppeteer-extra-plugin-user-preferences not working
- ERROR : E: Unable to locate package google-chrome-stable while building Docker image HOT 1
- [Bug] stealth not work HOT 7
- [Bug] Stealth is not working properly HOT 3
- This browser or app may not be secure [Login in Gmail] HOT 6
- [Bug] hCaptcha detect fails due to new hCaptcha URL format
- Playing audio on fake mic of puppeteer
- [Bug] TargetCloseError: Protocol error puppeteer-extra-plugin-stealth
- [Bug] REPL plugin giving error for spread syntax
- Inconsistent ad blocking behavior with puppeteer-extra-plugin-adblocker in Puppeteer[Bug] HOT 1
- [Bug] Puppeteer gets detected on cloudflare HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppeteer-extra.