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

PhoneAccount.isEnabled called on null object

Open
#179 1 comment 0 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

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

  • Reproduced on:

  • [x ] Android

  • iOS

Description

https://github.com/react-native-webrtc/react-native-callkeep/commit/6c18fdf5c7f183d8befb960bf6e1f79a86c9e2e8

I think this still has an issue. getPhoneAccount(handle) can return null, even when telecomManager is not null, causing isEnabled to be called on a null object.

Should be:

return isConnectionServiceAvailable() && telecomManager != null && telecomManager.getPhoneAccount(handle) != null && telecomManager.getPhoneAccount(handle).isEnabled();

Steps to Reproduce

Try to call setup on a device that has ConnectionService, but not PhoneAccount (any tablet with SDK > 23)

hasPhoneAccount cannot be used gracefully to detect this configuration as it crashes itself. supportConnectionService returns true on these devices.

Versions

- Callkeep: 3.0.12
- React Native: 0.61.5
- iOS: N/A
- Android: Any with SDK > 23
  • Phone model: Various tablets

Logs

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

Locate the Android implementation of hasPhoneAccount and start from getPhoneAccount(handle), along with supportConnectionService and setup. Reproduce on an Android SDK greater than 23 tablet without a PhoneAccount; done means hasPhoneAccount handles the missing account without crashing and reports the unavailable state.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, react-native
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.