question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Misleading Exception

See original GitHub issue

When I want to obfuscate one directory like this: javascript-obfuscator <srcDir> --output <destDir> --config <myConfig> If in my config I assign value to sourceMapFileName , then an exception thown:

----- now run cmd: 'javascript-obfuscator dist\dev-bundle       --output dist\prod-bundle       --config buildScripts\obfuscate.config.json' -----
Error: EPERM: operation not permitted, mkdir 'D:\'
    at Object.mkdirSync (fs.js:947:3)
    at mkdirpNativeSync (D:\workspace\HiEarthSdk\node_modules\mkdirp\lib\mkdirp-native.js:25:17)
    at Object.sync (D:\workspace\HiEarthSdk\node_modules\mkdirp\index.js:21:7)
    at t.ObfuscatedCodeWriter.writeFile (D:\workspace\HiEarthSdk\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\cli\utils\ObfuscatedCodeWriter.ts:82:16)
    at j.apply (D:\workspace\HiEarthSdk\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\cli\JavaScriptObfuscatorCLI.ts:195:39)
    at j.processSourceCodeWithSourceMap (D:\workspace\HiEarthSdk\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\decorators\Initializable.ts:61:39)
    at j.apply (D:\workspace\HiEarthSdk\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\cli\JavaScriptObfuscatorCLI.ts:178:18)
    at j.processSourceCode (D:\workspace\HiEarthSdk\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\decorators\Initializable.ts:61:39)
    at D:\workspace\HiEarthSdk\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\cli\JavaScriptObfuscatorCLI.ts:165:22
    at Array.forEach (<anonymous>)
(node:6204) UnhandledPromiseRejectionWarning: Error: Command failed: javascript-obfuscator dist\dev-bundle       --output dist\prod-bundle       --config buildScripts\obfuscate.config.jso
n

The exception is too terrible and I found out reason after one day…

Expected Behavior

So when obfuscating one directory the option sourceMapFileName should not be set? If set I want get correct prompt… Thanks!

Your Environment

  • Obfuscator version used: windows10
  • Node version used: v14.10.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Oct 6, 2020

I managed to setup TravisCI build under windows. https://travis-ci.com/github/javascript-obfuscator/javascript-obfuscator/jobs/395863667

It fails with the same error. So, now i’ll try to fix it

0reactions
sanex3339commented, Oct 8, 2020

Released as 2.5.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Misleading exception for input source when processing byte ...
If I use the ObjectMapper.readValue(byte[], int offset, int len, TypeReference) interface to deserialize a value AND the deserialize fails (e.g. ...
Read more >
Exception Handling: A False Sense of Security by Tom Cargill
I am concerned that exceptions will lull programmers into a false sense of security, ... The detailed encoding of the exception object is...
Read more >
391036 – Misleading exception when entity is not in ... - Bugs
I have an object model like this: Project that has a subclass of SmallProject. Employee has a collection of Projects. The relationship is...
Read more >
Misleading exception message [239734809] - Visible to Public
This code catches exceptions from a large code block but describes it as Unable to determine application id . Can we please fix...
Read more >
PM54979: MISLEADING DUMP OF EXCEPTION IN ... - IBM
A code fix for this issue is integrated into the 7.0.0.1 Combined Cumulative Fix 11 (PM53918) and into the 7.0.0.2 Combined Cumulative Fix...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found