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

`NullPointerException` when not calling setup on android.

Open
#435 1 comment 1 reaction 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

When I init CallKeep in background without calling setup method. CallKeep throw this exception:
image
I tried to insert one more check to this line:
https://github.com/react-native-webrtc/react-native-callkeep/blob/master/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java#L122
become:

private boolean isSelfManaged() {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && _settings != null && _settings.hasKey("selfManaged") && _settings.getBoolean("selfManaged");
    }

And it works. Maybe we need a PR for it?

Steps to Reproduce

Versions

- Callkeep:
- React Native:
- iOS:
- Android:
- Phone model: 

Logs

Paste here

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

Read android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java around line 122, then use the linked example to reproduce Android background initialization without calling setup. Compare the reported isSelfManaged change with the current behavior; done means this path no longer throws a NullPointerException when setup was omitted.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.