react-native-webrtc / react-native-webrtc/react-native-callkeep

App crashing on registerPhoneAccount for Android 13 for selfManaged true mode

Open
#722 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
511
Avg merge
9h 12m
Merged PRs (30d)
2

Description

Bug report

  • [*] I've checked the example to reproduce the issue.

  • Reproduced on:

  • [*] Android

  • iOS

Description

App is crashing during setup when trying to registerPhoneAccount in RNCallKeepModule for selfManaged true mode.

Steps to Reproduce

Setup RNCallKeep with selfManaged true.

  • Install the app for the first time, app is not crashing.
  • Once you kill the app, then it's crashing everytime at launch.

Versions

- Callkeep: 4.3.1
- React Native: 0.62.3
- iOS:
- Android: 13
- Phone model: All

Logs

E/unknown:ReactNative: Exception in native call
    java.lang.IllegalArgumentException: Error, cannot change a self-managed phone account ComponentInfo{*app-package-id*/io.wazo.callkeep.VoiceConnectionService}, ***, UserHandle{0} to other kinds of phone account
        at android.os.Parcel.createExceptionOrNull(Parcel.java:3027)
        at android.os.Parcel.createException(Parcel.java:3007)
        at android.os.Parcel.readException(Parcel.java:2990)
        at android.os.Parcel.readException(Parcel.java:2932)
        at com.android.internal.telecom.ITelecomService$Stub$Proxy.registerPhoneAccount(ITelecomService.java:1738)
        at android.telecom.TelecomManager.registerPhoneAccount(TelecomManager.java:1612)
        at io.wazo.callkeep.RNCallKeepModule.registerPhoneAccount(RNCallKeepModule.java:853)
        at io.wazo.callkeep.RNCallKeepModule.registerPhoneAccount(RNCallKeepModule.java:243)
        at io.wazo.callkeep.RNCallKeepModule.setup(RNCallKeepModule.java:223)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:1012)
     Caused by: android.os.RemoteException: Remote stack trace:
        at com.android.server.telecom.PhoneAccountRegistrar.enforceSelfManagedAccountUnmodified(PhoneAccountRegistrar.java:1000)
        at com.android.server.telecom.PhoneAccountRegistrar.addOrReplacePhoneAccount(PhoneAccountRegistrar.java:925)
        at com.android.server.telecom.PhoneAccountRegistrar.registerPhoneAccount(PhoneAccountRegistrar.java:905)
        at com.android.server.telecom.TelecomServiceImpl$1.registerPhoneAccount(TelecomServiceImpl.java:623)
        at com.android.internal.telecom.ITelecomService$Stub.onTransact(ITelecomService.java:857)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the example reproduction and the RNCallKeepModule.setup and registerPhoneAccount entry points named in the stack trace. Reproduce on Android 13 with selfManaged true, including a fresh install and relaunch after killing the app, then inspect the registration failure. Done means setup no longer crashes on launch in the reported scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.