Hi Greg, yes. I did a production deployment over 6 months ago and it worked. I had in mind to look for "that point" in the repository and maybe it's already time... I don't usually give up, but I lack the knowledge to solve this, I'm bugging and bugging Harb and I've done 1000000 tests without success.
Right now I'm debugging App.js, as suggested by Harb, and what I've discovered so far is that "other models", also located in the modules [1] of my library, are loaded correctly (crux) [1] I don't use modules like Roman, I use Maven modules and, like you, I have a hierarchy of pom's Hiedra De: Greg Dove <[email protected]> Enviado el: jueves, 30 de diciembre de 2021 23:23 Para: [email protected] Asunto: Re: Compiling Modules (was Re: Load time is very slow) Sorry I have not been following these threads in detail because I have been (and am currently still) on vacation. AFAIK royale modules are not reliable in release mode. I don't know anyone who has had experience otherwise. I did try testing them some time ago and that was my experience, and I believe we had similar feedback from others in the community (who were early users) that it was working for them in the debug build, but not the release build. Perhaps it can work in very simple cases in release builds, but beyond that I think the work on them is not complete. If there are others in the community whose experience is different and can confirm that things are working for them in release builds, please let us know. Maria, it is also possible that in your case, that use of Crux inside modules is another layer of complexity in release mode, because I did not test that when I did the original work on Crux. Was this working at some point in the past and it has now stopped working? On Fri, Dec 31, 2021 at 11:10 AM Roman Isitua <[email protected]<mailto:[email protected]>> wrote: Yes. On Thu, 30 Dec 2021, 23:03 Harbs, <[email protected]<mailto:[email protected]>> wrote: Did you apply the input_file options to the module? On Dec 30, 2021, at 11:42 PM, Roman Isitua <[email protected]<mailto:[email protected]>> wrote: I have applied the js compiler option as follows <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true; -js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt </additionalCompilerOptions> I get the same error as before when attempting to launch the jewel module. <image.png> Same error trace. Uncaught TypeError: cm.valuesImpl.init is not a function at Rr.Mr.yl (Overview.js:786) at Function.iq.generateMXMLProperties (Overview.js:736) at Rr.hq.generateMXMLAttributes (Overview.js:546) at new Rr (Overview.js:804) at LN.J.loadHandler (FrontEnd.js:1967) FrontEnd.js:1640 Uncaught TypeError: M is not a function at oM.J.handleMouseOut (FrontEnd.js:1640) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:248) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) FrontEnd.js:1640 Uncaught TypeError: M is not a function at oM.J.handleMouseOver (FrontEnd.js:1640) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:248) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) FrontEnd.js:1640 Uncaught TypeError: M is not a function at oM.J.handleMouseOut (FrontEnd.js:1640) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:248) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) FrontEnd.js:1640 Uncaught TypeError: M is not a function at oM.J.handleMouseOver (FrontEnd.js:1640) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:248) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) FrontEnd.js:1640 Uncaught TypeError: M is not a function at oM.J.handleMouseOut (FrontEnd.js:1640) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:248) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) FrontEnd.js:1640 Uncaught TypeError: M is not a function at oM.J.handleMouseOver (FrontEnd.js:1640) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:248) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) FrontEnd.js:1640 Uncaught TypeError: M is not a function at oM.J.handleMouseOut (FrontEnd.js:1640) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:248) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype') at P (Overview.js:56) at SG.convert (FrontEnd.js:904) at ny (FrontEnd.js:248) at HTMLElement.iy (FrontEnd.js:125) at HTMLElement.b (FrontEnd.js:121) On Thu, Dec 30, 2021 at 6:56 PM Harbs <[email protected]<mailto:[email protected]>> wrote: 1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works. 2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification For a pom, it would look something like this (adjust your paths to match your setup): Main app: <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions> Module: <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions> On Dec 30, 2021, at 7:43 PM, Roman Isitua <[email protected]<mailto:[email protected]>> wrote: I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email. On Thu, Dec 30, 2021 at 6:22 PM Harbs <[email protected]<mailto:[email protected]>> wrote: Roman, can you share your full compiler options? I decided to remove the below settings completely -export-public-symbols=false -prevent-rename-protected-symbols=false -prevent-rename-public-symbols=false -prevent-rename-internal-symbols=false I enabled the below settings -js-dynamic-access-unknown-members=true; -js-default-initializers=true The release version starts up Hiedra, that’s great! On Dec 30, 2021, at 7:15 PM, Roman Isitua <[email protected]<mailto:[email protected]>> wrote: Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <[email protected]<mailto:[email protected]>> wrote: Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop? Hiedra De: Roman Isitua <[email protected]<mailto:[email protected]>> Enviado el: jueves, 30 de diciembre de 2021 16:52 Para: [email protected]<mailto:[email protected]> Asunto: Re: Compiling Modules (was Re: Load time is very slow) I decided to remove the below settings completely -export-public-symbols=false -prevent-rename-protected-symbols=false -prevent-rename-public-symbols=false -prevent-rename-internal-symbols=false I enabled the below settings -js-dynamic-access-unknown-members=true; -js-default-initializers=true The release version starts up <image001.png> <image002.png> However, the moment I launch a module. I get the below error <image003.png> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu). So my current observation is that by retaining only two settings -js-dynamic-access-unknown-members=true; -js-default-initializers=true The release module starts up but the app fails whenever I launch a module. The smallest size settings in the documentation do not work. The app does not start up. -export-public-symbols=false -prevent-rename-protected-symbols=false -prevent-rename-public-symbols=false -prevent-rename-internal-symbols=false The error trace is below Uncaught TypeError: cm.valuesImpl.init is not a function at Wr.Rr.pl<http://wr.rr.pl/> (Overview.js:792) at Function.mq.generateMXMLProperties (Overview.js:743) at Wr.lq.generateMXMLAttributes (Overview.js:551) at new Wr (Overview.js:810) at QN.J.loadHandler (FrontEnd.js:1978) 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype') at P (Overview.js:56) at VG.convert (FrontEnd.js:910) at ny (FrontEnd.js:250) at HTMLElement.iy (FrontEnd.js:125) at HTMLElement.b (FrontEnd.js:121) FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOut (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOver (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOver @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOut (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOut @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOver (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOver @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOut (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOut @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOver (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOver @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOut (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOut @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOver (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOver @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 FrontEnd.js:1649 Uncaught TypeError: M is not a function at sM.J.handleMouseOut (FrontEnd.js:1649) at Function.ny [as googFireListener] (FrontEnd.js:123) at ny (FrontEnd.js:250) at HTMLAnchorElement.iy (FrontEnd.js:125) at HTMLAnchorElement.b (FrontEnd.js:121) J.handleMouseOut @ FrontEnd.js:1649 ny @ FrontEnd.js:123 ny @ FrontEnd.js:250 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <[email protected]<mailto:[email protected]>> wrote: I get the same error even when I set the -js-dynamic-access-unknown-members=true; On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <[email protected]<mailto:[email protected]>> wrote: Using the below settings, -export-public-symbols=false -prevent-rename-protected-symbols=false -prevent-rename-public-symbols=false -prevent-rename-internal-symbols=false -js-dynamic-access-unknown-members=false; -js-default-initializers=true Debug version runs fine. The release version does not start up <image004.png> I get the below errors Uncaught TypeError: Cannot read properties of undefined (reading 'apply') at KE.hm (FrontEnd.js:1600) at XE.M.Fb (FrontEnd.js:943) at XE.M.uh (FrontEnd.js:937) at FE.M.na<http://fe.m.na/> (FrontEnd.js:497) at FE.M.v (FrontEnd.js:497) at dR.M.S (FrontEnd.js:213) at dR.Nz.S (FrontEnd.js:217) at dR.M.start (FrontEnd.js:1396) at index.html:45 :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found) FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class. On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <[email protected]<mailto:[email protected]>> wrote: Hi Harb, Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings. Regards, On Thu, Dec 30, 2021 at 10:59 AM Harbs <[email protected]<mailto:[email protected]>> wrote: Sorry for my deal in responding. Let’s take a step back. I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification Are you using those options? On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <[email protected]<mailto:[email protected]>> wrote: Hi, Let me join you with these tests.... @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error: Message on the PURGE CONSOLE is displayed: Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead Message in the IDE Window: Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11) at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65) at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10) at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25) at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23) at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26) at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37) at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12) Call stack: <image003.png> [INFO] Executing MXMLC in tool group Royale with args: [ -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml, -js-default-initializers=true, -source-map=true, -js-dynamic-access-unknown-members=true, -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient, -keep-code-with-metadata=Inject, -show-binding-warnings=false, -export-public-symbols=false, -prevent-rename-protected-symbols=false, -prevent-rename-internal-symbols=false, -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript, -compiler.targets=JSRoyale, D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml The release execution does not change, the error is the same as before (SDK compilation from the develop branch): Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined. at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771) at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365) at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441) at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139) at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820) at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472) at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66) at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452) at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454) at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549) The main difference: project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error. Hiedra De: Roman Isitua <[email protected]<mailto:[email protected]>> Enviado el: martes, 28 de diciembre de 2021 15:55 Para: [email protected]<mailto:[email protected]> Asunto: Re: Load time is very slow @Harb I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode. I get the following error when I attempt to launch a module <image001.png> The module loads fine in debug mode <image002.png> Snippets of the log Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function at Rr.Mr.yl (Overview.js:786) at Function.iq.generateMXMLProperties (Overview.js:736) at Rr.hq.generateMXMLAttributes (Overview.js:546) at new Rr (Overview.js:804) at LN.J.loadHandler (FrontEnd.js:1967) Mr.yl @ Overview.js:786 iq.generateMXMLProperties @ Overview.js:736 hq.generateMXMLAttributes @ Overview.js:546 Rr @ Overview.js:804 J.loadHandler @ FrontEnd.js:1967 load (async) LN.loadModule @ FrontEnd.js:1965 dN.loadModule @ FrontEnd.js:2406 LD.Un @ FrontEnd.js:1809 ny @ FrontEnd.js:123 ny @ FrontEnd.js:248 iy @ FrontEnd.js:125 b @ FrontEnd.js:121 I have attached the full log to this email. On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <[email protected]<mailto:[email protected]>> wrote: Hi Maria, Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode. On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <[email protected]<mailto:[email protected]>> wrote: Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release. Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double. In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had. A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production. I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman. @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch? Hiedra De: Harbs <[email protected]<mailto:[email protected]>> Enviado el: lunes, 27 de diciembre de 2021 18:32 Para: [email protected]<mailto:[email protected]> Asunto: Re: Load time is very slow That doesn’t sound right. Are you sure you’re compiling debug and not release? That sounds like release build times. On Dec 27, 2021, at 3:31 PM, Roman Isitua <[email protected]<mailto:[email protected]>> wrote: Wow ! You are using a workstation with a bleeding edge processor. I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s. My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise. <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
