Migrated our application from 6.2 to 7.0, the mobile web app works great on the phone as well as manually calling the HTTP js adapters. However when exported the apk to a phone, the application starts up but when invoking an adapter for data a 403 error is returned:
{"status":403,"invocationContext":null}
and the only server log:
"POST /SFMobileStudent/authorization/v1/clients/instance HTTP/1.1" 403 64 "-" "WLNativeAPI(bullhead; MMB29Q; Nexus 5X; SDK 23; Android 6.0.1)"
The adapter is doesn't have any security on it either
securityTest="wl_unprotected"
Not sure what we are missing, is there added/required security for 7.0?
Not a whole lot there but you can see the traffic from the device (comcast) to the server. I don't know what any of it means, just sort of repeats. tcpdump packet capture:
removed
LogCat
I/chromium(29279): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin170261306 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"\n\n403 Forbidden</title>\n</head>\nForbidden</h1>\nYou don't have permission to access /SFMobileStudent/authorization/v1/clients/instance\non this server.</p>\n\nIBM_HTTP_Server at mobilet.sfcollege.edu Port 443</address>\n</body></html>\n","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)
More logCat
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 170ms. Plugin should use CordovaInterface.getThreadPool().
D/dalvikvm(11035): GC_EXPLICIT freed 153K, 39% free 8875K/14500K, paused 2ms+3ms, total 49ms
I/ConvCursor(11035): ConversationCursor caching complete pos=18
E/ThermalDaemon( 356): set temp 65000 to name /sys/class/hwmon/hwmon0/device/temp1_max
E/ThermalDaemon( 356): set temp -128000 to name /sys/class/hwmon/hwmon0/device/temp1_max_hyst
D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8
D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8
D/WifiStateMachine( 917): handleMessage: E msg.what=151572
D/WifiStateMachine( 917): processMsg: ConnectedState
D/WifiStateMachine( 917): processMsg: L2ConnectedState
D/WifiStateMachine( 917): handleMessage: X
D/WifiWatchdogStateMachine( 917): Fetch RSSI succeed, rssi=-68 mrssi=-68 txbad=245 txgood=47234
D/WifiWatchdogStateMachine( 917): Incremental loss=0/6 Current loss=0% volume=10.06
D/WifiWatchdogStateMachine( 917): Cache updated: loss[-68]=0% volume=27.82
D/dalvikvm(11209): GC_CONCURRENT freed 2032K, 45% free 8070K/14500K, paused 4ms+2ms, total 57ms
D/dalvikvm(11209): WAIT_FOR_CONCURRENT_GC blocked 8ms
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.deleteAllAuthData blocked the main thread for 27ms. Plugin should use CordovaInterface.getThreadPool().
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 97ms. Plugin should use CordovaInterface.getThreadPool().
D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8
D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8
E/NONE (11209): [/apps/services/api/SFStudent/android/query] failure. state: 403, response: undefined
I/chromium(11209): [INFO:CONSOLE(301)] "Error in Error callbackId: WLAuthorizationManagerPlugin1867260175 : ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (301)
I/chromium(11209): [INFO:CONSOLE(1080)] "processMessage failed: Error: ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (1080)
I/chromium(11209): [INFO:CONSOLE(1081)] "processMessage failed: Stack: ReferenceError: deferred is not defined
I/chromium(11209): at Object.InitializeService.WL.Client.invokeProcedure.onFailure (eval at (file:///android_asset/www/default/js/libs/jquery/jquery-min.js:4:14070), :15:8)
I/chromium(11209): at Object.options.onFailure (file:///android_asset/www/default/worklight/worklight.js:8806:29)
I/chromium(11209): at Object.onInvokeProcedureFailure [as onFailure] (file:///android_asset/www/default/worklight/worklight.js:8718:14)
I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onFailure (file:///android_asset/www/default/worklight/worklight.js:3651:26)
I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailure (file:///android_asset/www/default/worklight/worklight.js:3600:12)
I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/worklight.js:3440:27)
I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/wljq.js:1202:33)
I/chromium(11209): at fire (file:///android_asset/www/default/worklight/wljq.js:1047:30)
I/chromium(11209): at Object.self.fireWith [as rejectWith] (file:///android_asset/www/default/worklight/wljq.js:1158:7)
I/chromium(11209): at Object.deferred.(anonymous function) [as reject] (file:///android_asset/www/default/worklight/wljq.js:1247:34)", source: file:///android_asset/www/default/worklight/cordova.js (1081)
I/chromium(11209): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin1867260175 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"/*-secure-\n{\"reason\":\"App authenticity security check failed\"}*/","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)
Resolved. There is a new tag within the application-descriptor:
directUpdateAuthenticityPublicKey
Updated, exported the application with the keystore and all now works. Thanks for the help.
The issue:
http://www-01.ibm.com/support/docview.wss?uid=swg21970348
Related
The template application I was using for running an image classifier model from Azure Custom Vision is not working when i try to build and run it first.
I tried building and running, as what the README.md said to test the application, but so far, i keep on getting errors that I hardly can even fathom. I expected this would run as said, but as I said, it kept on showing errors when I tried to open the app. The phone I'm using is a Huawei but I forgot the specific series and stuff. Here is the error log I got from just clicking on the app.
01/25 19:12:11: Launching 'app' on HUAWEI MED-LX9.
Install successfully finished in 5 s 540 ms.
$ adb shell am start -n "demo.tensorflow.org.customvision_sample/demo.tensorflow.org.customvision_sample.ClassifierActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 9677 on device 'huawei-med_lx9-PEVBB20423201126'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/omvision_sampl: Late-enabling -Xcheck:jni
E/omvision_sampl: Unknown bits set in runtime_flags: 0x8000
I/omvision_sampl: Reinit property: dalvik.vm.checkjni= false
I/omvision_sampl: ReInitProperties: persist.vm.debug.dumpapi= false
D/ActivityThread: Attach thread to application
D/HwFrameworkSecurityPartsFactory: HwFrameworkSecurityPartsFactory in.
I/HwFrameworkSecurityPartsFactory: add HwFrameworkSecurityPartsFactory to memory.
E/BehaviorCollectManager: Fail to acquire dataAnalyzerService...
I/omvision_sampl: The ClassLoaderContext is a special shared library.
I/omvision_sampl: QarthPatchMonintor::Init
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::StartWatch
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::WatchPackage: /data/hotpatch/fwkhotpatch/
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/demo.tensorflow.org.customvision_sample
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/all
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::Run
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::Reading
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::CheckNotifyEvent
I/omvision_sampl:
I/omvision_sampl: QarthPatchMonintor::CheckNotifyEvent before read
I/omvision_sampl:
I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=demo.tensorflow.org.customvision_sample#10169#256
I/HwApiCacheMangerEx: need clear apicache,because volumes changed,oldCnt=0 newCnt=1
I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=demo.tensorflow.org.customvision_sample#10169#0
I/HwApiCacheMangerEx: need clear apicache,because volumes changed,oldCnt=1 newCnt=1
I/AwareBitmapCacher: init processName:demo.tensorflow.org.customvision_sample pid=9677 uid=10169
E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile#be12549
I/iGraphics: [0020080c] pn: demo.tensorflow.org.customvision_sample, p: 9677
I/iGraphics: [0030050c] PV 10
I/iGraphics: [0030050c] no element 'igfx'
I/iGraphics: [0030050c] LoadCloudParams lib file success.
E/Parcel: Reading a NULL string not supported here.
E/GED: Failed to get GED Log Buf, err(0)
V/ActivityThread: callActivityOnCreate
D/tensorflow: CameraActivity: onCreate demo.tensorflow.org.customvision_sample.ClassifierActivity#f8dcd05
V/HwWidgetFactory: : successes to get AllImpl object and return....
I/DecorView[]: old windowMode:0 new windoMode:1
I/CameraManagerGlobal: Connecting to camera service
I/tensorflow: CameraActivity: Camera API lv2?: true
I/InterpreterApi: Loaded native library: tensorflowlite_jni
I/InterpreterApi: Didn't load native library: tensorflowlite_jni_gms_client
I/tflite: Initialized TensorFlow Lite runtime.
E/libc: Access denied finding property "ro.hardware.chipname"
W/omvision_sample: type=1400 audit(0.0:6423): avc: denied { read } for pid=9677 name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=14884 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
I/tflite: Created TensorFlow Lite XNNPACK delegate for CPU.
I/tflite: Replacing 39 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions.
D/AndroidRuntime: Shutting down VM
I/QarthLog: [PatchStore] createDisableExceptionQarthFile
I/QarthLog: [PatchStore] create disable file for demo.tensorflow.org.customvision_sample uid is 10169
E/AndroidRuntime: FATAL EXCEPTION: main
Process: demo.tensorflow.org.customvision_sample, PID: 9677
java.lang.RuntimeException: Unable to start activity ComponentInfo{demo.tensorflow.org.customvision_sample/demo.tensorflow.org.customvision_sample.ClassifierActivity}: ai.customvision.visionskills.VisionSkillsException: {"NativeRuntimeError":"Skill[Classifier] Build Exception <JNIWrapperException: Failed to load model; Model name = <sample-tflite.cvmodel/cvexport.manifest>; details: java.lang.IncompatibleClassChangeError: Found interface org.tensorflow.lite.Tensor, but class was expected (declaration of 'org.tensorflow.lite.Tensor' appears in /data/app/demo.tensorflow.org.customvision_sample-ujz1FIumEghqzxaDGOhliw==/base.apk)>"}
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3897)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4076)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8349)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: ai.customvision.visionskills.VisionSkillsException: {"NativeRuntimeError":"Skill[Classifier] Build Exception <JNIWrapperException: Failed to load model; Model name = <sample-tflite.cvmodel/cvexport.manifest>; details: java.lang.IncompatibleClassChangeError: Found interface org.tensorflow.lite.Tensor, but class was expected (declaration of 'org.tensorflow.lite.Tensor' appears in /data/app/demo.tensorflow.org.customvision_sample-ujz1FIumEghqzxaDGOhliw==/base.apk)>"}
at ai.customvision.visionskills.VisionSkillsManager.throwIfJNIFailed(VisionSkillsManager.java:24)
at ai.customvision.visionskills.VisionSkillsManager.SkillConfigurationBuild_orThrow(VisionSkillsManager.java:553)
at ai.customvision.visionskills.VisionSkillsManager.skillConfigurationBuild(VisionSkillsManager.java:309)
at ai.customvision.visionskills.ConfigurationBase.build(ConfigurationBase.java:41)
at ai.customvision.visionskills.CVSClassifier$Configuration.build(CVSClassifier.java:64)
at demo.tensorflow.org.customvision_sample.MSCognitiveServicesCustomVisionClassifier.<init>(MSCognitiveServicesCustomVisionClassifier.java:51)
at demo.tensorflow.org.customvision_sample.ClassifierActivity.onCreate(ClassifierActivity.java:54)
at android.app.Activity.performCreate(Activity.java:8085)
at android.app.Activity.performCreate(Activity.java:8073)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3870)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4076)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8349)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
3053-3135/? E/﹕ Couldn't opendir /data/app/vmdl1653487319.tmp: No such file or directory
3053-3135/? E/installd﹕ Failed to delete /data/app/vmdl1653487319.tmp: No such file or directory
6865-6865/? E/Finsky﹕ [2] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
4361-4361/? E//system/bin/webview_zygote32﹕ failed to make and chown /acct/uid_99069: Permission denied
4361-4361/? E/Zygote﹕ createProcessGroup(99069, 0) failed: Permission denied
4387-4387/? E/asset﹕ setgid: Operation not permitted
4296-4296/? E/PushMessage﹕ token..title:: null
6008-6008/? E/NetworkScheduler.ATC﹕ Received callback from client for task that is already complete.
ComponentInfo{com.google.android.inputmethod.latin/com.firebase.jobdispatcher.GooglePlayReceiver} task_check_update
3526-3543/? E/BatteryStatsService﹕ no controller energy info supplied
4296-4296/? E/PushMessage﹕ token..title:: fi8UxsDCdu0:APA91bGW6JEoNm-CZqemOBu_FiZ4YYAkfxCYGTyENFs8nXXBanCe_qyGhXL2hDR8_38SDeyghkbn_B3uaA_n6LpIqQsX2jFvOYXP8LDYDMLu2WSYtj2cj6A0pAi12-KxPMOgBhHOH5Mn
6008-2635/? E/ctxmgr﹕ [ProducerStatusImpl]updateStateForNewContextData: inactive, contextName=7
6008-6008/? E/ctxmgr﹕ [PlaceFenceHelper]NearbyBuffer is null!
6317-30075/? E/SQLiteCastStore﹕ End saving paired guest mode devices
3526-11492/? E/BatteryStatsService﹕ no controller energy info supplied
6008-6008/? E/ctxmgr﹕ [WorkInfo]Attribution was already enqueued pkg=com.google.android.gms, lbl=PlacesProducer_receive, start=unspec, stop=unspec.
6008-2635/? E/ctxmgr﹕ [WorkManager]Ongoing task not found: PlacesProducer_receive
3526-3542/? E/zygote64﹕ failed to kill 1 processes for processgroup 3624
356-356/? E/SELinux﹕ avc: denied { find } for interface=android.hardware.memtrack::IMemtrack pid=4585 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:hal_memtrack_hwservice:s0 tclass=hwservice_manager
6008-2635/? E/ctxmgr﹕ [ProducerStatusImpl]updateStateForNewContextData: inactive, contextName=7
6008-6008/? E/ctxmgr﹕ [PlaceFenceHelper]NearbyBuffer is null!
3526-3683/? E/ConnectivityService﹕ RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=161, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
3772-3785/? E/RecentsTaskLoader﹕ Unexpected null component name or activity info: ComponentInfo{com.cbq.CBMobile/com.cbq.CBMobile.CBQMainActivity}, null
6865-6865/? E/Finsky﹕ [2] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
5024-5024/? E/asset﹕ setgid: Operation not permitted
3053-3603/? E/﹕ Couldn't opendir /data/app/vmdl447807582.tmp: No such file or directory
3053-3603/? E/installd﹕ Failed to delete /data/app/vmdl447807582.tmp: No such file or directory
6865-6865/? E/Finsky﹕ [2] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
5100-5100/? E//system/bin/webview_zygote32﹕ failed to make and chown /acct/uid_99070: Permission denied
5100-5100/? E/Zygote﹕ createProcessGroup(99070, 0) failed: Permission denied
5128-5128/? E/asset﹕ setgid: Operation not permitted
5069-5069/? E/PushMessage﹕ token..title:: null
3526-3543/? E/BatteryStatsService﹕ no controller energy info supplied
I try to use cordova in windows for create a simple android app. I create the first project using command cordova create hello com.example.hello HelloWorld
I add the Android platform, I try to build and build success, but when I emulate the app don't start and receive the error on screen:
Unfortunaly, HelloWorld has stopped.
logcat:
03-16 16:44:19.073 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /data/app/com.example.hello-1/lib/x86
03-16 16:44:19.266 2442-2442/com.example.hello I/WebViewFactory﹕ Loading com.android.webview version 44.0.2403.119 (code 246011910)
03-16 16:44:19.310 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /system/app/webview/lib/x86
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Time to load native libraries: 62 ms (timestamps 9389-9451)
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
03-16 16:44:19.392 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
03-16 16:44:19.392 2442-2442/com.example.hello I/chromium﹕ [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0
03-16 16:44:19.483 2442-2442/com.example.hello I/BrowserStartupController﹕ Initializing chromium process, singleProcess=true
03-16 16:44:19.484 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:19.486 2442-2442/com.example.hello E/SysUtils﹕ ApplicationContext is null in ApplicationStatus
03-16 16:44:19.568 2442-2442/com.example.hello W/chromium﹕ [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY)
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY)
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_egl.cc(327)] No suitable EGL configs found.
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed
03-16 16:44:19.628 2442-2468/com.example.hello W/AudioManagerAndroid﹕ Requires BLUETOOTH permission
03-16 16:44:19.667 2442-2442/com.example.hello E/DataReductionProxySettingListener﹕ No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
03-16 16:44:19.757 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:19.762 2442-2442/com.example.hello W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring
03-16 16:44:20.182 2442-2442/com.example.hello D/SystemWebViewEngine﹕ CordovaWebView is running on device made by: unknown
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.246 2442-2452/com.example.hello I/art﹕ Background sticky concurrent mark sweep GC freed 7609(505KB) AllocSpace objects, 3(60KB) LOS objects, 64% free, 861KB/2MB, paused 1.373ms total 448.240ms
03-16 16:44:20.310 2442-2466/com.example.hello W/chromium﹕ [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
03-16 16:44:20.368 2442-2442/com.example.hello D/gralloc_goldfish﹕ Emulator without host-side GPU emulation detected.
03-16 16:44:20.376 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.410 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.586 2442-2452/com.example.hello I/art﹕ Background partial concurrent mark sweep GC freed 1447(97KB) AllocSpace objects, 2(2MB) LOS objects, 35% free, 926KB/1438KB, paused 2.668ms total 209.255ms
03-16 16:44:20.587 2442-2480/com.example.hello A/chromium﹕ [FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
03-16 16:44:20.587 2442-2480/com.example.hello A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 2480 (GpuThread)
This is almost exactly the same error as Error in Android Programming while connecting to Phonegap. It seems to be related to this bug from ionic.
According to them, "switching from Snapshot to Host GPU solved this problem."
This makes sense as three of the last errors are related to opengl.
Note to various moderators: I tried to close one as a duplicate of the other, but that can't be done because there's no answer. Tried looking on meta for 'duplicate unanswered' but they simply say not to do it. I figure I'll post a possible answer and if either one is accepted, I'll close the other as a dup.
I am unable to run android's device ready function (not getting fired). How do I fix it? I have target sdk 22 and cordova 5.1.1 and android studio 1.0.1.
My index.html:
<!DOCTYPE html>
<html>
<head>
<title>Device Ready Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
</head>
<body onload="onLoad()">
</body>
</html>
index.js:
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
window.addEventListener("batterystatus", onBatteryStatus, false);
}
// Handle the batterystatus event
//
function onBatteryStatus(info) {
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
And where will this get logged : console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
If I run on command propmpt: cordova build:
Total time: 7.545 secs
C:\Users\salangar\hello\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\Users\salangar\hello\platform
s\android\gradlew cdvBuildDebug -b C:\Users\salangar\hello\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (C:\Users\salangar\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
Logcat display:
I/WebViewFactory﹕ Loading com.android.webview version 39 (1737576-arm) (code 300001)
07-02 11:10:44.806 HelloWorld I/LibraryLoader﹕ Time to load native libraries: 726 ms (timestamps 7130-7856)
07-02 11:10:44.824 HelloWorld I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
07-02 11:10:44.979 HelloWorld V/WebViewChromiumFactoryProvider﹕ Binding Chromium to main looper Looper (main, tid 1) {951e68}
07-02 11:10:44.990 HelloWorld I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
07-02 11:10:45.113 HelloWorld I/BrowserStartupController﹕ Initializing chromium process, singleProcess=true
07-02 11:10:45.021 HelloWorld I/chromium﹕ [INFO:library_loader_hooks.cc(104)] Chromium logging enabled: level = 0, default verbosity = 0
07-02 11:10:45.140 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:45.448 HelloWorld W/AudioManagerAndroid﹕ Requires BLUETOOTH permission
07-02 11:10:45.575 HelloWorld W/chromium﹕ [WARNING:resource_bundle.cc(304)] locale_file_path.empty()
07-02 11:10:45.590 HelloWorld I/chromium﹕ [INFO:aw_browser_main_parts.cc(65)] Load from apk succesful, fd=31 off=46184 len=3037
07-02 11:10:45.614 HelloWorld I/chromium﹕ [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:32 off:229484 len:1089587
07-02 11:10:45.828 HelloWorld E/chromium﹕ [ERROR:gl_surface_egl.cc(165)] No suitable EGL configs found.
07-02 11:10:45.829 HelloWorld E/chromium﹕ [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
07-02 11:10:45.835 HelloWorld E/chromium﹕ [ERROR:browser_main_loop.cc(988)] GLSurface::InitializeOneOff failed
07-02 11:10:46.790 HelloWorld W/chromium﹕ [WARNING:data_reduction_proxy_settings.cc(331)] SPDY proxy OFF at startup
07-02 11:10:47.032 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:47.115 HelloWorld W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring
07-02 11:10:47.328 HelloWorld D/SystemWebViewEngine﹕ CordovaWebView is running on device made by: unknown
07-02 11:10:47.408 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:47.408 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:47.712 HelloWorld I/art﹕ Background sticky concurrent mark sweep GC freed 3517(255KB) AllocSpace objects, 2(32KB) LOS objects, 31% free, 764KB/1117KB, paused 2.313ms total 499.804ms
07-02 11:10:48.445 HelloWorld D/gralloc_goldfish﹕ Emulator without GPU emulation detected.
07-02 11:10:55.758 HelloWorld D/JsMessageQueue﹕ Set native->JS mode to OnlineEventsBridgeMode
07-02 11:10:56.152 HelloWorld I/art﹕ Background partial concurrent mark sweep GC freed 3730(208KB) AllocSpace objects, 1(16KB) LOS objects, 53% free, 887KB/1911KB, paused 1.825ms total 326.232ms
07-02 11:10:57.749 HelloWorld I/Choreographer﹕ Skipped 45 frames! The application may be doing too much work on its main thread.
07-02 11:11:00.752 HelloWorld I/Choreographer﹕ Skipped 54 frames! The application may be doing too much work on its main thread.
07-02 11:11:01.075 HelloWorld I/Choreographer﹕ Skipped 31 frames! The application may be doing too much work on its main thread.
07-02 11:11:01.545 HelloWorld I/chromium﹕ [INFO:CONSOLE(1188)] "deviceready has not fired after 5 seconds.", source: file:///android_asset/www/cordova.js (1188)
07-02 11:11:01.750 HelloWorld I/chromium﹕ [INFO:CONSOLE(1181)] "Channel not fired: onPluginsReady", source: file:///android_asset/www/cordova.js (1181)
07-02 11:11:01.752 HelloWorld I/chromium﹕ [INFO:CONSOLE(1181)] "Channel not fired: onCordovaReady", source: file:///android_asset/www/cordova.js (1181)
07-02 11:11:03.655 HelloWorld W/PluginManager﹕ THREAD WARNING: exec() call to CoreAndroid.show blocked the main thread for 161ms. Plugin should use CordovaInterface.getThreadPool().
07-02 11:11:04.699 HelloWorld I/chromium﹕ [INFO:CONSOLE(47)] "Received Event: deviceready", source: file:///android_asset/www/js/index.js (47)
07-02 11:11:27.708 HelloWorld I/Choreographer﹕ Skipped 33 frames! The application may be doing too much work on its main thread.
07-02 11:11:28.112 HelloWorld I/Choreographer﹕ Skipped 34 frames! The application may be doing too much work on its main thread.
07-02 11:11:58.646 HelloWorld I/Choreographer﹕ Skipped 33 frames! The application may be doing too much work on its main thread.
device ready function (not getting fired). How do I fix it?
You don't need to use onLoad() function to call deviceready event.
instead of this :-
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
just write :-
document.addEventListener("deviceready", onDeviceReady, false);
and another thing is you need to write the script cordova.js part inside the body tag and add the index.js file like the cordova.js.
where will this get logged : console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
This log is print in logcat.
Hope this help :) if you have any difficulties please let me know.
When I attempt to sign-in to my game application using Google Play Services, the login fails (error logs included below), and a dialog pops up that says "Unknown issue with Google Play services." I have the google-play-services_lib properly setup as a library dependency in Android Studio and my Activity extends the BaseGameActivity class.
As you can see in the Logs, it says the error is because: "Access Not Configured. The API (Drive API) is not enabled for your project." It comes from com.google.android.gms.drive.auth.c. However, nowhere in my Manifest file or in my code do I use the Drive API. I don't need this API at all, and have not imported or included it anywhere. I am simply calling the beginUserInitiatedSignIn(); method from the BaseGameActivity class. Why is this error message being generated?
I have noticed one line from the logs in particular that doesn't make much sense, but seems to be related:
I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: , callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]
But I still can't wrap my head around why it's seemingly attempting to get data from the drive API. Any help would be really appreciated.
Here are the error logs as promised:
05-25 03:00:49.359 1250-1250/? V/GLSActivity﹕ AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
05-25 03:00:49.372 1448-1448/? D/ChimeraSrvcProxy﹕ Creating service proxy ComponentInfo{com.google.android.gms/com.google.android.gms.games.chimera.GamesAsyncServiceProxy}
05-25 03:00:49.372 1448-1448/? D/ChimeraSrvcProxy﹕ Proxying container service ComponentInfo{com.google.android.gms/com.google.android.gms.games.chimera.GamesAsyncServiceProxy} to Chimera service impl com.google.android.gms.games.service.PlayGamesAsyncService
05-25 03:00:49.372 1448-1448/? D/ChimeraCfgMgr﹕ Loading module com.google.android.gms.games from APK com.google.android.play.games
05-25 03:00:49.372 1448-1448/? D/ChimeraModuleLdr﹕ Module APK com.google.android.play.games already loaded
05-25 03:00:49.387 1250-9249/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]
05-25 03:00:49.392 1250-9249/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.412 1448-21701/? V/AuthAccountOperation﹕ offline access is not requested; requesting access token
05-25 03:00:49.428 1250-1990/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/games https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/appstate https://www.googleapis.com/auth/drive.appdata]
05-25 03:00:49.431 1250-1990/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.437 1448-21701/? V/AuthAccountOperation﹕ access token request successful
05-25 03:00:49.463 1448-21698/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
05-25 03:00:49.466 1448-21698/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
05-25 03:00:49.476 1250-1278/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]
05-25 03:00:49.481 1250-1278/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.490 1250-1990/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]
05-25 03:00:49.496 1250-1990/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.523 1448-21701/? V/AuthAccountOperation﹕ offline access is not requested; requesting access token
05-25 03:00:49.541 1250-9249/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/games https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/appstate https://www.googleapis.com/auth/drive.appdata]
05-25 03:00:49.543 1250-9249/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.552 1448-21701/? V/AuthAccountOperation﹕ access token request successful
05-25 03:00:49.754 746-1172/? I/art﹕ Explicit concurrent mark sweep GC freed 26211(1326KB) AllocSpace objects, 2(32KB) LOS objects, 22% free, 55MB/71MB, paused 1.903ms total 134.343ms
05-25 03:00:50.138 1046-1559/? D/skia﹕ --- SkImageDecoder::Factory returned null
05-25 03:00:50.139 1046-1559/? W/AssetUtil﹕ loadBitmapAssetFromResources: failed to decode bitmap resource for package com.twitter.android
05-25 03:00:50.204 1448-9053/? E/Volley﹕ [220] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/drive/v2beta/apps/self?prettyPrint=false&fields=id
05-25 03:00:50.210 3043-3105/? D/﹕ PORT_WriteDataCO: tx queue is full,tx.queue_size:10312,tx.queue.count:11,available:6683
05-25 03:00:50.222 1448-21694/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
05-25 03:00:50.225 1448-21698/? E/ClientConnectionOperation﹕ Handling authorization failure
com.google.android.gms.drive.auth.c: Authorization failed: server returned error: Access Not Configured. The API (Drive API) is not enabled for your project. Please use the Google Developers Console to update your configuration.. See https://developers.google.com/drive/handle-errors for details.
at com.google.android.gms.drive.auth.g.a(SourceFile:209)
at com.google.android.gms.drive.auth.g.a(SourceFile:139)
at com.google.android.gms.drive.api.g.<init>(SourceFile:226)
at com.google.android.gms.drive.api.a.k.a(SourceFile:46)
at com.google.android.gms.common.service.g.run(SourceFile:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
05-25 03:00:50.273 1250-2712/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/games https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/appstate https://www.googleapis.com/auth/drive.appdata]
05-25 03:00:50.276 1250-2712/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:50.556 1448-9055/? E/Volley﹕ [222] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/drive/v2beta/apps/self?prettyPrint=false&fields=id
05-25 03:00:50.559 1448-21698/? E/ClientConnectionOperation﹕ Handling authorization failure
com.google.android.gms.drive.auth.c: Authorization failed: server returned error: Access Not Configured. The API (Drive API) is not enabled for your project. Please use the Google Developers Console to update your configuration.. See https://developers.google.com/drive/handle-errors for details.
at com.google.android.gms.drive.auth.g.a(SourceFile:209)
at com.google.android.gms.drive.auth.g.a(SourceFile:139)
at com.google.android.gms.drive.api.g.<init>(SourceFile:226)
at com.google.android.gms.drive.api.a.k.a(SourceFile:46)
at com.google.android.gms.common.service.g.run(SourceFile:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
05-25 03:00:50.562 20197-20197/? W/GameHelper﹕ disconnect() called when client was already disconnected.
05-25 03:00:50.564 20197-20197/? E/GooglePlayServicesUtil﹕ Internal error occurred. Please see logs for detailed information