ibm mobilefirst - mfp cli build: missing cordova on preview -
when building using cli, seems work ok, until @ console in preview, see there missing files. here's console output:
android:
synchronous xmlhttprequest on main thread deprecated because of detrimental effects end user's experience. more help, check http://xhr.spec.whatwg.org/. http://localhost:10080/myproject/apps/services/preview/myapp/android/1.0/default/cordova/cordovasim.js 404 (not found)_mbs_cordova_sim_load_js @ cordova.js:21(anonymous function) @ cordova.js:53 worklight.js:5138 uncaught exception: uncaught referenceerror: cordova not defined @ (compiled_code):16156wl.logger.__log @ worklight.js:5138wl.logger.$.each.public_api.(anonymous function) @ worklight.js:5520wl.logger.window.onerror @ worklight.js:5478 worklight.js:16156 uncaught referenceerror: cordova not defined(anonymous function) @ worklight.js:16156 worklight.js:5134 initialization option 'connectonstartup' deprecated. use wl.client.connect() connect ibm mobilefirst platform server. worklight.js:5134 wlclient init started dependencies.js:10 wl not defined referenceerror: cordova not defined @ klass.wl.busyindicator.wljsx.class.create.show (http://localhost:10080/myproject/apps/services/preview/myapp/android/1.0/default/worklight/worklight.js:12157:6) @ __showbusy (http://localhost:10080/myproject/apps/services/preview/myapp/android/1.0/default/worklight/worklight.js:7345:18) @ onenvinit (http://localhost:10080/myproject/apps/services/preview/myapp/android/1.0/default/worklight/worklight.js:7660:14) @ init (http://localhost:10080/myproject/apps/services/preview/myapp/android/1.0/default/worklight/worklight.js:8128:4) @ http://localhost:10080/myproject/apps/services/preview/myapp/android/1.0/default/assets/js/dependencies.js:10:990(anonymous function) @ dependencies.js:10 angular-libs.js:8 [10:40:49]myapp.home.controller :: [info] welcome myapp
iphone:
http://localhost:10080/myproject/apps/services/preview/myapp/iphone/1.0/default/worklight/cordova.js failed load resource: server responded status of 404 (not found)_mbs_cordova_sim_load_js @ cordova.js:21 cordova.js:26 uncaught referenceerror: cordova not defined worklight.js:5134 initialization option 'connectonstartup' deprecated. use wl.client.connect() connect ibm mobilefirst platform server. worklight.js:5134 wlclient init started worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/init] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 http://localhost:10080/myproject/apps/services/api/myapp/iphone/init failed load resource: server responded status of 401 (unauthorized) worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/init] angular-libs.js:8 [10:38:54]myapp.home.controller :: [info] welcome myapp http://localhost:10080/favicon.ico failed load resource: server responded status of 404 (not found) worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/init] success: /*-secure- {"userprefs":{},"wl-authentication-success":{"wl_directupdaterealm":{"userid":"null","attributes":{},"isuserauthenticated":1,"displayname":"null","deviceid":"null"},"wl_remotedisablerealm":{"userid":"null","attributes":{},"isuserauthenticated":1,"displayname":"null","deviceid":"null"},"wl_antixsrfrealm":{"userid":"1n4ulchkhlmjgom2cmafk8qvpm","attributes":{},"isuserauthenticated":1,"displayname":"1n4ulchkhlmjgom2cmafk8qvpm","deviceid":"1n4ulchkhlmjgom2cmafk8qvpm"},"wl_devicenoprovisioningrealm":{"userid":"previewdummyid","attributes":{"mobileclientdata":"com.worklight.core.auth.ext.mobileclientdata@ff55f"},"isuserauthenticated":1,"displayname":"previewdummyid","deviceid":"previewdummyid"},"wl_anonymoususerrealm":{"userid":"6ba49e22-f899-4b14-ae72-fc4fde9100de","attributes":{},"isuserauthenticated":1,"displayname":"6ba49e22-f899-4b14-ae72-fc4fde9100de","deviceid":"6ba49e22-f899-4b14-ae72-fc4fde9100de"}},"gadgetprops":{"environment":"iphone"},"userinfo":{"subscribeservlet":{"userid":null,"attributes":{},"isuserauthenticated":0,"displayname":null,"deviceid":null},"wl_directupdaterealm":{"userid":"null","attributes":{},"isuserauthenticated":1,"displayname":"null","deviceid":"null"},"wl_authenticityrealm":{"userid":null,"attributes":{},"isuserauthenticated":0,"displayname":null,"deviceid":null},"sampleapprealm":{"userid":null,"attributes":{},"isuserauthenticated":0,"displayname":null,"deviceid":null},"wl_remotedisablerealm":{"userid":"null","attributes":{},"isuserauthenticated":1,"displayname":"null","deviceid":"null"},"wl_antixsrfrealm":{"userid":"1n4ulchkhlmjgom2cmafk8qvpm","attributes":{},"isuserauthenticated":1,"displayname":"1n4ulchkhlmjgom2cmafk8qvpm","deviceid":"1n4ulchkhlmjgom2cmafk8qvpm"},"wl_deviceautoprovisioningrealm":{"userid":null,"attributes":{},"isuserauthenticated":0,"displayname":null,"deviceid":null},"wl_devicenoprovisioningrealm":{"userid":"previewdummyid","attributes":{"mobileclientdata":"com.worklight.core.auth.ext.mobileclientdata@ff55f"},"isuserauthenticated":1,"displayname":"previewdummyid","deviceid":"previewdummyid"},"myserver":{"userid":"6ba49e22-f899-4b14-ae72-fc4fde9100de","attributes":{},"isuserauthenticated":1,"displayname":"6ba49e22-f899-4b14-ae72-fc4fde9100de","deviceid":"6ba49e22-f899-4b14-ae72-fc4fde9100de"},"wl_anonymoususerrealm":{"userid":"6ba49e22-f899-4b14-ae72-fc4fde9100de","attributes":{},"isuserauthenticated":1,"displayname":"6ba49e22-f899-4b14-ae72-fc4fde9100de","deviceid":"6ba49e22-f899-4b14-ae72-fc4fde9100de"}}}*/ worklight.js:5788 no matching configurations found server. defaulting local configuration worklight.js:5134 wlclient connect success worklight.js:5134 before: initoptions.onsuccess worklight.js:5134 after: initoptions.onsuccess worklight.js:5134 wlclient init success worklight.js:5134 request [/myproject/apps/services/loguploader] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 request [/myproject/apps/services/loguploader] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/loguploader] success: worklight.js:5701 client logs sent server worklight.js:5134 response [/myproject/apps/services/loguploader] success: worklight.js:5701 client logs sent server worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called worklight.js:5134 request [/myproject/apps/services/api/myapp/iphone/heartbeat] worklight.js:5134 application details header: {"applicationdetails":{"platformversion":"7.0.0.0","nativeversion":"1161280635"}}wl.logger.__log @ worklight.js:5134public_api.(anonymous function) @ worklight.js:5520window.wljsx.ajax.wlrequest.wljsx.class.create.createrequestheaders @ worklight.js:3337window.wljsx.ajax.wlrequest.wljsx.class.create.sendrequest @ worklight.js:3395window.wljsx.ajax.wlrequest.wljsx.class.create.initialize @ worklight.js:3309klass @ worklight.js:527sendheartbeat @ worklight.js:7276ontimerevent @ worklight.js:896(anonymous function) @ worklight.js:959 worklight.js:5134 response [/myproject/apps/services/api/myapp/iphone/heartbeat] success: worklight.js:5134 heartbeat sent worklight.js:5134 piggybacking event transmission worklight.js:5134 flush called
i notice there's date number difference between files written when build project using eclipse , when cli ... there easy way check , updates cli?
(just clear, don't see problem when using studio in eclipse.)
this expected.
from preview url seems looking @ "simple preview" loads web resources - , in case cordova indeed not available, cordova available when previewing actual app in either mobile browser simulator or in specific environment's ide (xcode, android emulator, etc...).
if launch app in mobile browser simulator - tool provide cordova functionality mimicking it.
if take mbs-preview url, exmaple following - not see errors: http://10.0.0.3:10080/_mobilebrowsersimulator/index.html?webpage=/test/apps/services/preview/test/iphone/1.0/&platform=ios.iphone
however if you'll "strip" out mbs , preview following - see same errors: http://10.0.0.3:10080/test/apps/services/preview/test/iphone/1.0/default/index.html
http://10.0.0.3:10080/test/apps/services/preview/test/iphone/1.0/default/worklight/cordova.js failed load resource: server responded status of 404 (not found)_mbs_cordova_sim_load_js @ cordova.js:19
2015-06-25 20:01:08.608 cordova.js:24 uncaught referenceerror: cordova not defined
Comments
Post a Comment