When I launch my app from Android Studio, with Facebook SDK installed on my device, Xiaomi Mi A2, it triggers the same error trhee times. It does not stop the app, but I don't know if I am missing something or simply, it is not important, but in the end, it is an error and I want to clarify it.
I am using Android Studio 3.4.1, Android 9 on the Xiaomi A2 and the new clause in build.gradle file is implementation 'com.facebook.android:facebook-android-sdk:5.1.0'. Error has not appeared before upgrading Facebook SDK.
This is what appears in Logcat:
2019-06-24 18:24:31.202 25105-25136/com.myapp
E/com.facebook.appevents.RestrictiveDataManager:
updateRulesFromSetting failed
org.json.JSONException: End of input at character 0 of
at org.json.JSONTokener.syntaxError(JSONTokener.java:449)
at org.json.JSONTokener.nextValue(JSONTokener.java:97)
at org.json.JSONArray.(JSONArray.java:92)
at org.json.JSONArray.(JSONArray.java:108)
at com.facebook.appevents.RestrictiveDataManager.updateFromSetting(RestrictiveDataManager.java:32)
at com.facebook.internal.FetchedAppSettingsManager.parseAppSettingsFromJSON(FetchedAppSettingsManager.java:323)
at com.facebook.internal.FetchedAppSettingsManager.access$000(FetchedAppSettingsManager.java:63)
at com.facebook.internal.FetchedAppSettingsManager$1.run(FetchedAppSettingsManager.java:181)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
EDIT
The issue has been fixed in version 5.1.1.
Revert to 5.0.3 to get rid of this.
5.1.0 is actually crashing in production at this method (there's a bug report here). GitHub commits of this file show its rather flawed, the method is called from multiple threads concluding to a concurrency crash because it's using a static ArrayList.
Lately the core FB SDK is kinda bloated with useless stuff and low-quality code. The codeless stuff "feature" that simply can't even be turned off is especially a horror to look at. If you don't strictly need the FB SDK in your app, I'd avoid it until they get their shit figured out.
Related
I have recently installed Android Studio on my new setup. However, it keeps on crashing unexpectedly at random times, without warning.
The same exception keeps happening during the crash:
2022-01-13 15:23:06,066 [ 85372] WARN - util.DeprecatedMethodException - This method in 'com.intellij.codeInsight.daemon.LineMarkerInfo' is deprecated and going to be removed soon. Please use LineMarkerInfo(T, TextRange, Icon, Function, GutterIconNavigationHandler, Alignment, Supplier) instead
com.intellij.util.DeprecatedMethodException: This method in 'com.intellij.codeInsight.daemon.LineMarkerInfo' is deprecated and going to be removed soon. Please use LineMarkerInfo(T, TextRange, Icon, Function, GutterIconNavigationHandler, Alignment, Supplier) instead
at com.intellij.util.DeprecatedMethodException.report(DeprecatedMethodException.java:28)
at com.intellij.codeInsight.daemon.LineMarkerInfo.<init>(LineMarkerInfo.java:161)
at org.jetbrains.kotlin.idea.highlighter.KotlinSuspendCallLineMarkerProvider$SuspendCallMarkerInfo.<init>(KotlinSuspendCallLineMarkerProvider.kt:32)
at org.jetbrains.kotlin.idea.highlighter.KotlinSuspendCallLineMarkerProvider.collectSlowLineMarkers(KotlinSuspendCallLineMarkerProvider.kt:77)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:182)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:83)
at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:81)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:78)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1146)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:189)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
My machine is running on Ubuntu 21.10, and the Android Studio version is 2020.3.1 Patch 2, installed from snap(although the same problem happened when installed from the official website).
Thank you!
I am suddenly getting a number of crash reports around this the past few weeks. The crashes indicated missing metadata for certain country code. Most of them have been one of:
PhoneNumberMetadataProto_CN
PhoneNumberMetadataProto_BR
PhoneNumberMetadataProto_IR
The crashes seems to have occurred out of nowhere. I attempted to upgrade the AccountKit version from 4.28.0 to 4.31.0. This resulted in a moving where the crash occurred from com.facebook.accountkit.internal.Utility.parseNumber to com.facebook.accountkit.ui.PhoneNumberTextWatcher.getFormattedNumber but the crash is still occurring.
My next plan of attack is to try including the com.googlecode.libphonenumber dependency directly via Gradle instead of letting it just get included transitively from the AccountKit SDK, but I'm not holding my breath that it will fix the problem. Any other ideas are much appreciated.
I am having same problem here.
i am endup with adding dependency in gradle (like your next plan). Its working fine.
dependencies {
...
compile 'com.googlecode.libphonenumber:libphonenumber:8.+'
}
My game stops when I try to connect it with the google play games. It was working. But suddenly this is happening. It's showing development error occurred. Here's the logcat.
07:34.150 2144-2144/com.sennovations.countermaster E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.sennovations.countermaster, PID: 2144
java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.
at com.google.android.gms.common.internal.zze.zzs(Unknown Source)
at com.google.android.gms.common.internal.zzi.zzrk(Unknown Source)
at com.google.android.gms.common.internal.zzh.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
I have added the meta tags in the manifest.
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="#string/app_id" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
Any help would be appreciated. Thanks
Based on your comments I infer that this wasn't your issue, but as I encountered a similar error that I resolved as follows, I'll add this answer:
Google's documentation (here, for instance) currently instructs us to add
compile 'com.google.android.gms:play-services:11.0.4'
to build.gradle. Notice that it currently advises version 11.0.4. Google adds:
Be sure you update this version number each time Google Play services is updated.
This one line appears to be quite possibly some of the worst advice ever given.
Why? Two reasons.
Suppose you use their free BaseGameUtils, which Google itself encourages. Its build.gradle is set up to use version 8.4.0:
ext.gms_library_version = '8.4.0'
I did this, and used the webpage's advice to use version 11.0.4. The disagreement in library numbers caused the app to crash on both Android Studio emulator and a test device with a stack trace similar to the one above.
To be fair, Android Studio will warn you that things can go wrong with the different version numbers: if you open the Manifest file, it will underline the version numbers and whine that it finds two different version numbers, and it will even tell you which version numbers disagree, but -- this is key -- it won't tell you where to find the other file(s) with different version numbers. If you are importing several libraries, and/or compiling dependencies on GitHub or elsewhere, it can be a bit of a challenge to find the cause.
If your app requests Play Games services 11.0.4, but your emulator and/or phone have a lower version number (e.g., 11.0.2 as on my emulator), then the Games API's connect() will give status RESULT_CANCEL to onActivityResult(). The documentation on these result codes leaves something to be desired, so this can take a while to debug -- in fact, I think I think the crashes above were my only clue that the problem might be with the API version number.
There is a way to check that the device supports the requested API, but most of Google's documentation doesn't tell you to do it, and even BaseGameUtils doesn't seem to check for it. (You want to look at GoogleApiAvailability.GOOGLE_PLAY_SERVICES_VERSION_CODE.)
In my particular case, the problem was solved by changing my app's play-services version to 8.4.0. Works beautifully now.
My Android app is using 3rd party library that uses native libraries.
It is built with targetSdkVersion 21.
When running my app on Android 7 phones (in my example, LG G20), users start getting a visible error message upon process initialization.
The error message screenshot is attached.
When running the same app on Android 5.x and 6.x, there is no error shown to the user, although there is still a matching warning message in the log. Log message looks like:
library "/data/app/org.iotivity.base.examples.simpleclient-1/lib/arm/libocstack-jni.so" has invalid DT_NEEDED entry "./obj/local/armeabi/libocprovision.so"
ךibrary "/data/app/org.iotivity.base.examples.simpleclient-1/lib/arm/libocstack-jni.so" has invalid DT_NEEDED entry "./obj/local/armeabi/libocpmapi.so"
So it looks likes Android 7 "decides" to show to the end user a warning which is kept for the log only in previous versions.
I would appreciate:
1. Ideas on how the error message can be suppressed
2. Hints on what is the right solution for the issue (this is a 3rd party code, but I may try to tweak the build process)
Thanks in advance
Max
Crashlytics compile('com.crashlytics.sdk.android:crashlytics:2.4.0#aar') is integrated with the app and is being tested on nexus 7 4.4.4,
The crash is seen from application onCreate method and following stacktrace is obtained. No other similar error/explaination could be found on stackoverflow.
Any suggestions are welcome.
Caused by: java.lang.TypeNotPresentException: Type com/crashlytics/android/core/internal/CrashEventDataProvider not present
at java.lang.Class.getDeclaredAnnotation(Native Method)
at java.lang.Class.getAnnotation(Class.java:290)
at io.fabric.sdk.android.Kit.containsAnnotatedDependency(Kit.java:158)
at io.fabric.sdk.android.Kit.compareTo(Kit.java:140)
at io.fabric.sdk.android.Kit.compareTo(Kit.java:33)
at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:291)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:153)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:142)
at java.util.Arrays.sort(Arrays.java:1970)
at java.util.Collections.sort(Collections.java:1864)
at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:401)
at io.fabric.sdk.android.Fabric.init(Fabric.java:375)
at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:332)
at io.fabric.sdk.android.Fabric.with(Fabric.java:303)
at com.xxxx.MainApplication.onCreate(MainApplication.java:19)
Apparently android limiatation of 65K methods is the problem on pre-lollipop devices, the problem is not due to crashalytics library per-se but in general one might run into this problem due to limitation of 65K methods at dalvik level.
Thanks to http://frogermcs.github.io/MultiDex-solution-for-64k-limit-in-Dalvik/ I was able to get the no. of methods in my .apk file.