javascript-obfuscator icon indicating copy to clipboard operation
javascript-obfuscator copied to clipboard

3.0.0 and above break code that works with 2.13 to 2.19 versions.

Open Nantris opened this issue 2 years ago • 3 comments

Expected Behavior

Upgrading from 2.x to 3.x should "just work" after updating the relevant option names

Current Behavior

3.0.0 and all builds I've tried above that result in: Error: Cannot find module 'yargs-parser'

Steps to Reproduce

  1. Unknown

Your Environment

  • Obfuscator version used: 3.0.0
  • Node version used: 16.18.0

Stack trace

    at t (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:1047713)
    at 83356 (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:895678)
    at u (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:1142257)
    at 390 (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:900842)
    at u (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:1142257)
    at /tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:874357
    at u.a (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:1142784)
    at 93607 (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:874207)
    at u (/tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:1142257)
    at /tmp/.mount_AppDsOGW4/resources/app.asar/app/dist/preload.build.js:2:1144138

Minimal working example that will help to reproduce issue

Apparently merely importing yargs-parser, though I am not yet certain.

Additional notes

We're applying the obfuscation using webpack-obfuscator rather than calling javascript-obfuscator directly. I tested versions 4, 3, and 2.13 to 2.19. The 2.x versions work, but nothing above.

Nantris avatar Mar 29 '23 23:03 Nantris

Is the yargs-parser module being bundled into your preload.build.js?

relative avatar Mar 30 '23 01:03 relative

Yes it is (and previously worked fine with the same yargs-parser version.)

Nantris avatar Mar 30 '23 01:03 Nantris

Possibly a duplicate of (https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1093). See this comment: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1093#issuecomment-1613908105

softworkz avatar Jun 29 '23 23:06 softworkz