Topic
  • 12 replies
  • Latest Post - ‏2012-11-26T11:45:48Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts

Pinned topic When Test in Emulator Connection Failed error

‏2012-11-21T07:57:46Z |
Hi.

I'm trying to run a simple application with IBM Worklight developer edition 1.0.0.v20120606_0304.
Android version 4.2.

I'm testing it in an Android Environment using the worklight console and also an Android emulator.

I edited application-descripter as
<worklightServerRootURL>http://my-ip-address:8080</worklightServerRootURL>
and also increased the Time out
super.setIntegerProperty("loadUrlTimeoutValue", 60000);
The problem I'm facing is, After successful deployement, The appliaction starts on the android emulator and following popup occurs on the emulator's screen
The connection to the server was unsuccessful. (file:///data/data/com.scma/files/www/default/scma.html)

And also connection Failed.

Logcat as under.


11-21 12:46:09.830: E/scma(621): Client init failed. Connection to the service is not available.
11-21 12:46:09.861: I/Choreographer(621): Skipped 43 frames! The application may be doing too much work on its main thread.
11-21 12:46:10.290: I/Choreographer(621): Skipped 32 frames! The application may be doing too much work on its main thread.
11-21 12:46:10.530: I/Choreographer(621): Skipped 246 frames! The application may be doing too much work on its main thread.
11-21 12:46:11.080: D/CordovaLog(621): Uncaught TypeError: undefined is not a function
11-21 12:46:11.080: D/CordovaLog(621): file:///data/data/com.scma/files/www/default/scma.html: Line 34 : Uncaught TypeError: undefined is not a function
11-21 12:46:11.090: E/Web Console(621): Uncaught TypeError: undefined is not a function at file:///data/data/com.scma/files/www/default/scma.html:34
11-21 12:46:11.570: I/Choreographer(621): Skipped 39 frames! The application may be doing too much work on its main thread.
11-21 12:46:11.620: I/Choreographer(621): Skipped 46 frames! The application may be doing too much work on its main thread.
11-21 12:46:11.661: I/Choreographer(621): Skipped 37 frames! The application may be doing too much work on its main thread.
11-21 12:46:11.710: I/Choreographer(621): Skipped 30 frames! The application may be doing too much work on its main thread.
11-21 12:46:11.750: I/Choreographer(621): Skipped 47 frames! The application may be doing too much work on its main thread.
11-21 12:46:11.811: I/Choreographer(621): Skipped 50 frames! The application may be doing too much work on its main thread.
11-21 12:46:38.250: D/dalvikvm(621): GC_CONCURRENT freed 354K, 11% free 5826K/6535K, paused 75ms+5ms, total 124ms
11-21 12:47:34.710: D/dalvikvm(621): GC_CONCURRENT freed 462K, 13% free 5782K/6599K, paused 74ms+4ms, total 116ms
11-21 12:48:26.371: D/dalvikvm(621): GC_CONCURRENT freed 384K, 13% free 5782K/6599K, paused 78ms+4ms, total 118ms
11-21 12:49:18.091: D/dalvikvm(621): GC_CONCURRENT freed 384K, 13% free 5782K/6599K, paused 72ms+5ms, total 114ms

Kindly help me in this Regard.
Thanks.
  • IdanAdar
    IdanAdar
    741 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-21T08:14:16Z  
    In Android 4.2, Google has made changes that prevent from Cordova (2.2) to work properly.
    I suspect this will also prevent Cordova 1.6.1 (the one available in Worklight 5.0.0.x) to work properly.

    My suggestion for the time being would be to change your AVD from Android 4.2 to 4.1

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

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-21T10:25:46Z  
    • IdanAdar
    • ‏2012-11-21T08:14:16Z
    In Android 4.2, Google has made changes that prevent from Cordova (2.2) to work properly.
    I suspect this will also prevent Cordova 1.6.1 (the one available in Worklight 5.0.0.x) to work properly.

    My suggestion for the time being would be to change your AVD from Android 4.2 to 4.1

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    Hi Iden,

    Sorry i'm questionings again n again.
    Actually I developed and tested the app in android 4.1.2 and it was working fine.But when I move and setup the environment in live server and tested it on emulator it didnt work.first I used android 4.2 but when you suggested to use 4.1 I run the application on android 4.1 but no impact.
    Error persist and the logcat as under:

    11-21 15:16:34.999: E/Trace(622): error opening trace file: No such file or directory (2)
    11-21 15:16:35.809: I/CordovaLog(622): Changing log level to DEBUG(3)
    11-21 15:16:35.889: I/CordovaLog(622): Found preference for classicRender
    11-21 15:16:35.889: D/DroidGap(622): DroidGap.onCreate()
    11-21 15:16:36.139: D/dalvikvm(622): GC_CONCURRENT freed 80K, 8% free 5620K/6087K, paused 31ms+25ms, total 137ms
    11-21 15:16:36.259: D/DroidGap(622): DroidGap.init()
    11-21 15:16:36.448: D/WLDroidGap(622): New installation/upgrade detected, copying resources and saving new checksum
    11-21 15:16:36.809: D/WLDroidGap(622): Started copying files to local storage...
    11-21 15:16:44.039: D/dalvikvm(622): GC_CONCURRENT freed 426K, 12% free 5698K/6471K, paused 26ms+36ms, total 154ms
    11-21 15:16:45.109: D/dalvikvm(622): GC_CONCURRENT freed 493K, 14% free 5677K/6535K, paused 75ms+5ms, total 145ms
    11-21 15:16:49.569: D/WLDroidGap(622): Finished copying files to local storage...
    11-21 15:16:49.569: D/WLDroidGap(622): no need to check web resource integrity
    11-21 15:16:49.719: D/DroidGap(622): DroidGap.loadUrl(file:///data/data/com.scma/files/www/skinLoader.html)
    11-21 15:16:49.719: D/DroidGap(622): DroidGap: url=file:///data/data/com.scma/files/www/skinLoader.html baseUrl=file:///data/data/com.scma/files/www/
    11-21 15:16:49.729: D/PluginManager(622): init()
    11-21 15:16:49.959: D/dalvikvm(622): GC_CONCURRENT freed 403K, 13% free 5699K/6535K, paused 73ms+52ms, total 326ms
    11-21 15:16:49.959: I/Choreographer(622): Skipped 98 frames! The application may be doing too much work on its main thread.
    11-21 15:16:49.969: D/SoftKeyboardDetect(622): Ignore this event
    11-21 15:16:50.139: I/Choreographer(622): Skipped 169 frames! The application may be doing too much work on its main thread.
    11-21 15:16:50.339: D/gralloc_goldfish(622): Emulator without GPU emulation detected.
    11-21 15:16:50.599: I/Choreographer(622): Skipped 130 frames! The application may be doing too much work on its main thread.
    11-21 15:16:50.599: D/SoftKeyboardDetect(622): Ignore this event
    11-21 15:16:52.118: D/chromium(622): Unknown chromium error: -6
    11-21 15:16:52.368: E/SQLiteLog(622): (14) cannot open file at line 30174 of 00bb9c9ce4
    11-21 15:16:52.380: E/SQLiteLog(622): (14) os_unix.c:30174: (2) open(/CachedGeoposition.db) -
    11-21 15:16:52.380: D/WebKit(622): ERROR:
    11-21 15:16:52.380: D/WebKit(622): SQLite database failed to load from /CachedGeoposition.db
    11-21 15:16:52.380: D/WebKit(622): Cause - unable to open database file
    11-21 15:16:52.380: D/WebKit(622): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
    11-21 15:16:52.819: D/DroidGap(622): DroidGap.loadUrl(file:///data/data/com.scma/files/www/default/scma.html)
    11-21 15:16:52.819: D/DroidGap(622): DroidGap: url=file:///data/data/com.scma/files/www/default/scma.html baseUrl=file:///data/data/com.scma/files/www/
    11-21 15:16:52.819: D/PluginManager(622): init()
    11-21 15:16:53.039: D/CordovaLog(622): JSCallback Error: Request failed.
    11-21 15:16:53.048: D/CordovaLog(622): file:///data/data/com.scma/files/www/default/wlclient/js/cordova.js: Line 3566 : JSCallback Error: Request failed.
    11-21 15:16:53.048: I/Web Console(622): JSCallback Error: Request failed. at file:///data/data/com.scma/files/www/default/wlclient/js/cordova.js:3566
    11-21 15:17:02.019: D/CordovaLog(622): Uncaught TypeError: Cannot set property 'touchstart' of undefined
    11-21 15:17:02.019: D/CordovaLog(622): file:///data/data/com.scma/files/www/default/js/jquery_mobile/jquery.mobile-1.1.0.min.js: Line 33 : Uncaught TypeError: Cannot set property 'touchstart' of undefined
    11-21 15:17:02.019: E/Web Console(622): Uncaught TypeError: Cannot set property 'touchstart' of undefined at file:///data/data/com.scma/files/www/default/js/jquery_mobile/jquery.mobile-1.1.0.min.js:33
    11-21 15:17:15.130: D/chromium(622): Unknown chromium error: -6
    11-21 15:17:16.578: I/Choreographer(622): Skipped 81 frames! The application may be doing too much work on its main thread.
    11-21 15:17:16.929: I/Choreographer(622): Skipped 87 frames! The application may be doing too much work on its main thread.
    11-21 15:17:17.189: D/CordovaLog(622): XMLHttpRequest cannot load http://127.0.0.1:49327/c554fdc1-1334-46f5-983a-ead910f26285. Origin null is not allowed by Access-Control-Allow-Origin.
    11-21 15:17:17.189: D/CordovaLog(622): null: Line 1 : XMLHttpRequest cannot load http://127.0.0.1:49327/c554fdc1-1334-46f5-983a-ead910f26285. Origin null is not allowed by Access-Control-Allow-Origin.
    11-21 15:17:17.189: E/Web Console(622): XMLHttpRequest cannot load http://127.0.0.1:49327/c554fdc1-1334-46f5-983a-ead910f26285. Origin null is not allowed by Access-Control-Allow-Origin. at null:1
    11-21 15:17:17.219: D/CordovaLog(622): JSCallback Error: Request failed.
    11-21 15:17:17.219: D/CordovaLog(622): file:///data/data/com.scma/files/www/default/wlclient/js/cordova.js: Line 3566 : JSCallback Error: Request failed.
    11-21 15:17:17.219: I/Web Console(622): JSCallback Error: Request failed. at file:///data/data/com.scma/files/www/default/wlclient/js/cordova.js:3566
    11-21 15:17:17.399: D/scma(622): ondeviceready event dispatched
    11-21 15:17:17.463: I/Choreographer(622): Skipped 61 frames! The application may be doing too much work on its main thread.
    11-21 15:17:17.559: D/scma(622): wlclient init started
    11-21 15:17:17.929: D/scma(622): Read cookies: null
    11-21 15:17:17.939: I/Choreographer(622): Skipped 169 frames! The application may be doing too much work on its main thread.
    11-21 15:17:18.089: D/scma(622): CookieMgr read cookies: {}
    11-21 15:17:18.089: I/Choreographer(622): Skipped 75 frames! The application may be doing too much work on its main thread.
    11-21 15:17:18.408: I/Choreographer(622): Skipped 146 frames! The application may be doing too much work on its main thread.
    11-21 15:17:18.630: I/Choreographer(622): Skipped 166 frames! The application may be doing too much work on its main thread.
    11-21 15:17:18.719: I/Choreographer(622): Skipped 80 frames! The application may be doing too much work on its main thread.
    11-21 15:17:18.809: I/Choreographer(622): Skipped 67 frames! The application may be doing too much work on its main thread.
    11-21 15:17:18.899: I/Choreographer(622): Skipped 82 frames! The application may be doing too much work on its main thread.
    11-21 15:17:18.969: I/Choreographer(622): Skipped 57 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.019: I/Choreographer(622): Skipped 45 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.099: I/Choreographer(622): Skipped 74 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.165: I/Choreographer(622): Skipped 46 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.198: I/Choreographer(622): Skipped 36 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.339: I/Choreographer(622): Skipped 127 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.419: I/Choreographer(622): Skipped 67 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.499: I/Choreographer(622): Skipped 36 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.549: I/Choreographer(622): Skipped 45 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.621: I/Choreographer(622): Skipped 46 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.719: I/Choreographer(622): Skipped 96 frames! The application may be doing too much work on its main thread.
    11-21 15:17:19.819: I/Choreographer(622): Skipped 54 frames! The application may be doing too much work on its main thread.
    11-21 15:17:20.399: I/Choreographer(622): Skipped 554 frames! The application may be doing too much work on its main thread.
    11-21 15:17:20.469: D/CordovaLog(622): XMLHttpRequest cannot load http://10.224.111.151:8080/apps/services/reach. Origin null is not allowed by Access-Control-Allow-Origin.
    11-21 15:17:20.469: D/CordovaLog(622): null: Line 1 : XMLHttpRequest cannot load http://10.224.111.151:8080/apps/services/reach. Origin null is not allowed by Access-Control-Allow-Origin.
    11-21 15:17:20.469: E/Web Console(622): XMLHttpRequest cannot load http://10.224.111.151:8080/apps/services/reach. Origin null is not allowed by Access-Control-Allow-Origin. at null:1
    11-21 15:17:20.569: I/Choreographer(622): Skipped 156 frames! The application may be doing too much work on its main thread.
    11-21 15:17:20.649: I/Choreographer(622): Skipped 77 frames! The application may be doing too much work on its main thread.
    11-21 15:17:20.809: I/Choreographer(622): Skipped 42 frames! The application may be doing too much work on its main thread.
    11-21 15:17:20.889: I/Choreographer(622): Skipped 74 frames! The application may be doing too much work on its main thread.
    11-21 15:17:20.979: I/Choreographer(622): Skipped 82 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.099: I/Choreographer(622): Skipped 117 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.209: I/Choreographer(622): Skipped 96 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.299: I/Choreographer(622): Skipped 37 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.448: I/Choreographer(622): Skipped 142 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.529: I/Choreographer(622): Skipped 70 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.659: I/Choreographer(622): Skipped 125 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.698: I/Choreographer(622): Skipped 42 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.809: I/Choreographer(622): Skipped 73 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.908: I/Choreographer(622): Skipped 43 frames! The application may be doing too much work on its main thread.
    11-21 15:17:21.979: I/Choreographer(622): Skipped 30 frames! The application may be doing too much work on its main thread.
    11-21 15:17:22.078: I/Choreographer(622): Skipped 45 frames! The application may be doing too much work on its main thread.
    11-21 15:17:22.179: I/Choreographer(622): Skipped 30 frames! The application may be doing too much work on its main thread.
    11-21 15:17:22.248: I/Choreographer(622): Skipped 60 frames! The application may be doing too much work on its main thread.
    11-21 15:17:22.328: I/Choreographer(622): Skipped 58 frames! The application may be doing too much work on its main thread.
    11-21 15:17:22.389: I/Choreographer(622): Skipped 60 frames! The application may be doing too much work on its main thread.
    11-21 15:17:22.459: I/Choreographer(622): Skipped 58 frames! The application may be doing too much work on its main thread.
    11-21 15:17:22.599: I/Choreographer(622): Skipped 36 frames! The application may be doing too much work on its main thread.


    Now what to do?

    Thanks.
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-22T07:35:03Z  
    • IdanAdar
    • ‏2012-11-21T08:14:16Z
    In Android 4.2, Google has made changes that prevent from Cordova (2.2) to work properly.
    I suspect this will also prevent Cordova 1.6.1 (the one available in Worklight 5.0.0.x) to work properly.

    My suggestion for the time being would be to change your AVD from Android 4.2 to 4.1

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    Hi Idan,

    I really need your help.I'm stuckd.I don't know why its not working.I done all you said.
    Attach is emulator error.
    Problem is the .apk file successfully load and installed in emulator. But when this applcation starts in emulator first show a long loading and the gives the Error:

    1.Failed to connect the server.
    2.The server was unable to process the request from the application.please try again
    3.Client init failed. Connection to the service is not available.

    This sort of messages come.
    Screen shot of Error message is also attached.
    For more info below is the logcat:


    11-22 12:18:45.029: E/Trace(616): error opening trace file: No such file or directory (2)
    11-22 12:18:45.419: I/CordovaLog(616): Changing log level to DEBUG(3)
    11-22 12:18:45.419: I/CordovaLog(616): Found preference for classicRender
    11-22 12:18:45.428: D/DroidGap(616): DroidGap.onCreate()
    11-22 12:18:45.598: D/dalvikvm(616): GC_CONCURRENT freed 81K, 8% free 5609K/6087K, paused 37ms+4ms, total 122ms
    11-22 12:18:45.699: D/DroidGap(616): DroidGap.init()
    11-22 12:18:45.839: D/WLDroidGap(616): New installation/upgrade detected, copying resources and saving new checksum
    11-22 12:18:46.249: D/WLDroidGap(616): Started copying files to local storage...
    11-22 12:18:53.069: D/dalvikvm(616): GC_CONCURRENT freed 426K, 12% free 5689K/6407K, paused 29ms+5ms, total 130ms
    11-22 12:18:54.079: D/dalvikvm(616): GC_CONCURRENT freed 512K, 13% free 5704K/6535K, paused 27ms+28ms, total 122ms
    11-22 12:18:59.329: D/WLDroidGap(616): Finished copying files to local storage...
    11-22 12:18:59.329: D/WLDroidGap(616): no need to check web resource integrity
    11-22 12:18:59.369: D/DroidGap(616): DroidGap.loadUrl(file:///data/data/com.scma/files/www/skinLoader.html)
    11-22 12:18:59.369: D/DroidGap(616): DroidGap: url=file:///data/data/com.scma/files/www/skinLoader.html baseUrl=file:///data/data/com.scma/files/www/
    11-22 12:18:59.369: D/PluginManager(616): init()
    11-22 12:18:59.449: D/SoftKeyboardDetect(616): Ignore this event
    11-22 12:18:59.509: I/Choreographer(616): Skipped 57 frames! The application may be doing too much work on its main thread.
    11-22 12:18:59.529: D/gralloc_goldfish(616): Emulator without GPU emulation detected.
    11-22 12:18:59.649: I/Choreographer(616): Skipped 59 frames! The application may be doing too much work on its main thread.
    11-22 12:18:59.649: D/SoftKeyboardDetect(616): Ignore this event
    11-22 12:18:59.969: D/dalvikvm(616): GC_CONCURRENT freed 388K, 13% free 5699K/6535K, paused 16ms+5ms, total 61ms
    11-22 12:19:01.549: D/chromium(616): Unknown chromium error: -6
    11-22 12:19:01.749: E/SQLiteLog(616): (14) cannot open file at line 30174 of 00bb9c9ce4
    11-22 12:19:01.759: E/SQLiteLog(616): (14) os_unix.c:30174: (2) open(/CachedGeoposition.db) -
    11-22 12:19:01.759: D/WebKit(616): ERROR:
    11-22 12:19:01.759: D/WebKit(616): SQLite database failed to load from /CachedGeoposition.db
    11-22 12:19:01.759: D/WebKit(616): Cause - unable to open database file
    11-22 12:19:01.759: D/WebKit(616): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
    11-22 12:19:02.209: D/DroidGap(616): DroidGap.loadUrl(file:///data/data/com.scma/files/www/default/scma.html)
    11-22 12:19:02.209: D/DroidGap(616): DroidGap: url=file:///data/data/com.scma/files/www/default/scma.html baseUrl=file:///data/data/com.scma/files/www/
    11-22 12:19:02.209: D/PluginManager(616): init()
    11-22 12:19:02.399: D/CordovaLog(616): JSCallback Error: Request failed.
    11-22 12:19:02.399: D/CordovaLog(616): file:///data/data/com.scma/files/www/default/wlclient/js/cordova.js: Line 3566 : JSCallback Error: Request failed.
    11-22 12:19:02.409: I/Web Console(616): JSCallback Error: Request failed. at file:///data/data/com.scma/files/www/default/wlclient/js/cordova.js:3566
    11-22 12:19:02.438: E/chromium(616): external/chromium/net/disk_cache/backend_impl.cc:1107: 1122/121902:ERROR:backend_impl.cc(1107) Critical error found -8
    11-22 12:19:02.459: W/chromium(616): external/chromium/net/disk_cache/storage_block-inl.h:119: 1122/121902:WARNING:storage_block-inl.h(119) Failed data load.
    11-22 12:19:10.449: D/CordovaLog(616): Uncaught TypeError: Cannot set property 'touchstart' of undefined
    11-22 12:19:10.449: D/CordovaLog(616): file:///data/data/com.scma/files/www/default/js/jquery_mobile/jquery.mobile-1.1.0.min.js: Line 33 : Uncaught TypeError: Cannot set property 'touchstart' of undefined
    11-22 12:19:10.459: E/Web Console(616): Uncaught TypeError: Cannot set property 'touchstart' of undefined at file:///data/data/com.scma/files/www/default/js/jquery_mobile/jquery.mobile-1.1.0.min.js:33
    11-22 12:19:22.459: D/chromium(616): Unknown chromium error: -6
    11-22 12:19:24.018: I/Choreographer(616): Skipped 85 frames! The application may be doing too much work on its main thread.
    11-22 12:19:24.348: I/Choreographer(616): Skipped 95 frames! The application may be doing too much work on its main thread.
    11-22 12:19:24.719: I/Choreographer(616): Skipped 31 frames! The application may be doing too much work on its main thread.
    11-22 12:19:24.768: D/scma(616): ondeviceready event dispatched
    11-22 12:19:24.859: D/scma(616): wlclient init started
    11-22 12:19:25.308: D/scma(616): Read cookies: null
    11-22 12:19:25.329: I/Choreographer(616): Skipped 193 frames! The application may be doing too much work on its main thread.
    11-22 12:19:25.428: D/scma(616): CookieMgr read cookies: {}
    11-22 12:19:25.449: I/Choreographer(616): Skipped 89 frames! The application may be doing too much work on its main thread.
    11-22 12:19:25.789: I/Choreographer(616): Skipped 134 frames! The application may be doing too much work on its main thread.
    11-22 12:19:25.919: I/Choreographer(616): Skipped 123 frames! The application may be doing too much work on its main thread.
    11-22 12:19:25.978: I/Choreographer(616): Skipped 36 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.018: I/Choreographer(616): Skipped 41 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.069: I/Choreographer(616): Skipped 46 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.118: I/Choreographer(616): Skipped 35 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.188: I/Choreographer(616): Skipped 41 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.249: I/Choreographer(616): Skipped 41 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.289: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.348: I/Choreographer(616): Skipped 42 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.409: I/Choreographer(616): Skipped 44 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.549: I/Choreographer(616): Skipped 45 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.589: I/Choreographer(616): Skipped 35 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.638: I/Choreographer(616): Skipped 40 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.678: I/Choreographer(616): Skipped 30 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.709: I/Choreographer(616): Skipped 31 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.869: I/Choreographer(616): Skipped 57 frames! The application may be doing too much work on its main thread.
    11-22 12:19:26.949: I/Choreographer(616): Skipped 48 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.109: I/Choreographer(616): Skipped 53 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.149: I/Choreographer(616): Skipped 34 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.188: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.253: I/Choreographer(616): Skipped 43 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.348: I/Choreographer(616): Skipped 40 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.490: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.539: I/Choreographer(616): Skipped 30 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.598: I/Choreographer(616): Skipped 33 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.678: I/Choreographer(616): Skipped 61 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.768: D/scma(616): Request http://10.224.111.151:8080/apps/services/api/scma/android/init
    11-22 12:19:27.799: I/Choreographer(616): Skipped 39 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.839: I/Choreographer(616): Skipped 35 frames! The application may be doing too much work on its main thread.
    11-22 12:19:27.959: I/Choreographer(616): Skipped 52 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.029: I/Choreographer(616): Skipped 33 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.099: I/Choreographer(616): Skipped 46 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.169: I/Choreographer(616): Skipped 40 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.228: I/Choreographer(616): Skipped 62 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.279: I/Choreographer(616): Skipped 37 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.359: I/Choreographer(616): Skipped 38 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.439: I/Choreographer(616): Skipped 41 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.509: I/Choreographer(616): Skipped 40 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.558: I/Choreographer(616): Skipped 46 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.608: I/Choreographer(616): Skipped 39 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.688: I/Choreographer(616): Skipped 49 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.759: I/Choreographer(616): Skipped 40 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.829: I/Choreographer(616): Skipped 41 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.868: I/Choreographer(616): Skipped 31 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.949: I/Choreographer(616): Skipped 46 frames! The application may be doing too much work on its main thread.
    11-22 12:19:28.978: E/scma(616): http://10.224.111.151:8080/apps/services/api/scma/android/init failure. state: 500, response: There is no zip file for scma@android@v4.1.2
    11-22 12:19:28.999: I/Choreographer(616): Skipped 48 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.039: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.079: I/Choreographer(616): Skipped 38 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.119: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.148: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.199: I/Choreographer(616): Skipped 44 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.240: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.348: E/scma(616): Client init failed. There is no zip file for scma@android@v4.1.2
    11-22 12:19:29.399: I/Choreographer(616): Skipped 32 frames! The application may be doing too much work on its main thread.
    11-22 12:19:29.899: I/Choreographer(616): Skipped 170 frames! The application may be doing too much work on its main thread.
    11-22 12:19:30.478: I/Choreographer(616): Skipped 50 frames! The application may be doing too much work on its main thread.
    11-22 12:19:30.549: I/Choreographer(616): Skipped 47 frames! The application may be doing too much work on its main thread.
    11-22 12:19:30.629: I/Choreographer(616): Skipped 54 frames! The application may be doing too much work on its main thread.
    11-22 12:19:30.719: I/Choreographer(616): Skipped 54 frames! The application may be doing too much work on its main thread.
    11-22 12:19:31.718: I/Choreographer(616): Skipped 40 frames! The application may be doing too much work on its main thread.
    11-22 12:19:31.799: I/Choreographer(616): Skipped 46 frames! The application may be doing too much work on its main thread.
    11-22 12:19:31.899: I/Choreographer(616): Skipped 55 frames! The application may be doing too much work on its main thread.
    11-22 12:19:32.598: I/Choreographer(616): Skipped 50 frames! The application may be doing too much work on its main thread.
    11-22 12:19:32.699: I/Choreographer(616): Skipped 73 frames! The application may be doing too much work on its main thread.
    11-22 12:19:32.809: I/Choreographer(616): Skipped 76 frames! The application may be doing too much work on its main thread.
    11-22 12:19:32.939: I/Choreographer(616): Skipped 118 frames! The application may be doing too much work on its main thread.
    11-22 12:19:50.659: D/dalvikvm(616): GC_CONCURRENT freed 263K, 11% free 5829K/6535K, paused 85ms+6ms, total 140ms


    Please help to resolve it.
    Looking forward your support.

    Thanks.
    Anees

    Thank
  • IdanAdar
    IdanAdar
    741 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-22T08:00:40Z  
    Hi,
    To check for the correct Worklight version, please go to Help >> About >> Worklight icon.
    What is the version written there?

    You mentioned a move to "live environment".
    Can you elaborate on that, what does that mean? In what ways does it differ from the other environment you worked with?

    Have you also noticed the following error?
    
    11-21 12:46:11.080: D/CordovaLog(621): file:
    ///data/data/com.scma/files/www/default/scma.html: Line 34 : Uncaught TypeError: undefined is not a function 11-21 12:46:11.090: E/Web Console(621): Uncaught TypeError: undefined is not a function at file:
    ///data/data/com.scma/files/www/default/scma.html:34
    


    Finally, as for the "Origin null is not allowed by Access-Control-Allow-Origin" error,
    This should be fixed in v5.0.0.3. Is that the version you are using (based on my first question above)?

    If not, here is a workaround for that specific problem:

    Could it be that you are actually running Android 4.1.1 Jelly Bean? We have identified a change that was on Google's part that MAY break things on the Worklight end.
    It is currently being investigated.

    If that is indeed the case, you have a couple of options:
    1. Try a previous version, say 4.1

    2. You can try this workaround:

    Add this line to the main class that extends WLDroidGap:
    this.appView.getSettings().setAllowUniversalAccessFromFileURLs (true);

    public class test extends WLDroidGap {
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.appView.getSettings().setAllowUniversalAccessFromFileURLs (true);

    //DeviceAuthManager.getInstance().setProvisioningDelegate(<Use default ProvisioningDelegateImpl class or replace with your IProvisioningDelegate implementation>);
    super.loadUrl(getWebMainFilePath());
    }
    }

    Explenation:
    http://developer.android.com/reference/android/webkit/WebSettings.html#setAllowFileAccessFromFileURLs(boolean (http://developer.android.com/reference/android/webkit/WebSettings.html#setAllowFileAccessFromFileURLs%28boolean) (http://developer.android.com/reference/android/webkit/WebSettings.html#setAllowFileAccessFromFileURLs%28boolean))

    public abstract void setAllowUniversalAccessFromFileURLs (boolean flag)

    Since: API Level 16
    Sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. This includes access to content from other file scheme URLs. See setAllowFileAccessFromFileURLs(boolean). To enable the most restrictive, and therefore secure policy, this setting should be disabled.

    The default value is true for API level ICE_CREAM_SANDWICH_MR1 and below, and false for API level JELLY_BEAN and above.

    Parameters
    flag whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin
    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-22T11:58:40Z  
    • IdanAdar
    • ‏2012-11-21T08:14:16Z
    In Android 4.2, Google has made changes that prevent from Cordova (2.2) to work properly.
    I suspect this will also prevent Cordova 1.6.1 (the one available in Worklight 5.0.0.x) to work properly.

    My suggestion for the time being would be to change your AVD from Android 4.2 to 4.1

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    WL App runs in 4.2 in Nexus 7 without problem.

    When could not connect issue, u have to set ip address in application-descriptor.xml specific. Then the emulator should have no problem to find the testing server.

    Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-24T12:25:06Z  
    WL App runs in 4.2 in Nexus 7 without problem.

    When could not connect issue, u have to set ip address in application-descriptor.xml specific. Then the emulator should have no problem to find the testing server.

    Jerry
    Jerry,
    Thanks for cooperation.
    I did all what you and Idan suggested but I don't know whats wrong with this.Application installed successfully and when try to run it through that errors sometime failed to connect the service or sometime The connection to the server was unsuccessfull.

    Thanks.
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-24T12:36:31Z  
    Jerry,
    Thanks for cooperation.
    I did all what you and Idan suggested but I don't know whats wrong with this.Application installed successfully and when try to run it through that errors sometime failed to connect the service or sometime The connection to the server was unsuccessfull.

    Thanks.
    Logcat attached.

    Attachments

  • IdanAdar
    IdanAdar
    741 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-25T05:16:49Z  
    I don't think this will be of consequence, but you have there
    
    <android version=
    "4.1.2">
    

    The version field is not related to the Android version you're running, but the to version of the application, for the Android environment. Anyway...

    When you say live environment, do you mean that you are using Tomcat/WAS? Or still the Developer Edition (the Eclipse plug-in)?
    If you are using Tomcat/WAS, then you are missing likely several configuration changes. Please see the Administrator Guide for how to transfer your project from development to 'production'.

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

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-25T05:17:36Z  
    Jerry,
    Thanks for cooperation.
    I did all what you and Idan suggested but I don't know whats wrong with this.Application installed successfully and when try to run it through that errors sometime failed to connect the service or sometime The connection to the server was unsuccessfull.

    Thanks.
    Dear Idan,

    Thanks for reply.

    I'm using worklight version 5.0.0.270 Developer Edition. And yes "Access-Control-Allow-Origin.. error, " problem solved now.But still application failed to run when installed in emulator.

    Here is code of my application-descripter:

    
    <?xml version=
    "1.0" encoding=
    "UTF-8" standalone=
    "no"?>   <!-- Licensed Materials - Property of IBM   5725-G92 (C) Copyright IBM Corp. 2006, 2012. All Rights Reserved.   US Government Users Restricted Rights - Use, duplication or   disclosure restricted by GSA ADP Schedule Contract with IBM Corp. -->   <!-- Attribute 
    "id" must be identical to application folder name -->   <application xmlns=
    "http://www.worklight.com/application-descriptor" id=
    "scma" platformVersion=
    "5.0">   <displayName>scma</displayName>   <description>scma</description>   <author>   <name>application
    's author</name>   <email>application author
    's e-mail</email>   <homepage>http:
    //mycompany.com</homepage>   <copyright>Copyright My Company</copyright>   </author>   <height>460</height>   <width>320</width>   <mainFile>scma.html</mainFile>   <thumbnailImage>common/images/thumbnail.png</thumbnailImage>   <usage requireAuthentication=
    "never"/>     <android version=
    "4.1.2">   <worklightSettings include=
    "true"/>   <security>   <testAppAuthenticity enabled=
    "false"/>   <encryptWebResources enabled=
    "false"/>   <testWebResourcesChecksum enabled=
    "false" ignoreFileExtensions=
    "png, jpg, jpeg, gif, mp4, mp3"/>   <publicSigningKey>Replace 
    
    this text with the 
    
    public key of the certificate with which you sign the APK. For details see the Worklight Developer
    's Reference Guide.</publicSigningKey>   </security>   </android>     <worklightServerRootURL>http:
    //202.61.46.206:8080</worklightServerRootURL>  <!--This is my actual IP-->   </application>
    


    I delete the AVD and create new AVD. Now when I run in emulator this time the error I got is:

    Application Failed connecting to service
    Now in the light of above what you suggest.?

    Thanks.

    Anees
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-26T06:57:33Z  
    • IdanAdar
    • ‏2012-11-25T05:16:49Z
    I don't think this will be of consequence, but you have there <pre class="jive-pre"> <android version= "4.1.2"> </pre>
    The version field is not related to the Android version you're running, but the to version of the application, for the Android environment. Anyway...

    When you say live environment, do you mean that you are using Tomcat/WAS? Or still the Developer Edition (the Eclipse plug-in)?
    If you are using Tomcat/WAS, then you are missing likely several configuration changes. Please see the Administrator Guide for how to transfer your project from development to 'production'.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    Dear Idan,

    Thanks for making me correct about version field but this was not the cause of failure i checked.
    I'm still using Worklight Developer Edition in live enviroment. There is no application server like Tomcat/WAS i used yet.Just using a live IP.

    To probe,I checked the same application on a stand alone PC with no firewall,no Proxy(proxy setting implemented in my company,but on this PC i removed the Proxy settings) and No Antivirus runing on that PC.When i setup Developer Edition and Android sdk(4.1.2) etc and then checked on emulator it worked fine.first time i got the error of "Access-same origin" & "Failed to connect the service" but when i edited the .java file with increased timeout time and "access-policy" the app got run in the emulator.

    So what do you say,is that problem is due to the Proxy or firewall setting?

    Regards.
    Anees
  • IdanAdar
    IdanAdar
    741 Posts

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-26T07:07:38Z  
    A firewall could definitely be an issue.
    Can you try on a stand-alone app that is not inside your company's network?

    What errors show up on LogCat now?

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

    Re: When Test in Emulator Connection Failed error

    ‏2012-11-26T11:45:48Z  
    • IdanAdar
    • ‏2012-11-26T07:07:38Z
    A firewall could definitely be an issue.
    Can you try on a stand-alone app that is not inside your company's network?

    What errors show up on LogCat now?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    Dear Idan,

    Problem now resolved:).
    I tried your all instructions and settings in an ordered manner and this time it worked successfully.
    Thank you thank you so much a lot. You really help me out in such a way in which I'm nearly about fed up.
    My assumption was wrong.No firewall or proxy settings were barrier.
    If I put all your instructions at one place then the solution to the problem is:

    1.Provided correct IP <worklightServerRootURL>http://IP-Adress:8080</worklightServerRootURL>.
    2.<android version="1"> instead of <android version="4.1.2">
    3.Increased the Timeout time to 70000
    4.Allowed Access origin policy.
    5.Created new AVD and then Run the application.

    Now Its working fine in emulator.
    I have to test this application in real mobile now with worklight Developer Edition.

    Thank you so much Idan for your valuable support.
    Jerry also provided his view so thanks to him as well.

    Thanks.
    Regards
    Anees.