Comments (9)
+1
from webpack-obfuscator.
Can you upload minimal working project where i can reproduce this error? It should be prepared project, i should just install dependencies and build it.
from webpack-obfuscator.
@sanex3339 I can't upload my source code, and I can't even begin to determine how to track down the source of the error, hence reproduce the issue.
If you could give me any advice at all on how to track down the source of the error I'd be happy to provide a repo to reproduce the issue.
from webpack-obfuscator.
You can replace your source code on any other code on which i can reproduce this error
from webpack-obfuscator.
@sanex3339 I haven't the slightest clue where the error originates, hence cannot reproduce or debug on my own. I have tried to reproduce the issue with a number of best guesses at what the issue could be, without any luck.
Do you have any idea how I can track this down when it's not giving me a source for the errors? If I can find the error, I'd be happy to produce a package to demonstrate. Thanks for any advice.
from webpack-obfuscator.
@sanex3339 so I finally revisited this. I manually obfuscated the output javascript using https://github.com/javascript-obfuscator/javascript-obfuscator and it worked without any issues. Do you have any idea how I can prevent the webpack version from relying on sourcemaps? The underlying tool seems to work fine without.
Thanks for any advice you might be able to give.
from webpack-obfuscator.
Hi. Interesting. I'm not good at webpack plugins, so i need some help with source maps
from webpack-obfuscator.
in my case.
package.json
{
"name": "ab",
"version": "1.0.0",
"scripts": {
"start": "webpack --config config.js --entry ./ab.js --output-filename output.js"
},
"devDependencies": {
"babel-loader": "^7.1.4",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.11",
"webpack-obfuscator": "^0.14.3"
}
}
config.js
const JavaScriptObfuscator = require('webpack-obfuscator')
module.exports = {
plugins: [
new JavaScriptObfuscator({sourceMap: true})
],
module: {
rules: [{test: /\.js$/, use: 'babel-loader'}]
}
}
ab.js
var b = 'b';
var ab = 'a\
' + b;
console.log(ab);
$ npm start
> [email protected] start /Users/nanki/ab
> webpack --config config.js --entry ./ab.js --output-filename output.js
(node:95447) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-map-generator.js:275
throw new Error('Invalid mapping: ' + JSON.stringify({
^
Error: Invalid mapping: {"generated":{"line":1,"column":1617},"source":"sourceMap","original":{"line":81,"column":-4},"name":null}
at SourceMapGenerator_validateMapping [as _validateMapping] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-map-generator.js:275:15)
at SourceMapGenerator_addMapping [as addMapping] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-map-generator.js:105:14)
at /Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:350:15
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:229:11)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_walk [as walk] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:225:15)
at SourceNode_toStringWithSourceMap [as toStringWithSourceMap] (/Users/nanki/ab/node_modules/escodegen-wallaby/node_modules/source-map/lib/source-map/source-node.js:341:10)
at Object.generate (/Users/nanki/ab/node_modules/escodegen-wallaby/escodegen.js:2782:23)
at e.value (/Users/nanki/ab/node_modules/javascript-obfuscator/dist/index.js:24:267520)
at e.value (/Users/nanki/ab/node_modules/javascript-obfuscator/dist/index.js:24:266445)
at Function.value (/Users/nanki/ab/node_modules/javascript-obfuscator/dist/index.js:24:28815)
at /Users/nanki/ab/node_modules/webpack-obfuscator/index.js:49:66
at Array.forEach (<anonymous>)
at /Users/nanki/ab/node_modules/webpack-obfuscator/index.js:27:23
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/nanki/ab/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/nanki/ab/node_modules/tapable/lib/Hook.js:35:21)
at hooks.additionalAssets.callAsync.err (/Users/nanki/ab/node_modules/webpack/lib/Compilation.js:943:36)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/nanki/ab/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/nanki/ab/node_modules/tapable/lib/Hook.js:35:21)
at hooks.optimizeTree.callAsync.err (/Users/nanki/ab/node_modules/webpack/lib/Compilation.js:939:32)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/nanki/ab/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/nanki/ab/node_modules/tapable/lib/Hook.js:35:21)
at Compilation.seal (/Users/nanki/ab/node_modules/webpack/lib/Compilation.js:881:27)
at hooks.make.callAsync.err (/Users/nanki/ab/node_modules/webpack/lib/Compiler.js:464:17)
at _err0 (eval at create (/Users/nanki/ab/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:11:1)
at _addModuleChain (/Users/nanki/ab/node_modules/webpack/lib/Compilation.js:749:12)
at processModuleDependencies.err (/Users/nanki/ab/node_modules/webpack/lib/Compilation.js:688:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `webpack --config config.js --entry ./ab.js --output-filename output.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nanki/.npm/_logs/2018-03-13T09_51_55_512Z-debug.log
from webpack-obfuscator.
Closed as old. Please try on latest version.
from webpack-obfuscator.
Related Issues (20)
- Is there any option that can output the filename matched by webpack-obfuscator loader in the console?
- does webpack-obfuscator support nuxtjs3 ?
- Obfuscate method names in objects/classes. HOT 1
- hashes are breaking chunk loading when using "split strings" or "medium" preset
- Compatibility with Module Federation plugin
- DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
- Loader doesn't work, but plugin does HOT 2
- webpack-obfuscator is not generating sourcemaps HOT 4
- Is there a Vue framework use case?
- webpack-obfuscator not working on Firebase deployment HOT 1
- webpack > 5 it's not working
- Webpack version compatible
- cannot read property of undefined reading sourceAndMap
- Security.md file?
- how to obfuscate select multiple .vue file in nuxt2
- help with excluding a 10mb file from obfuscation
- Exclude files
- use webpack-obfuscator in Vue has a error when build the vue project
- Obfuscation doesn't work on ionic angular mobile iOS app
- Does it work with CSS?
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 webpack-obfuscator.