Skip to content

Obfuscation on AngularJS 1.5.10 is causing $injector:modulerr #992

Open
@MatthewMollentze

Description

@MatthewMollentze

Current Behavior

Obfuscating via a grunt task or manually, the Error: $injector:modulerr Module Error is given, without any more context

Steps to Reproduce

  1. Run obfuscator before or after concatenation. Run it manually or via task.
  2. Run with or without babel-plugin-angularjs-annotate.
  3. Lift app and load page...
  4. Output of Error: $injector:modulerr Module Error is reported.

Environment

  • Obfuscator version used: v1.17.3
  • Node version used: v12.22.5
  • AngularJS: v1.5.10
  • SailsJS: v1.4.3

Task Config

module.exports = function (grunt) {
  grunt.config.set('javascript_obfuscator', {

    options: {
      compact: true,
      controlFlowFlattening: false,
      deadCodeInjection: false,
      debugProtection: false,
      debugProtectionInterval: false,
      disableConsoleOutput: false,
      identifierNamesGenerator: 'hexadecimal',
      log: false,
      numbersToExpressions: false,
      renameGlobals: false,
      rotateStringArray: true,
      selfDefending: true,
      shuffleStringArray: true,
      simplify: true,
      splitStrings: false,
      stringArray: true,
      stringArrayEncoding: [],
      stringArrayIndexShift: true,
      stringArrayWrappersCount: 1,
      stringArrayWrappersChainedCalls: true,
      stringArrayWrappersParametersMaxCount: 2,
      stringArrayWrappersType: 'variable',
      stringArrayThreshold: 0.75,
      unicodeEscapeSequence: false,
    },

    dist: {
      src: ['.tmp/public/concat/production.js'],
      dest: '.tmp/public/min/production.min.js',
    },
  })

  grunt.loadNpmTasks('grunt-javascript-obfuscator')
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions