Crash when no network is available during startup #1

Closed
opened 2024-04-17 15:02:02 +00:00 by dsonck · 5 comments
dsonck commented 2024-04-17 15:02:02 +00:00 (Migrated from git.touhou.fm)

Description

When the app is started without any networking available, it will immediately crash.

Cause

The radioknop.nl integration does not handle exceptions if they occur, hence the Host not found exception causes the app to crash

Proposed solution

Add a try around the api call. An extended suggestion is to actually let the LaunchedEffect run in a loop to:

  • retry the fetch if an exception occurs
  • refetch the list once every 24 hours if the fetch is successful
# Description When the app is started without any networking available, it will immediately crash. # Cause The `radioknop.nl` integration does not handle exceptions if they occur, hence the `Host not found` exception causes the app to crash # Proposed solution Add a `try` around the api call. An extended suggestion is to actually let the `LaunchedEffect` run in a loop to: - retry the fetch if an exception occurs - refetch the list once every 24 hours if the fetch is successful
dsonck commented 2024-04-17 19:19:39 +00:00 (Migrated from git.touhou.fm)

mentioned in commit 0bc24b0ec9

mentioned in commit 0bc24b0ec97b1a89c6ba2342ce6cb33acb0bf265
dsonck commented 2024-04-17 19:20:01 +00:00 (Migrated from git.touhou.fm)

created branch 1-crash-when-no-network-is-available-during-startup to address this issue

created branch [`1-crash-when-no-network-is-available-during-startup`](/misc/stream-player/-/compare/development...1-crash-when-no-network-is-available-during-startup) to address this issue
dsonck commented 2024-04-17 19:20:45 +00:00 (Migrated from git.touhou.fm)

mentioned in merge request !4

mentioned in merge request !4
dsonck commented 2024-04-17 19:41:27 +00:00 (Migrated from git.touhou.fm)

mentioned in commit f28bdc08a9

mentioned in commit f28bdc08a920672945b4faa39799f8520473b2ba
dsonck commented 2024-04-17 20:23:00 +00:00 (Migrated from git.touhou.fm)

mentioned in commit 2e93dc9d66

mentioned in commit 2e93dc9d6656326a109f7cf738c86855f0db7478
dsonck (Migrated from git.touhou.fm) closed this issue 2024-04-17 20:23:03 +00:00
Sign in to join this conversation.
No labels
bug
feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
misc/stream-player#1
No description provided.