Android facebook sdk internal utility java.lang.AssertionError - android

I have been using version 4.27.0 of facebook sdk for android. I have been getting a crash only for android 8+ devices. The stack trace is as follows:
Fatal Exception: java.lang.AssertionError: No NameTypeIndex match for SHORT_DAYLIGHT
at android.icu.impl.TimeZoneNamesImpl$ZNames.getNameTypeIndex(TimeZoneNamesImpl.java:724)
at android.icu.impl.TimeZoneNamesImpl$ZNames.getName(TimeZoneNamesImpl.java:790)
at android.icu.impl.TimeZoneNamesImpl.getTimeZoneDisplayName(TimeZoneNamesImpl.java:183)
at android.icu.text.TimeZoneNames.getDisplayName(TimeZoneNames.java:261)
at java.util.TimeZone.getDisplayName(TimeZone.java:405)
at java.util.TimeZone.getDisplayName(TimeZone.java:370)
at com.facebook.internal.Utility.refreshTimezone(Utility.java:1066)
at com.facebook.internal.Utility.refreshPeriodicExtendedDeviceInfo(Utility.java:1056)
at com.facebook.internal.Utility.setAppEventExtendedDeviceInfoParameters(Utility.java:707)
at com.facebook.internal.AppEventsLoggerUtility.getJSONObjectForGraphAPICall(AppEventsLoggerUtility.java:68)
at com.facebook.FacebookSdk.publishInstallAndWaitForResponse(FacebookSdk.java:568)
at com.facebook.FacebookSdk$4.run(FacebookSdk.java:547)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
I have searched for this over the web but couldn't get anything useful. Please provide some pointers here.

I am facing this issue too, upgrade the Facebook SDK to the latest (Facebook Android SDK 4.35), they have added a workaround for this issue:
private static void refreshTimezone() {
try {
TimeZone tz = TimeZone.getDefault();
deviceTimezoneAbbreviation = tz.getDisplayName(
tz.inDaylightTime(new Date()),
TimeZone.SHORT
);
deviceTimeZoneName = tz.getID();
} catch (AssertionError e) {
// Workaround for a bug in Android that can cause crashes on Android 8.0 and 8.1
} catch (Exception e) {
}
}

Yes, Even I am facing this kind of issue in my app while using volley library, Coming in devices having Android 8.0.1 version.
Fatal Exception: java.lang.AssertionError
No NameTypeIndex match for SHORT_STANDARD
android.icu.impl.TimeZoneNamesImpl$ZNames.getNameTypeIndex
(TimeZoneNamesImpl.java:724)
android.icu.impl.TimeZoneNamesImpl$ZNames.getName
(TimeZoneNamesImpl.java:790)
android.icu.impl.TimeZoneNamesImpl.getTimeZoneDisplayName
(TimeZoneNamesImpl.java:183)
android.icu.text.TimeZoneNames.getDisplayName (TimeZoneNames.java:261)
java.text.SimpleDateFormat.subFormat (SimpleDateFormat.java:1296)
java.text.SimpleDateFormat.format (SimpleDateFormat.java:1004)
java.text.SimpleDateFormat.format (SimpleDateFormat.java:974)
java.text.DateFormat.format (DateFormat.java:341)
com.android.volley.toolbox.HttpHeaderParser.formatEpochAsRfc1123
(HttpHeaderParser.java:152)
com.android.volley.toolbox.BasicNetwork.getCacheHeaders
(BasicNetwork.java:256)
com.android.volley.toolbox.BasicNetwork.performRequest
(BasicNetwork.java:130)
com.android.volley.NetworkDispatcher.processRequest
(NetworkDispatcher.java:120)
com.android.volley.NetworkDispatcher.run (NetworkDispatcher.java:87)
When I raised this issue on volley github, after checking they responded that this is device framework issue, means manufacture customized os bug.
I feel we both are facing the same issue, as the lines where the bug actually starts is "android.icu.text.TimeZoneNames.getDisplayName(TimeZoneNames.java:261)" is same in both of our stacktraces. This is more of ICU package issue that is embedded in the framework. I found one personally forked Git class of a google developer which is a class of IBM icu, where the line number 722 " throw new AssertionError("No NameTypeIndex match for " + type);" is actually throwing the error in both of our cases. Let's hope Google comes up with the fixes or any workaround for the same. I may be wrong in my observation, do your own research.

Related

How to file a bug for the AOSP?

this isn't directly a question about android development, but about how to file a bug report if you found a bug within the android OS.
I have seen this documentation link: https://source.android.com/docs/setup/contribute/report-bugs
which finally leads to this bug-tracking system:
https://issuetracker.google.com/issues?q=status:open%20componentid:190923
I created a bug report there, however, after creating it I get an error message saying:
New issue created: 259508180 (view access not granted)
Am I missing something? Thanks in advance for the help!

React-native-ble-plx unable to read with Android version less than 9

I am using React native version "0.63.3" and "react-native-ble-plx" version "2.0.2".
I am unable to read the characteristics in Android version less than 9.
It throws an error "Disconnected from {deviceId} with status 22 (UNKNOWN)"
If I debug, I could find this in BleError.js is thrown
"Error: Unknown error occurred. This is probably a bug! Check reason property"
Any help is appreciated!
I was recently working on an app requiring bluetooth functionality, I found this library to be much better than react-native-ble-plx, make sure to also check out their example to get a better understanding of how it works.

Xamarin Android error on DeviceInfo.Model

I have a Xamarin for Android app that has been working until today. I needed to make a change but before I did, I ran a test to ensure no VS or Nuget package updates caused an issue. I have Xamarin.Essentials in my app and this line worked before, not sure what is happening now.
if(DeviceInfo.Model == "TC72"){scannerIndex = 1;}
Exception Unhandled:
Xamarin.Essentials.NotImplementedInReferenceAssemblyException: 'This
functionality is not implemented in the portable version of this
assembly. You should reference the NuGet package from your main
application project in order to reference the platform-specific
implementation.'
Any insight would be helpful. TIA
I changed the DeviceInfo.Model to Build.Model and get the same info I was expecting. That fixed my issue. If anyone has a different suggestion, happy to entertain them.
Added 8/11/21 3:25pm CT
I also found that changing my Compile Target to 10.0 fixed the Xamarin.Essentials issues. So far the application is working on 8.1 on the device (Zebra MC3300).

No Value for WL-Authentication-Error Exception

When using the WLResourceRequest API ,Launching Native Android
application will result in the following exception:
WLRequest.java:729 :: No value for WL-Authentication-Failure
org.json.JSONException: No value for
WL-Authentication-Failure
at org.json.JSONObject.get(JSONObject.java:389)
The application will run normally and the exception only appears
in the log
Worklight Versions Affected:7.0. In ibm support portal, it says its a cosmetic issue and apply the fix for error in the log to go away.
I am not sure what is the "fix for error in the log to go away". I have the latest fix pack of 7.0 in my server version: 7.0.0.00.20150729-1801.
http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg1PI46002
You do not have the latest iFix according to the document you have linked to.
It was submitted on August 2nd, but your build is from July 20th.
Find an iFix in IBM Fix Central that is newer than your build. If it's not there, mention this in the comments.

NullPointerException while using Monkeytalk tool

Hello I have implemented MonkeyTalk library in my app I used following steps given at https://www.gorillalogic.com/monkeytalk-documentation/monkeytalk-getting-started/install-agent/android.
Through these steps i am successfully able to record and playback steps in monkey talk IDE.
Now issue is when i use my app after installing the library it crashes randomly at several places giving NullPointerException. Log of one such incident is given below:
05-08 19:29:13.661: E/AndroidRuntime(27158): FATAL EXCEPTION: Thread-4790
05-08 19:29:13.661: E/AndroidRuntime(27158): java.lang.NullPointerException
05-08 19:29:13.661: E/AndroidRuntime(27158): at com.gorillalogic.fonemonkey.ActivityManager$2.run(ActivityManager.java:112)
05-08 19:29:13.661: E/AndroidRuntime(27158): at java.lang.Thread.run(Thread.java:856)
Any help to resolve the issue would be greatly appreciated.
I am using Eclipse Juno and Target SDK is 4.2 for development.
I got the same error when I tried to invoke another application (which does not have Monkey Talk Agent) from our application which is integrated with Monkey Talk Agent. So I have added a null pointer check in the monkey talk source code and that fixed the problem.
ActivityManager.cjava - checkIsClipped() function:
// Adding a null pointer check for the case where the application invokes another application that does not have
// MonkeyTalk Agent integrated (for eg: Zxing barcode scanner). In this case the top activity would be null.
catch (NullPointerException e) {
e.printStackTrace();
}

Categories

Resources