I've updated the following libraries:
- kotlin.reflect to 1.5.31
- room.paging to 2.4.0-alpha05
- room.ktx to 2.4.0-alpha05
and now all features of my app that use list of Room objects with Flow and Paging (all my RecyclerViews actually) crash with the following vague exception:
java.lang.AbstractMethodError: abstract method "java.lang.Object androidx.paging.PagingDataDiffer.presentNewList(androidx.paging.NullPaddedList, androidx.paging.NullPaddedList, int, kotlin.jvm.functions.Function0, kotlin.coroutines.Continuation)"
at androidx.paging.PagingDataDiffer$collectFrom$2$1$1.invokeSuspend(PagingDataDiffer.kt:151)
at androidx.paging.PagingDataDiffer$collectFrom$2$1$1.invoke(Unknown Source:8)
at androidx.paging.PagingDataDiffer$collectFrom$2$1$1.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
at androidx.paging.PagingDataDiffer$collectFrom$2$invokeSuspend$$inlined$collect$1.emit(Collect.kt:135)
at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:62)
at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl(Channels.kt:1)
at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Unknown Source:14)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoop.processUnconfinedEvent(EventLoop.common.kt:69)
at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:244)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:161)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:398)
at kotlinx.coroutines.CancellableContinuationImpl.completeResume(CancellableContinuationImpl.kt:514)
at kotlinx.coroutines.channels.AbstractChannel$ReceiveElement.completeResumeReceive(AbstractChannel.kt:907)
at kotlinx.coroutines.channels.ArrayChannel.offerInternal(ArrayChannel.kt:83)
at kotlinx.coroutines.channels.AbstractSendChannel.send(AbstractChannel.kt:134)
at androidx.paging.PageFetcherSnapshot.doInitialLoad(PageFetcherSnapshot.kt:318)
at androidx.paging.PageFetcherSnapshot.access$doInitialLoad(PageFetcherSnapshot.kt:55)
at androidx.paging.PageFetcherSnapshot$doInitialLoad$1.invokeSuspend(Unknown Source:14)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8512)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
If I restore the previous version of the libraries everything works fine once again. Please help !
NOTE:
Do not bind this question to the following one:
Paging crash
because the answer to that question is not even related to this one because the Compose package is not used or even included in my project, and it doesn't work ( I tested it).
Use Paging 3.1.0-beta01 to fix, or revert Room back to stable 2.3.0.
The Paging library seems to have broken binary compatibility between 3.0.x and 3.1.0, and Room 2.4.0-alpha05+ is using the updated contract.
This is most likely related to the new room-paging library. They talk a lot about new paging interop requirements in the release notes, but I don't see anything which calls out strict version requirements. https://developer.android.com/jetpack/androidx/releases/room#2.4.0-beta01
Related
since I´ve downloaded the Android 11 update (Samsung Galaxy S10e; also tested with Android SDK´s Emulator running Android 11, same results), the DSP app "Noozxoide EIZO-rewire™ PRO" is always crashing when started. I know that this app was developed for Android 4.0, but it was even working properly on Android 10. I decided to download Android SDK to test in on VM and look at the logcat.
I would like to get the app working because it improves the audio quality perfectly and I don´t know any similar app like this one. I wanted to contact the developers of the app but their e-mail adress does not exist anymore.
I don´t have any experience with developing apk´s, but maybe someone can help me :)
I have already read some logcat explanations and guide to migrating apps to Android 11 on developer.android but it didn´t really help me with this.
Maybe can someone explain to me what´s happening in this logcat part:
2021-02-24 20:21:19.648 10997-10997/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.noozxoidelabs.eizo.rewirepro, PID: 10997
java.lang.RuntimeException: java.lang.NoSuchMethodException: android.media.audiofx.AudioEffect.setParameter [class [B, class [B]
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine.updateDsp(VSPCoreEngine.java:231)
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine$4.onCallStateChanged(VSPCoreEngine.java:129)
at android.telephony.PhoneStateListener$IPhoneStateListenerStub.lambda$onCallStateChanged$10(PhoneStateListener.java:1185)
at android.telephony.-$$Lambda$PhoneStateListener$IPhoneStateListenerStub$6czWSGzxct0CXPVO54T0aq05qls.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.NoSuchMethodException: android.media.audiofx.AudioEffect.setParameter [class [B, class [B]
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getMethod(Class.java:1693)
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine.updateDsp(VSPCoreEngine.java:226)
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine$4.onCallStateChanged(VSPCoreEngine.java:129)
at android.telephony.PhoneStateListener$IPhoneStateListenerStub.lambda$onCallStateChanged$10(PhoneStateListener.java:1185)
at android.telephony.-$$Lambda$PhoneStateListener$IPhoneStateListenerStub$6czWSGzxct0CXPVO54T0aq05qls.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Thanks in advance
PS: sorry for my misstakes in English :)
From the Google Play Store comments for that app, support is no longer available, and due to framework code changes won't work on modern Android
Similar to: Compile error: Cannot find symbol AudioEffect::setParameter in Android Studio
A quick check of the source shows that in old version of Android:
https://android.googlesource.com/platform/frameworks/base/+/5bb8f80/media/java/android/media/audiofx/AudioEffect.java
No annotation was on setParameter(...)
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android11-d1-release/media/java/android/media/audiofx/AudioEffect.java
While in newer ones the setParameter(...) functions is now hidden by #TestApi and throw an exception if not initialized correctly.
Any fix will require developer to update code.
I have the solution you're looking for. I downloaded an app from the Play Store called App Cloner, and ran Noozxoide through this program to create a cloned apk. The cloned app installed perfectly and worked fine on Android 11.
We are getting several of the following errors when running logcat in our React Native Android app. Intially they seem harmless and they doesn't crash the app. However, if possible I'd like to get some guidance on how to debug them to understand what's going on.
Unable to update properties for view tag 323
com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 323 could not be found.
View already dropped? false.
Last index 0 in last 100 views[I#1eeace9
at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:112)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:135)
at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:309)
at com.facebook.react.uimanager.UIManagerModule.synchronouslyUpdateViewOnUIThread(UIManagerModule.java:396)
at com.facebook.react.animated.PropsAnimatedNode.updateView(PropsAnimatedNode.java:94)
at com.facebook.react.animated.NativeAnimatedNodesManager.updateNodes(NativeAnimatedNodesManager.java:544)
at com.facebook.react.animated.NativeAnimatedNodesManager.runUpdates(NativeAnimatedNodesManager.java:453)
at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:100)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:965)
at android.view.Choreographer.doCallbacks(Choreographer.java:791)
at android.view.Choreographer.doFrame(Choreographer.java:722)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
EDIT: Just for reference we are using react-native 0.60.5, react-navigation 3.13.0 and react-native-paper 3.10.1. Also, we see these errors when we first open the app.
Thanks!
In my case, I was using the properties flex and padder of a View from Native Base after the property style. When I moved the two properties before the style property everything starts working 🤦♂️
Faced this problem recently, we had a common package that had UI Components for both web and mobile. A component was using the css property 'inherit'. This is fine in web, but it caused the crash in mobile.
In my case, it was a mistake it was a typo in a style.
I got error at firestore stuff when build apk release, the app force close when access that firestore code. But its fine when direct running (debug) in AS/VS code. Any one can explain this?
java.lang.RuntimeException: Internal error in Firestore (19.0.0).
at com.google.firebase.firestore.g.j.a(:379)
at com.google.firebase.firestore.g.g.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:794)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6651)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
Caused by: java.lang.AbstractMethodError: abstract method "b.b.g.w$d b.b.g.w$d.b(int)"
at b.b.g.r.a(:1319)
at b.b.e.a.da.C(:5440)
at b.b.e.a.da.a(:5509)
at b.b.e.a.da.a(:13)
at b.b.e.a.da$a.a(:6589)
at com.google.firebase.firestore.f.y.b(:730)
at com.google.firebase.firestore.c.h.a(:215)
at com.google.firebase.firestore.c.va.c(:103)
at com.google.firebase.firestore.c.va.a(:142)
at com.google.firebase.firestore.c.t.a(:530)
at com.google.firebase.firestore.c.q.run(Unknown Source:6)
at com.google.firebase.firestore.c.na.a(:180)
at com.google.firebase.firestore.c.t.a(:520)
at com.google.firebase.firestore.b.P.a(:178)
at com.google.firebase.firestore.b.m.a(:91)
at com.google.firebase.firestore.b.z.b(:152)
at com.google.firebase.firestore.b.v.run(Unknown Source:4)
at com.google.firebase.firestore.g.j.a(:311)
at com.google.firebase.firestore.g.f.call(Unknown Source:2)
at com.google.firebase.firestore.g.j.a(:287)
at com.google.firebase.firestore.g.e.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.firebase.firestore.g.j$a.run(:205)
at java.lang.Thread.run(Thread.java:764)
To fix this error, update android.enableR8=false in gradle.properties. You need to add this row cause default value true.
There seems to be an issue with the resource optimization (shrink code and obfuscation) when dealing with the Firestore package as seen from java.lang.AbstractMethodError: abstract method "b.b.g.w$d b.b.g.w$d.b(int)" which appears to be obfuscated code.
The help message from flutter build apk -h states that
--[no-]shrink Whether to enable code shrinking on release mode.When enabling shrinking, you also benefit from obfuscation, which shortens the names of your app’s classes and members, and optimization, which applies more aggressive strategies to further reduce the size of your app. To learn more, see: https://developer.android.com/studio/build/shrink-code (defaults to on)
You can use the --no-shrink tag when building the apk such as flutter build apk --release --no-shrink to disable shrink code and obfuscation but note that this results in a larger apk.
I am using react native. I am getting the crashes on crashlytics with the error INVALID_STATE_ERR.I am using FireBase Crashlytics. I am also using MQTT client for making web socket connection.
I am not able to figure out the reason of crashing the app. Is it due to the MQTT WebSockets or due to the error occurring on javascript thread? I am also not getting any relevant message from the stack trace either.
I am pasting my Stack Trace below.
Fatal Exception: com.facebook.react.common.JavascriptException: INVALID_STATE_ERR, stack:
value#79:1340
_socket_send#557:21101
_on_socket_open#557:16408
<unknown>#557:628
value#63:1501
<unknown>#79:4566
value#32:1363
value#18:3559
<unknown>#18:1044
value#18:2986
value#18:1016
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Can I get more insight to fix this issue?
According to this Wix GitHub issue, it is caused by:
Too many views on older phones. RNN added a few nested views, but it appears I may have too many anyways.
That issue links to a pull request on React Native's GitHub repo, which should now be merged in. It mentions the issue is on pre-API 21, so I suggest you try your code on later APIs and see if it persists.
Either way, reducing the number of views (or requests, in this case?) seems a good first step.
We have released our first Kotlin pieces into production and we are getting crashes with this stacktrace:
Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at kotlin.jvm.internal.ReflectionFactory.renderLambdaToString(ReflectionFactory.java:47)
at kotlin.jvm.internal.Reflection.renderLambdaToString(Reflection.java:80)
at kotlin.jvm.internal.Lambda.toString(Lambda.kt:22)
at java.lang.StringBuilder.append(StringBuilder.java:202)
at kotlinx.coroutines.experimental.DispatchedContinuation.toString(CoroutineDispatcher.kt:192)
at java.lang.StringBuilder.append(StringBuilder.java:202)
at kotlinx.coroutines.experimental.DispatchTask.toString(CoroutineDispatcher.kt:124)
at java.lang.StringBuilder.append(StringBuilder.java:202)
at android.os.Looper.loop(Looper.java:160)
at android.app.ActivityThread.main(ActivityThread.java:5637)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Google show us this is happening in 100 % on Android 5. Crashlytics/Fabric shows also two crashes from Android 4.4. No crashes from newer Android versions.
I have no idea how to prevent this crash or how to replicate it.
Current version:
org.jetbrains.kotlinx:kotlinx-coroutines-core:0.16
That is a bug in Kotlin reflection. Meanwhile, I'd suggest to upgrade to the latest version of kotlinx.coroutines library (you can find what is the latest version here). Since version 0.17 DispatchTask.toString does not try to covert lambda to string anymore. It's toString implementation is actually more useful now and has more relevant information for debugging purposes.