-1

Worklight 5.06 and Dojo 1.8. The app works on android emulator and web browser but doesn't works on real device. This is the logcat:

    08-08 14:58:35.520: D/dalvikvm(4470): GC_CONCURRENT freed 437K, 8% free 6855K/7431K, paused 1ms+1ms
08-08 14:58:36.880: D/dalvikvm(4470): GC_CONCURRENT freed 520K, 9% free 6851K/7495K, paused 1ms+2ms
08-08 14:58:37.330: D/dalvikvm(4470): GC_CONCURRENT freed 381K, 9% free 6858K/7495K, paused 1ms+1ms
08-08 14:58:37.890: D/dalvikvm(4470): GC_CONCURRENT freed 435K, 9% free 6856K/7495K, paused 1ms+1ms
08-08 14:58:38.530: D/dalvikvm(4470): GC_CONCURRENT freed 404K, 9% free 6856K/7495K, paused 2ms+2ms
08-08 14:58:39.390: D/dalvikvm(4470): GC_CONCURRENT freed 501K, 9% free 6861K/7495K, paused 1ms+2ms
08-08 14:58:39.870: D/dalvikvm(4470): GC_CONCURRENT freed 504K, 9% free 6861K/7495K, paused 1ms+2ms
08-08 14:58:40.590: D/dalvikvm(4470): GC_CONCURRENT freed 406K, 9% free 6869K/7495K, paused 2ms+2ms
08-08 14:58:40.630: D/dalvikvm(4470): GC_CONCURRENT freed 523K, 9% free 6855K/7495K, paused 2ms+2ms
08-08 14:58:41.360: D/dalvikvm(4470): GC_CONCURRENT freed 405K, 9% free 6852K/7495K, paused 2ms+2ms
08-08 14:58:43.910: D/dalvikvm(4470): GC_CONCURRENT freed 446K, 9% free 6854K/7495K, paused 2ms+2ms
08-08 14:58:44.170: D/WLDroidGap(4470): Finished copying files to local storage...
08-08 14:58:44.480: D/WLDroidGap(4470): no need to check web resource integrity
08-08 14:58:48.210: D/dalvikvm(4470): GC_CONCURRENT freed 382K, 9% free 6864K/7495K, paused 6ms+2ms
08-08 14:58:48.240: D/CordovaWebView(4470): >>> loadUrl(file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.240: D/PluginManager(4470): init()
08-08 14:58:48.250: D/CordovaWebView(4470): >>> loadUrlNow()
08-08 14:58:48.260: D/DroidGap(4470): onMessage(onPageStarted,file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.300: D/chromium(4470): Unknown chromium error: -6
08-08 14:58:48.480: D/Cordova(4470): onPageFinished(file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.480: D/DroidGap(4470): onMessage(onNativeReady,null)
08-08 14:58:48.480: D/DroidGap(4470): onMessage(onPageFinished,file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.490: I/SqliteDatabaseCpp(4470): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/com.MobileACG/databases/webview.db
08-08 14:58:48.490: I/SqliteDatabaseCpp(4470): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27701 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/com.MobileACG/databases/webview.db
08-08 14:58:48.510: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:48.510: D/DroidGap(4470): onMessage(networkconnection,wifi)
08-08 14:58:48.510: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:48.520: D/DroidGap(4470): onMessage(spinner,stop)
08-08 14:58:48.570: D/CordovaWebView(4470): >>> loadUrl(file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:48.570: D/CordovaWebView(4470): >>> loadUrlNow()
08-08 14:58:48.570: D/DroidGap(4470): onMessage(onPageStarted,file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:50.160: D/Cordova(4470): onPageFinished(file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:50.160: D/DroidGap(4470): onMessage(onNativeReady,null)
08-08 14:58:50.160: D/DroidGap(4470): onMessage(onPageFinished,file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:50.180: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:50.180: D/DroidGap(4470): onMessage(networkconnection,wifi)
08-08 14:58:50.190: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:50.190: D/DroidGap(4470): onMessage(spinner,stop)
08-08 14:58:50.190: D/MobileACG(4470): ondeviceready event dispatched
08-08 14:58:50.200: D/MobileACG(4470): wlclient init started
08-08 14:58:50.200: D/MobileACG(4470): Read cookies: null
08-08 14:58:50.210: D/MobileACG(4470): CookieMgr read cookies: {}
08-08 14:58:50.220: D/MobileACG(4470): before: app init onSuccess
08-08 14:58:50.220: D/MobileACG(4470): after: app init onSuccess
08-08 14:58:50.220: D/MobileACG(4470): wlclient init success
08-08 14:58:50.360: D/CordovaLog(4470): Error: multipleDefine
08-08 14:58:50.360: E/Web Console(4470): Error: multipleDefine at file:///data/data/com.MobileACG/files/www/default/dojo/dojo.js:26
08-08 14:58:50.480: D/DroidGap(4470): onMessage(spinner,stop)
08-08 14:58:51.010: D/chromium(4470): Unknown chromium error: -6
08-08 14:58:51.180: D/CordovaLog(4470): Error: scriptError
08-08 14:58:51.180: E/Web Console(4470): Error: scriptError at file:///data/data/com.MobileACG/files/www/default/dojo/dojo.js:26

This is commonInit()

function creaOggettiDojo(){
    busy.hide();//nascondo barra di caricamento
    require(["dojo/ready",
             "dojo/store/Memory",
             "dojox/mobile/EdgeToEdgeStoreList",
             "dojox/mobile",
             "dojox/mobile/parser"
           //"dojox/grid/DataGrid"

             ], function(ready, Memory, EdgeToEdgeStoreList){

        busy = new WL.BusyIndicator("content", { text: "Caricamento dati clienti ..."});

This is dojo js:

function wlCommonInit(){
    require([ "dojo/core-web-layer", "dojo/mobile-ui-layer",
            "dojo/mobile-compat-layer" ], dojoInit);

function dojoInit() {


require([ "dojo","dojo/request/script", "dojo/parser", "dojox/mobile", "dojox/mobile/compat", "dojox/mobile/deviceTheme",
          "dojox/mobile/ScrollableView",
          "dojox/mobile/ScreenSizeAware",
          "dojox/mobile/FixedSplitter",
          "dojox/mobile/Container",
          "dojox/mobile/Heading",
          "dojox/mobile/EdgeToEdgeList",
          "dojox/mobile/ListItem",
          "dojox/mobile/RoundRect",
          "dojox/mobile/TabBar",
          "dojox/mobile/TabBarButton",
          "dojox/mobile/Button",
          "dojox/mobile/GridLayout",
          "dojox/mobile/Pane",
          "dojox/mobile/ScrollablePane",
          "dijit/form/DataList",
          "dojox/mobile/ComboBox",
          "dojox/mobile/EdgeToEdgeStoreList",
          "dojo/store/Memory",
          "dojox/mobile/EdgeToEdgeDataList",
          "dojo/data/ItemFileReadStore", 
          "dojo/data/ItemFileWriteStore",
          "dojox/mobile/ExpandingTextArea",
          "dojox/mobile/ContentPane",

          ],

              function(dojo) {
creaOggettiDojo();//Crea gli oggetti programmaticamente

this is creaOggettiDojo

function creaOggettiDojo(){
    busy.hide();//nascondo barra di caricamento
    require(["dojo/ready",
             "dojo/store/Memory",
             "dojox/mobile/EdgeToEdgeStoreList",
             "dojox/mobile",
             "dojox/mobile/parser"
           //"dojox/grid/DataGrid"

             ], function(ready, Memory, EdgeToEdgeStoreList){

        busy = new WL.BusyIndicator("content", { text: "Caricamento dati clienti ..."});

The first "busy" isn't hide.

userA91
  • 47
  • 1
  • 7

2 Answers2

1

Your description of the symptoms seems very close to what is described in Worklight core-web-layer.js errors . Now, as far as I know, this holds for Worklight 6.0 (and should be fixed in an updated version), while you say you are using WL 5.0.6. In any case, I think it would be worth upgrading to the latest available patch of the most recent Worklight version.

Community
  • 1
  • 1
Adrian Vasiliu
  • 396
  • 1
  • 5
0

Just ran into this problem on a device, in my environment the problem was that the device was set to another language that was not US English, dojo was trying to load localization settings that are not included with the dojo build xml.

I would try to run your app on firefox and check the net tab of firefox, you should see what modules dojo is getting a 404 with.

tik27
  • 2,698
  • 1
  • 16
  • 25