Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException on MutableClientState.setUser #5202

Closed
donlan opened this issue Mar 11, 2024 · 2 comments
Closed

NullPointerException on MutableClientState.setUser #5202

donlan opened this issue Mar 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@donlan
Copy link

donlan commented Mar 11, 2024

Describe the bug

Crash tracks:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Class.isInterface()' on a null object reference
       at java.lang.Class.isAssignableFrom(Class.java:824)
       at java.lang.Class.isInstance(Class.java:774)
       at java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.accessCheck(AtomicReferenceFieldUpdater.java:421)
       at java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.get(AtomicReferenceFieldUpdater.java:479)
       at kotlinx.coroutines.flow.StateFlowSlot.makePending(StateFlow.kt:268)
       at kotlinx.coroutines.flow.StateFlowImpl.updateState(StateFlow.kt:345)
       at kotlinx.coroutines.flow.StateFlowImpl.setValue(StateFlow.kt:312)
       at io.getstream.chat.android.client.setup.state.internal.MutableClientState.setUser(MutableClientState.kt:95)
       at io.getstream.chat.android.client.ChatClient.handleEvent(ChatClient.kt:440)
       at io.getstream.chat.android.client.ChatClient.access$getEventMutex$p(ChatClient.kt)
       at io.getstream.chat.android.client.ChatClient.access$handleEvent(ChatClient.kt)
       at io.getstream.chat.android.client.ChatClient$1.onEvent(ChatClient.kt:372)
       at io.getstream.chat.android.client.utils.observable.SuspendSubscription$onNext$2.invokeSuspend(Subscriptions.kt:84)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt)

SDK version

  • 6.0.14

To Reproduce
No idea. Crash reported from Firebase.

Expected behavior

Device:
image

Screenshots
None.

@donlan donlan added the bug Something isn't working label Mar 11, 2024
@JcMinarro
Copy link
Member

Hello @donlan
This error comes from the Kotlinx Coroutines Library.
Digging on their repository, they already have an opened issue related to it, and looks like the root cause is on the Android Runtime code, mainly on Android 12, 13 and 14 :(
There is an issue on the Android Issues Tracker as well.

@kanat
Copy link
Collaborator

kanat commented Sep 25, 2024

Resolved by #5319

@kanat kanat closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants