Version: 4.0.0. Error: Evaluation failed: ReferenceError: _0x5b9d0e is not defined with config stringArray: true
See original GitHub issuejavascript-obfuscator version: 4.0.0
stringArray: true
will cause this error, UnhandledPromiseRejectionWarning: Error: Evaluation failed: ReferenceError: _0xa28d is not defined
config:
{
"compact": true,
}
run code sussessed after added stringArray: false
to config.
Code:
const puppeteer = require('puppeteer-core');
let params = {
ignoreHTTPSErrors: true,
args: [
'--ignore-certificate-errors',
'--no-sandbox',
],
executablePath: this.chromePath,
headless: true,
};
const browser = await puppeteer.launch(params);
var page = await browser.newPage();
await page.goto(this.url, { waitUntil: 'load' });
await page.content(); ----------------------- error in this line
await page.setViewport({ width: 1600, height: 1200 });
await page.waitForTimeout(2000);
Error info:
(node:22648) UnhandledPromiseRejectionWarning: Error: Evaluation failed: ReferenceError: _0xa28d is not defined
at __puppeteer_evaluation_script__:1:21
at _0x1ce9f4._evaluateInternal (E:\xx\dist\bundle.js:1:3355462)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async _0x1ce9f4.evaluate (E:\xx\dist\bundle.js:1:3353310)
at async _0x23b99f.content (E:\xx\dist\bundle.js:1:3400665)
at async _0x14d154.content (E:\xx\dist\bundle.js:1:3508435)
at async _0x571581.getContentInaSinglePage (E:\xx\dist\bundle.js:1:4423286)
at async _0x508402.isInteresting (E:\xx\dist\bundle.js:1:4622902)
at async _0x508402.startScan (E:\xx\dist\bundle.js:1:4641280)
at async _0x421a37.scan (E:\xx\dist\bundle.js:1:4643371)
at async E:\xx\dist\bundle.js:1:4970734
I’m not sure if it’s something I’m using wrong or a BUG.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
async function inside evaluate fails · Issue #1665 - GitHub
Code await page.evaluate(async () => { console.log('1') }) Error ... Error: Evaluation failed: ReferenceError: fn is not defined at ...
Read more >Evaluation failed: ReferenceError: _0x5b9d0e is not defined ...
I can successfully run the code below, But failed after obfuscating with javascript-obfuscator .
Read more >Puppeteer Evaluation failed: ReferenceError: __awaiter is ...
I am using Puppeteer with TypeScript and when I try to evaluate an async function on a page: await page.evaluate(async function() { //...
Read more >Evaluation failed: ReferenceError: req is not defined". Im using ...
I get the error "Error: Evaluation failed: ReferenceError: req is not defined". Im using puppeteer and im trying to get the clients input...
Read more >Reviewing Build 3 • Tiro-health/medical-forms - Chromatic
Error stack trace View in Storybook. Error: Evaluation failed: ReferenceError: React is not defined at DropdownMultipleCombobox ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am getting a similar problem randomly (not always) and at different points of code while using gulp-javascript-obfuscator to prepare our code.
I am using the following in gulpfile.js
const javascriptObfuscator = require(‘gulp-javascript-obfuscator’);
gulp.src([‘app/scripts/**/*.js’]) .pipe(javascriptObfuscator({ compact: true }));
A few points to notice are…
The error looks like below (One example):
Uncaught TypeError: Cannot read properties of undefined (reading ‘12’) at _0x13b6 (utility.js:1:49938) at _0x13b6 (utility.js:1:49969) at utility.js:1:70153 at dispatch (jquery.js:4435:9) at jquery.js:4121:28
Any suggestions/help will be appreciated.
I can confirm after using the other module for over a month that I never encountered that issue in this package.