nextcloud / nextcloud/talk-android

Crash during call if no STUN server is available

Open
#2,466 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
Kotlin
Stars
739
Forks
321
Avg merge
14h 59m
Merged PRs (30d)
151

Description

Steps to reproduce
  1. Remove STUN server from Talk configurations on the Nextcloud instance. Don't use the trash symbol! Only remove the string from the text field.
  2. Freshly start NC Talk for Android
  3. Start a call
Expected behaviour

App informs that no call can be made because no STUN server is configured. The administrator must be contacted

Actual behaviour

App crashes

Device brand and model

Samsung SM-A326B

Android version

13

Nextcloud Talk app version

15.0.0 RC3

Nextcloud server version

24.0.5

Talk version

14.0.5

Custom Signaling server configured

No response

Custom TURN server configured

No

Custom STUN server configured

No

Android logs

No response

Server log

No response

Additional information

The stacktrace:

java.lang.NullPointerException: Attempt to invoke virtual method 'org.webrtc.PeerConnection$IceConnectionState org.webrtc.PeerConnection.iceConnectionState()' on a null object reference
	at com.nextcloud.talk.activities.CallActivity.setupVideoStreamForLayout(CallActivity.java:2349)
	at com.nextcloud.talk.activities.CallActivity.lambda$processUsersInRoom$14$com-nextcloud-talk-activities-CallActivity(CallActivity.java:1904)
	at com.nextcloud.talk.activities.CallActivity$$ExternalSyntheticLambda20.run(Unknown Source:4)
	at android.app.Activity.runOnUiThread(Activity.java:7258)
	at com.nextcloud.talk.activities.CallActivity.processUsersInRoom(CallActivity.java:1903)
	at com.nextcloud.talk.activities.CallActivity.receivedSignalingMessage(CallActivity.java:1650)
	at com.nextcloud.talk.activities.CallActivity.receivedSignalingMessages(CallActivity.java:1634)
	at com.nextcloud.talk.activities.CallActivity.access$2300(CallActivity.java:185)
	at com.nextcloud.talk.activities.CallActivity$13$1.onNext(CallActivity.java:1494)
	at com.nextcloud.talk.activities.CallActivity$13$1.onNext(CallActivity.java:1484)
	at io.reactivex.internal.operators.observable.ObservableRetryPredicate$RepeatObserver.onNext(ObservableRetryPredicate.java:69)
	at io.reactivex.internal.operators.observable.ObservableTakeWhile$TakeWhileObserver.onNext(ObservableTakeWhile.java:88)
	at io.reactivex.internal.util.HalfSerializer.onNext(HalfSerializer.java:107)
	at io.reactivex.internal.operators.observable.ObservableRepeatWhen$RepeatWhenObserver.onNext(ObservableRepeatWhen.java:100)
	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
	at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:226)
	at android.os.Looper.loop(Looper.java:313)
	at android.app.ActivityThread.main(ActivityThread.java:8751)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

There is also a related issue in spreed: https://github.com/nextcloud/spreed/pull/8020
But also if that one is fixed, it must handled better in the client.

Contributor guide

Open the contributing guide

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 CallActivity.java, especially setupVideoStreamForLayout at line 2349 and the processUsersInRoom path shown in the stack trace. Reproduce a call with the STUN field empty and inspect the peer-connection state access. Done means the app no longer crashes and informs the user that calling cannot proceed because no STUN server is configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.