im having this problem with my project. and I dont know what to do. please help me. here is the logcat for the application ran by simulator 2.2
02-23 07:48:27.474: I/PhoneGapLog(274): Changing log level to DEBUG(3)
02-23 07:48:27.474: D/DroidGap(274): DroidGap.onCreate()
02-23 07:48:27.485: D/DroidGap(274): DroidGap.init()
02-23 07:48:27.653: D/DroidGap(274): DroidGap.loadUrl(file:///android_asset/www/index.html, 9000)
02-23 07:48:27.693: D/SoftKeyboardDetect(274): Ignore this event
02-23 07:48:27.804: D/SoftKeyboardDetect(274): Ignore this event
02-23 07:48:36.753: D/DroidGap(274): DroidGap.loadUrl(file:///android_asset/www/index.html)
02-23 07:48:36.753: D/DroidGap(274): DroidGap: url=file:///android_asset/www/index.html baseUrl=file:///android_asset/www/
02-23 07:48:37.245: D/dalvikvm(274): GC_FOR_MALLOC freed 2060 objects / 177440 bytes in 140ms
02-23 07:48:37.423: D/dalvikvm(274): GC_FOR_MALLOC freed 1065 objects / 68792 bytes in 55ms
02-23 07:48:39.503: I/Database(274): sqlite returned: error code = 14, msg = cannot open file at source line 25467
02-23 07:48:40.154: E/Contact Query(274): Value {"birthday":null,"ims":null,"nickname":null,"rawId":null,"urls":null,"organizations":null,"emails":null,"phoneNumbers":null,"photos":null,"id":null,"name":{"middleName":null,"familyName":null,"formatted":"","givenName":"","honorificSuffix":null,"honorificPrefix":null},"categories":null,"addresses":null,"displayName":null,"note":null} at 0 of type org.json.JSONObject cannot be converted to JSONArray
02-23 07:48:40.154: E/Contact Query(274): org.json.JSONException: Value {"birthday":null,"ims":null,"nickname":null,"rawId":null,"urls":null,"organizations":null,"emails":null,"phoneNumbers":null,"photos":null,"id":null,"name":{"middleName":null,"familyName":null,"formatted":"","givenName":"","honorificSuffix":null,"honorificPrefix":null},"categories":null,"addresses":null,"displayName":null,"note":null} at 0 of type org.json.JSONObject cannot be converted to JSONArray
02-23 07:48:40.154: E/Contact Query(274): at org.json.JSON.typeMismatch(JSON.java:96)
02-23 07:48:40.154: E/Contact Query(274): at org.json.JSONArray.getJSONArray(JSONArray.java:459)
02-23 07:48:40.154: E/Contact Query(274): at com.phonegap.ContactManager.execute(ContactManager.java:87)
02-23 07:48:40.154: E/Contact Query(274): at com.phonegap.api.PluginManager$1.run(PluginManager.java:150)
02-23 07:48:40.154: E/Contact Query(274): at java.lang.Thread.run(Thread.java:1096)
02-23 07:48:40.543: D/PhoneGapLog(274): Error in error callback: Contacts2 = ReferenceError: Can't find variable: elert
02-23 07:48:40.543: D/PhoneGapLog(274): file:///android_asset/www/phonegap-1.4.1.js: Line 717 : Error in error callback: Contacts2 = ReferenceError: Can't find variable: elert
02-23 07:48:40.543: I/Web Console(274): Error in error callback: Contacts2 = ReferenceError: Can't find variable: elert at file:///android_asset/www/phonegap-1.4.1.js:717
02-23 07:48:42.493: D/dalvikvm(274): GC_FOR_MALLOC freed 3339 objects / 726120 bytes in 158ms
That's a a little garbled... can you edit your question, wrap the stuff in a code block and give it some newlines? Just at first blush I see a lot of PhoneGap stuff, perhaps you can tag your post with that as well. Anyway it's hard to decipher what's going on, which is the significant error, etc.
Oh there it is... give me a moment...
Well it looks like you're trying to coerce some single JSONObject into a JSONArray... which it seems is bad news. Can you post some code?
This line:
02-23 07:48:39.503: I/Database(274): sqlite returned: error code = 14, msg = cannot open file at source line 25467
Looks like there is an error connecting to the database.
Which in turn causes this error line:
02-23 07:48:40.154: E/Contact Query(274): Value {"birthday":null,"ims":null,"nickname":null,"rawId":null,"urls":null,"organizations":null,"emails":null,"phoneNumbers":null,"photos":null,"id":null,"name":{"middleName":null,"familyName":null,"formatted":"","givenName":"","honorificSuffix":null,"honorificPrefix":null},"categories":null,"addresses":null,"displayName":null,"note":null} at 0 of type org.json.JSONObject cannot be converted to JSONArray
Because all the values that are probably supposed to be pulled from the database are null values, and thus why your application is failing.
The first error tells you exactly which line of code is failing: 25467.
Look at that line in your project.
I think I could help if I could see your HTML code. It appears that you are trying to do a navigator.contacts.find() and it isn't returning any results. The other thing I notice is your error callback is trying to execute "elert" but that probably should be "alert".
Related
I am building an Android app which contains a couple of webview. The app needs to support KitKat 4.4 at minimum which embeds chromium v30 webview according to this. I am testing the app on Samsung Galaxy Note 2 running 4.4.2 stock rom, the webview runs very slowly and the logcat is flood with the below error messages:
...
03-21 14:11:48.651 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x6f64b600) err(0)
03-21 14:11:48.652 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x6d715280) err(0)
03-21 14:11:48.652 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:128 h:192 f:1) handle(0x6dd99590) err(0)
03-21 14:12:03.996 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionDirection threw an exception.
03-21 14:12:03.996 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionEnd threw an exception.
03-21 14:12:03.996 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionStart threw an exception.
03-21 14:12:04.007 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionDirection threw an exception.
03-21 14:12:04.007 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionEnd threw an exception.
03-21 14:12:04.007 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionStart threw an exception.
... <skipped lots of duplicated error here>
03-21 14:12:05.370 29445-29445/com.mylovely.app I/dalvikvm-heap: Grow heap (frag case) to 41.055MB for 11211498-byte allocation
03-21 14:12:06.285 29445-29445/com.mylovely.app I/dalvikvm-heap: Grow heap (frag case) to 34.448MB for 4285074-byte allocation
03-21 14:12:06.354 29445-29445/com.mylovely.app I/Choreographer: Skipped 41 frames! The application may be doing too much work on its main thread.
03-21 14:12:06.356 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x637baab0) err(0)
03-21 14:12:06.358 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x6e7ee640) err(0)
...
I already did some googling and found this seems to be fixed this chromium ticket. But since we cannot update the system webview under 4.4.2 through Google Play. Is there any other way to fix / workaround this issue beside embedding other webview (like crosswalk) to the app?
I found out the root cause of the issue. I added some heavy js tasks in the onProgressChanged callback, which they would output an null object. This null object could not be serialized and causing the bug in this chromium ticket. As a workaround, I wrapped all the js calls with IIFE to slient the output and throttle the js calls in onProgressChanged using Guava's RateLimiter.
i followed a lot of tutorials, at the moment i have:
created a new project on google developer console
created a new api key, restricted it to android app, added my package name (package="XXXX.YYYY" field of manifest tag in AndroidManifest.xml), added my SHA1 (using this command
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v)
added INTERNET, ACCESS_NETWORK_STATE and GET_ACCOUNTS permissions in my AndroidManifest.xml
added <meta-data android:name="com.google.android.apps.drive.APP_ID" android:value="id=My_Key_copied_from_google_devel_console" /> inside application tag in AndroidManifest.xml
added this dep in gradle: compile 'com.google.android.gms:play-services-drive:9.0.0'
created a new activity and copy-pasted MainActivity from quickstart example from google
now i get this error when i click on my accout to authenticate it:
02-23 20:47:20.105 1931-2504/com.google.android.gms.persistent W/GLSUser: [AppCertManager] IOException while requesting key:
java.io.IOException: Invalid device key response.
at enr.a(:com.google.android.gms:282)
at enr.a(:com.google.android.gms:4237)
at enq.a(:com.google.android.gms:46)
at enk.a(:com.google.android.gms:53)
at enj.a(:com.google.android.gms:111)
at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms:4052)
at dxg.call(:com.google.android.gms:2043)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at kzi.run(:com.google.android.gms:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at ldm.run(:com.google.android.gms:17)
at java.lang.Thread.run(Thread.java:818)
i'm testing with android emulator 5.0 x86_64 with google apis.
where am I doing wrong?
EDIT:
as Bertrand Martel pointed out i must sign my apk, but still no luck.
also here is a full log:
02-23 22:19:15.605 1493-1519/system_process I/ActivityManager: Displayed rmbq.patrol_one_v2.unbrand/rmbq.patrol_one_v2.WelcomeActivity: +84ms
02-23 22:19:15.623 3083-3100/rmbq.patrol_one_v2.unbrand D/OpenGLRenderer: endAllStagingAnimators on 0x7fc2591be400 (RippleDrawable) with handle 0x7fc25a73e660
02-23 22:19:16.997 1493-1559/system_process W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client
02-23 22:19:16.997 1493-2523/system_process I/ActivityManager: START u0 {cmp=rmbq.patrol_one_v2.unbrand/rmbq.patrol_one_v2.SettingsActivity} from uid 10063 on display 0
02-23 22:19:17.022 1493-1657/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.023 1493-1806/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.023 1493-1941/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.025 1493-1938/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.055 1493-1519/system_process I/ActivityManager: Displayed rmbq.patrol_one_v2.unbrand/rmbq.patrol_one_v2.SettingsActivity: +58ms
02-23 22:19:17.081 1493-1508/system_process I/ActivityManager: START u0 {act=com.google.android.gms.signin.action.SIGN_IN cmp=com.google.android.gms/.signin.activity.SignInActivity (has extras)} from uid 10007 on display 0
02-23 22:19:17.083 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity}
02-23 22:19:17.083 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity} to Chimera activity impl .signin.activity.SignInChimeraActivity
02-23 22:19:17.090 1493-1807/system_process I/ActivityManager: START u0 {act=com.google.android.gms.common.account.CHOOSE_ACCOUNT_USERTILE pkg=com.google.android.gms cmp=com.google.android.gms/.common.account.AccountChipAccountPickerActivity (has extras)} from uid 10007 on display 0
02-23 22:19:17.111 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity}
02-23 22:19:17.111 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity} to Chimera activity impl .common.account.AccountChipAccountPickerChimeraActivity
02-23 22:19:17.151 1493-1519/system_process I/ActivityManager: Displayed com.google.android.gms/.common.account.AccountChipAccountPickerActivity: +58ms (total +69ms)
02-23 22:19:19.007 1493-1559/system_process W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client
02-23 22:19:19.040 2481-2780/com.google.android.gms.ui D/OpenGLRenderer: endAllStagingAnimators on 0x7fc245fd7400 (ListView) with handle 0x7fc25aa627e0
02-23 22:19:19.059 2481-2481/com.google.android.gms.ui D/StrictMode: Wrote violation #0 of 3: 12720 bytes
02-23 22:19:19.061 2030-2044/com.google.android.gms D/StrictMode: Wrote violation #0 of 3: 13676 bytes
02-23 22:19:19.221 1120-1120/? W/SurfaceFlinger: couldn't log to binary event log: overflow.
02-23 22:19:19.341 1889-2403/com.google.android.gms.persistent W/ContentTaskController: Invalid task was provided to stopTracking.
02-23 22:19:19.375 1493-1808/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:19.381 1889-2220/com.google.android.gms.persistent I/art: Explicit concurrent mark sweep GC freed 55504(3MB) AllocSpace objects, 13(214KB) LOS objects, 30% free, 9MB/13MB, paused 136us total 12.142ms
02-23 22:19:19.383 1493-2523/system_process I/ActivityManager: START u0 {act=com.google.android.gms.signin.action.SIGN_IN cmp=com.google.android.gms/.signin.activity.SignInActivity (has extras)} from uid 10007 on display 0
02-23 22:19:19.386 1889-1889/com.google.android.gms.persistent W/GLSUser: [DeviceKeyStore] Cannot load key: Device key file not found.
02-23 22:19:19.391 1131-1530/? E/Drm: Failed to find drm plugin
02-23 22:19:19.391 2559-2904/com.google.android.gms.unstable W/DG.WV: Widevine DRM not supported on this device
android.media.UnsupportedSchemeException: Failed to instantiate drm object.
at android.media.MediaDrm.native_setup(Native Method)
at android.media.MediaDrm.<init>(MediaDrm.java:180)
at obk.a(:com.google.android.gms:119)
at nyd.run(:com.google.android.gms:1092)
at kzi.run(:com.google.android.gms:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at ldm.run(:com.google.android.gms:17)
at java.lang.Thread.run(Thread.java:818)
02-23 22:19:19.392 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity}
02-23 22:19:19.392 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity} to Chimera activity impl .signin.activity.SignInChimeraActivity
02-23 22:19:19.393 1493-1657/system_process I/ActivityManager: START u0 {act=com.google.android.gms.common.account.CHOOSE_ACCOUNT_USERTILE pkg=com.google.android.gms cmp=com.google.android.gms/.common.account.AccountChipAccountPickerActivity (has extras)} from uid 10007 on display 0
02-23 22:19:19.411 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity}
02-23 22:19:19.411 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity} to Chimera activity impl .common.account.AccountChipAccountPickerChimeraActivity
02-23 22:19:19.412 2481-2481/com.google.android.gms.ui D/StrictMode: Wrote violation #0 of 3: 16236 bytes
02-23 22:19:19.453 1493-1519/system_process I/ActivityManager: Displayed com.google.android.gms/.common.account.AccountChipAccountPickerActivity: +58ms (total +70ms)
02-23 22:19:20.164 1493-1571/system_process D/TaskPersister: removeObsoleteFile: deleting file=135_task.xml
02-23 22:19:20.164 1493-1571/system_process D/TaskPersister: removeObsoleteFile: deleting file=135_task_thumbnail.png
02-23 22:19:21.876 1889-2478/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout: null
02-23 22:19:21.911 1889-2478/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout: null
02-23 22:19:22.311 1889-2478/com.google.android.gms.persistent W/GLSUser: [AppCertManager] IOException while requesting key:
java.io.IOException: Invalid device key response.
at enr.a(:com.google.android.gms:282)
at enr.a(:com.google.android.gms:4237)
at enq.a(:com.google.android.gms:46)
at enk.a(:com.google.android.gms:53)
at enj.a(:com.google.android.gms:111)
at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms:4052)
at dxg.call(:com.google.android.gms:2043)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at kzi.run(:com.google.android.gms:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at ldm.run(:com.google.android.gms:17)
at java.lang.Thread.run(Thread.java:818)
02-23 22:19:22.312 1889-2403/com.google.android.gms.persistent W/ContentTaskController: Invalid newTask was provided to startTracking.
all steps in my question were correct but i was missing one:
create an ID client OAuth 2.0 in google developer console with my SHA1 and package name.
EDIT:
after some testing API KEY isn't needed, only ID client OAuth 2.0
This error happes on update TurnBasedMatch of google play services:
03-31 10:01:15.139 9179-9192/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10238 but it is really 10062
03-31 10:01:15.139 9179-9803/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10238 but it is really 10062
03-31 10:01:15.530 14236-4012/? E/Volley: [36392] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/games/v1/turnbasedmatches/ChEKCQTE4Jn3xhYQAhACGAAgARCI66qZ-IqAntsB/turn?language=en_GB
03-31 10:01:15.532 14236-9563/? E/TurnBasedAgent: Failed to update match: null
Few hours before i was playing it, so it's more likely the error on the service's side. Rebooting the phone doesn't help me as was suggested here
I am using renderscript library in my project and I perfectly run my apk on Samsung S4 I9500. But when I tried this in other phones I get crash.
No JNI_OnLoad found in /system/lib/libRSSupport.so 0x4185f0f0, skipping init
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti E/dalvikvm﹕ ERROR: couldn't find native method
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti E/dalvikvm﹕ Requested: Landroid/support/v8/renderscript/RenderScript;._nInit:()V
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti E/JNIHelp﹕ RegisterNatives failed for 'android/support/v8/renderscript/RenderScript', aborting
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti A/libc﹕ Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 8994
Any help appreciated. Thanks.
You forgot to include libRSSupport.so + the other native libraries in your .apk. This is attempting to load the system version of the compatibility, library, which will not work with your app.
I am trying to create a MediaPlayer in a very simple way:
mRingtonePlayer = MediaPlayer.create(this, mRingtoneUri);
Where, using logging, I can confirm that mRingtoneUri is: content://media/external/audio/media/1620
This is a file I've used numerous times for testing. When I attempt to run the code above, I get the following error:
01-13 11:33:21.108: ERROR/MediaPlayer(20685): message received msg=200, ext1=1, ext2=26
01-13 11:33:21.108: ERROR/MediaPlayer(20685): callback application
01-13 11:33:21.108: ERROR/MediaPlayer(20685): back from callback
01-13 11:33:21.108: ERROR/PlayerDriver(2197): Command PLAYER_PREPARE completed with an error or info -17
01-13 11:33:21.108: ERROR/MediaPlayer(20685): message received msg=100, ext1=1, ext2=-17
01-13 11:33:21.108: ERROR/MediaPlayer(20685): SISO TEST MEDIA_ERROR
01-13 11:33:21.108: ERROR/MediaPlayer(20685): error (1, -17)
01-13 11:33:21.108: ERROR/MediaPlayer(20685): callback application
01-13 11:33:21.108: ERROR/MediaPlayer(20685): back from callback
Again, this one line has worked for me for months. I am even using the same files that I did before, and the content uri is being generated.
Any ideas?
EDIT: Restarting the phone (twice) fixed the issue, but it still can happen intermittently on my device. Troublesome, but not a programming error per say.