Topic
5 replies Latest Post - ‏2013-02-08T00:36:53Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts
ACCEPTED ANSWER

Pinned topic Error when running an Android Application

‏2013-01-24T18:19:17Z |
I'm having an issue when creating just a vanilla android application. Every time the application launches I see the following error in the web console logs

01-22 23:11:08.439: D/CordovaLog(1312): processMessage failed: Message: S01 Utils1701113521 N
01-22 23:11:08.439: D/CordovaLog(1312): file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js: Line 1092 : processMessage failed: Message: S01 Utils1701113521 N
01-22 23:11:08.439: I/Web Console(1312): processMessage failed: Message: S01 Utils1701113521 N at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1092
01-22 23:11:08.549: D/CordovaLog(1312): processMessage failed: Error: TypeError: Object object Object has no method 'init'
01-22 23:11:08.549: D/CordovaLog(1312): file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js: Line 1093 : processMessage failed: Error: TypeError: Object object Object has no method 'init'
01-22 23:11:08.549: I/Web Console(1312): processMessage failed: Error: TypeError: Object object Object has no method 'init' at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1093
01-22 23:11:08.669: D/CordovaLog(1312): processMessage failed: Stack: TypeError: Object object Object has no method 'init'
01-22 23:11:08.669: D/CordovaLog(1312): at object Object.init (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlgap.android.js:576:27)
01-22 23:11:08.669: D/CordovaLog(1312): at onEnvInit (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:865:28)
01-22 23:11:08.669: D/CordovaLog(1312): at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:1114:17
01-22 23:11:08.669: D/CordovaLog(1312): at Object.captureReturnValue as success (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:978:20)
01-22 23:11:08.669: D/CordovaLog(1312): at Object.callbackFromNative (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:290:46)
01-22 23:11:08.669: D/CordovaLog(1312): at processMessage (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1087:21)
01-22 23:11:08.669: D/CordovaLog(1312): at Function.processMessages (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1125:17)
01-22 23:11:08.669: D/CordovaLog(1312): at Object.androidExec as exec (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:987:21)
01-22 23:11:08.669: D/CordovaLog(1312): at object Object.readUserPref (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlgap.android.js:55:20)
01-22 23:11:08.669: D/CordovaLog(1312): at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:1095:28
01-22 23:11:08.669: D/CordovaLog(1312): file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js: Line 1094 : processMessage failed: Stack: TypeError: Object object Object has no method 'init'
01-22 23:11:08.669: D/CordovaLog(1312): at object Object.init (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlgap.android.js:576:27)
01-22 23:11:08.669: D/CordovaLog(1312): at onEnvInit (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:865:28)
01-22 23:11:08.669: D/CordovaLog(1312): at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:1114:17
01-22 23:11:08.669: D/CordovaLog(1312): at Object.captureReturnValue as success (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:978:20)
01-22 23:11:08.669: D/CordovaLog(1312): at Object.callbackFromNative (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:290:46)
01-22 23:11:08.669: D/CordovaLog(1312): at processMessage (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1087:21)
01-22 23:11:08.669: D/CordovaLog(1312): at Function.processMessages (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1125:17)
01-22 23:11:08.669: D/CordovaLog(1312): at Object.androidExec as exec (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:987:21)
01-22 23:11:08.669: D/CordovaLog(1312): at object Object.readUserPref (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlgap.android.js:55:20)
01-22 23:11:08.669: D/CordovaLog(1312): at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:1095:28
01-22 23:11:08.679: I/Web Console(1312): processMessage failed: Stack: TypeError: Object object Object has no method 'init'
01-22 23:11:08.679: I/Web Console(1312): at object Object.init (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlgap.android.js:576:27)
01-22 23:11:08.679: I/Web Console(1312): at onEnvInit (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:865:28)
01-22 23:11:08.679: I/Web Console(1312): at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:1114:17
01-22 23:11:08.679: I/Web Console(1312): at Object.captureReturnValue as success (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:978:20)
01-22 23:11:08.679: I/Web Console(1312): at Object.callbackFromNative (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:290:46)
01-22 23:11:08.679: I/Web Console(1312): at processMessage (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1087:21)
01-22 23:11:08.679: I/Web Console(1312): at Function.processMessages (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1125:17)
01-22 23:11:08.679: I/Web Console(1312): at Object.androidExec as exec (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:987:21)
01-22 23:11:08.679: I/Web Console(1312): at object Object.readUserPref (file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlgap.android.js:55:20)
01-22 23:11:08.679: I/Web Console(1312): at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/wlclient.js:1095:28 at file:///data/data/com.AndroidNativePages/files/www/default/wlclient/js/cordova.js:1094

If I import the sample projects I don't see this issue.

My setup is Eclipse Juno(4.2), Worklight 5.0.5.20121129-1027, Android Toolkit 21.0.1

Any help would be greatly appreciated.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Error when running an Android Application

    ‏2013-01-24T18:28:01Z  in response to SystemAdmin
    Could you also please add the exact steps you have taken from creating the Worklight project to running the app on the device/emulator?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Error when running an Android Application

      ‏2013-01-24T20:57:17Z  in response to IdanAdar
      Sure
      • Add new worklight project -> hybrid application
      • Set name without selecting any toolkits
      • Once project and application are created right click on application an select new -> worklight environment, select android
      • right click on application and select run as -> build and deploy all
      • Once built right click on the android project created below and select run as -> android application

      Once it starts running you can see the log messages in the log cat.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Error when running an Android Application

    ‏2013-01-27T07:09:49Z  in response to SystemAdmin
    Quite strange.
    I am using IBM Worklight 5.0.5.1 with the same Android SDK version as you.

    Creating a new Worklight project and application, followed by adding the Android environment, builing and launching a Galaxy Nexus device (Android 4.2), have all passed successfully with no errors.

    Is this a vanilla installation of Worklight?
    Could I ask you to have another instance of Eclipse with a new workspace and install the latest Worklight on it?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Error when running an Android Application

      ‏2013-01-28T18:06:42Z  in response to IdanAdar
      I will try that, but I also forgot to mention I'm running mac osx 10.8.2 and not windows.
      • SystemAdmin
        SystemAdmin
        2327 Posts
        ACCEPTED ANSWER

        Re: Error when running an Android Application

        ‏2013-02-08T00:36:53Z  in response to SystemAdmin
        Note: IBM forums are in the process of migrating to a new format. During migration the forums will be frozen and in read-only mode. If you wish to continue this thread discussion please post it on stackoverflow, where the Worklight team and others can respond.

        See the Forum Migration announce post for more details. Thank you.

        Barbara Hampson, Manager, IBM Worklight