Skip to content

Phone Island: WebRTC/Janus stability issues after network changes and standby #7785

Closed
nethesis/phone-island
#128

Description

@edospadoni

Description

Phone Island experiences several stability issues related to Janus/WebRTC connections after network changes, standby/lock screen return, and rapid WiFi toggling.


Issues

1. React Error #310 - App crash on quick WiFi toggle

Scenario: Rapidly disconnecting and reconnecting WiFi causes the application to crash with React error #310 (too many re-renders / infinite loop).

Cause: The socket ping check interval continues running during reconnection, and stale ping timeouts set the socket_down alert even after the socket has already reconnected, triggering repeated reload cycles.


2. Error 469 "Unexpected ANSWER" after network changes

Scenario: After network changes (WiFi switch, VPN toggle) or returning from system standby, incoming calls fail with Janus error 469.

Cause: The jsepGlobal (SDP offer) becomes stale after network changes. When the client tries to answer with an outdated offer, Janus rejects it.


3. Multiple Janus sessions being created

Scenario: After network disruption, multiple Janus sessions are created in rapid succession, causing resource leaks and unexpected behavior.

Cause: The destroy call was targeting the wrong reference (janus.current instead of the actual session instance), and there was no guard against concurrent initialization attempts.


4. Session destroyed but no new one created

Scenario: After certain network events, the Janus session is destroyed but a new one is never created, leaving the WebRTC in a broken state.

Cause: Session cleanup was performed before checking if initialization was already in progress, causing a race condition.


5. Infinite reload loop when network is down

Scenario: When the network goes completely offline, the app enters an infinite reload loop trying to reconnect.

Cause: The alert-based reload mechanism had no cooldown and no check for actual network availability.


6. Audio warm-up destroys active calls (NethLink)

Scenario: In NethLink, returning from lock screen with an active call causes the call to be terminated.

Cause: The phone-island-init-audio event triggers a test call for audio warm-up without checking if there's already an active call in progress.


Affected Components

  • phone-island - WebRTC.tsx, Socket.tsx, App.tsx
  • nethlink - PhoneIslandPage.tsx, ipcEvents.ts, main.ts (for NethLink-specific issues)

Activity

  1. self-assigned this
    on Dec 10, 2025
  2. added
    nethvoice
    nethvoice-cti
    nethlink
    on Dec 10, 2025
  3. added theissue type on Dec 10, 2025
  4. moved this from Todo to In Progress in NethVoiceon Dec 10, 2025
  5. added this to the NethVoice 1.5 milestone on Dec 10, 2025
  6. added
    testing
    on Dec 17, 2025
  7. moved this from In Progress to Testing in NethVoiceon Dec 17, 2025
  8. removed their assignment
    on Jan 12, 2026
  9. added
    verified
    on Jan 12, 2026
  10. removed
    testing
    on Jan 12, 2026
  11. moved this from Testing to Verified in NethVoiceon Jan 12, 2026
  12. Amygos commented on Jan 13, 2026

    @Amygos
    Member

    Release nethesis/ns8-nethvoice 1.5.4

  13. moved this from Verified to Done in NethVoiceon Jan 13, 2026
  14. removed
    verified
    on Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    nethlinknethvoicenethvoice-cti

    Type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions