Release Build Issues - Forum - Kendo UI Builder - Progress Community
 Forum

Release Build Issues

This question is answered

Hello,

Has anybody successfully deployed a "Release" build?  The "Debug" version works correctly but when I load the "Release" build version, the landing page loads correctly but any module I try to open generates the following error:

Error: [$injector:unpr] Unknown provider: eProvider <- e
errors.angularjs.org/.../unpr
    at vendor.bundle.js:1
    at vendor.bundle.js:1
    at Object.r [as get] (vendor.bundle.js:1)
    at vendor.bundle.js:1
    at r (vendor.bundle.js:1)
    at i (vendor.bundle.js:1)
    at Object.a [as invoke] (vendor.bundle.js:1)
    at l (vendor.bundle.js:1)
    at vendor.bundle.js:1
    at vendor.bundle.js:1 "Possibly unhandled rejection: {}"
(anonymous) @ vendor.bundle.js:1
(anonymous) @ vendor.bundle.js:1
c @ vendor.bundle.js:1
$digest @ vendor.bundle.js:1
$apply @ vendor.bundle.js:1
(anonymous) @ vendor.bundle.js:1
i @ vendor.bundle.js:1
(anonymous) @ vendor.bundle.js:1
setTimeout (async)
l.defer @ vendor.bundle.js:1
o @ vendor.bundle.js:1
(anonymous) @ vendor.bundle.js:1
dispatch @ vendor.bundle.js:1
m.handle @ vendor.bundle.js:1

Also, this app is running on an IIS server in case that makes a difference.

Louis

Verified Answer
  • Hi Louis,

     The problem is caused by dependency injection and magnification of the code in release mode from the jtsNavigation.module.js file. You have :

    var resolveTemplate = ($q, jtslibService, $state) => {

    However the $q, jtslibService, $state are not injected in strict mode. So when the code for release is produced and it is minified and obfuscated the services names are replaced with shorter names. More info you can find here: https://scotch.io/tutorials/declaring-angularjs-modules-for-minification

    To fix the problem you can add:

    resolveTemplate.$inject = ['$q', 'jtslibService', '$state'];

    Best,

    Rado

All Replies
  • Hi Louis,

    The described issue is very strange and we have not encounterеd it so far. I tested the 2.0.1 version with all views and everything works as expected. Can you send us the meta of the app in order to generate release version and investigate the problem in our side.

    Looking forward for your reply.

    Best,

    Rado

  • Rado,

    Just to make sure I get you what you need, you want just the "meta" folder and nothing from the "app" folder?  Who should I send this to?

    Louis

  • Hi Louis,

    The meta and generated app folder will be great. You can send it directly to me.

    I ask only for meta because I do not know if you have any sensitive data in the app as custom code. But having meta and  app folder will speed up investigation of the problem. 

    Best,

    Rado

  • Hi Louis,

     The problem is caused by dependency injection and magnification of the code in release mode from the jtsNavigation.module.js file. You have :

    var resolveTemplate = ($q, jtslibService, $state) => {

    However the $q, jtslibService, $state are not injected in strict mode. So when the code for release is produced and it is minified and obfuscated the services names are replaced with shorter names. More info you can find here: https://scotch.io/tutorials/declaring-angularjs-modules-for-minification

    To fix the problem you can add:

    resolveTemplate.$inject = ['$q', 'jtslibService', '$state'];

    Best,

    Rado

  • Thanks Rado, adding the $inject fixed my issue and the "release" build now works correctly.

    Louis