[GH-ISSUE #1582] Android app crashes when URL scheme is missing #1111

Closed
opened 2026-05-07 00:30:20 +02:00 by BreizhHardware · 1 comment

Originally created by @hard-zero1 on GitHub (Jan 31, 2026).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1582

🐞 Describe the bug
When no URL scheme is given in the default server setting (e.g. "unifiedpush.kde.org" instead of "https://unifiedpush.kde.org") and then another app registers a topic via UnifiedPush, the ntfy app crashes immediately when trying to open it. It's then not possible to add a scheme anymore, even if you know that's the problem.

💻 Components impacted
Android app, version 1.22.2

💡 Screenshots and/or logs
Log from the crash obtained via adb logcat:

--------- beginning of crash
01-31 03:54:33.145 22996 23030 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-3
01-31 03:54:33.145 22996 23030 E AndroidRuntime: Process: io.heckel.ntfy, PID: 22996
01-31 03:54:33.145 22996 23030 E AndroidRuntime: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no scheme was found for unifie...
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1360)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1734)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at okhttp3.Request$Builder.url(Request.kt:230)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at io.heckel.ntfy.util.HttpUtil.requestBuilder(HttpUtil.kt:61)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at io.heckel.ntfy.service.WsConnection.start(WsConnection.kt:79)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at io.heckel.ntfy.service.SubscriberService.reallyRefreshConnections(SubscriberService.kt:278)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at io.heckel.ntfy.service.SubscriberService.access$reallyRefreshConnections(SubscriberService.kt:66)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at io.heckel.ntfy.service.SubscriberService$reallyRefreshConnections$1.invokeSuspend(Unknown Source:15)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
01-31 03:54:33.145 22996 23030 E AndroidRuntime:        Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@e1f350d, Dispatchers.IO]

🔮 Additional context
I changed the default server to "unifiedpush.kde.org" and then installed Foss Warn, tried to add a place there and got an error. The Foss Warn self-check reported a problem with notifications. So I tried to open ntfy and it immediately crashed every time (I believe there was a second/new topic in the list that was briefly visible, additional to one registered before changing the default server). After reinstalling ntfy and changing the default server to "https://unifiedpush.kde.org" (after seeing from the logs what the problem was) everything worked fine and I could setup Foss Warn without errors.

Originally created by @hard-zero1 on GitHub (Jan 31, 2026). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1582 :lady_beetle: **Describe the bug** When no URL scheme is given in the default server setting (e.g. "unifiedpush.kde.org" instead of "https://unifiedpush.kde.org") and then another app registers a topic via UnifiedPush, the ntfy app crashes immediately when trying to open it. It's then not possible to add a scheme anymore, even if you know that's the problem. :computer: **Components impacted** Android app, version 1.22.2 :bulb: **Screenshots and/or logs** Log from the crash obtained via adb logcat: ``` --------- beginning of crash 01-31 03:54:33.145 22996 23030 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-3 01-31 03:54:33.145 22996 23030 E AndroidRuntime: Process: io.heckel.ntfy, PID: 22996 01-31 03:54:33.145 22996 23030 E AndroidRuntime: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no scheme was found for unifie... 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1360) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1734) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at okhttp3.Request$Builder.url(Request.kt:230) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at io.heckel.ntfy.util.HttpUtil.requestBuilder(HttpUtil.kt:61) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at io.heckel.ntfy.service.WsConnection.start(WsConnection.kt:79) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at io.heckel.ntfy.service.SubscriberService.reallyRefreshConnections(SubscriberService.kt:278) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at io.heckel.ntfy.service.SubscriberService.access$reallyRefreshConnections(SubscriberService.kt:66) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at io.heckel.ntfy.service.SubscriberService$reallyRefreshConnections$1.invokeSuspend(Unknown Source:15) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707) 01-31 03:54:33.145 22996 23030 E AndroidRuntime: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@e1f350d, Dispatchers.IO] ``` :crystal_ball: **Additional context** I changed the default server to "unifiedpush.kde.org" and then installed Foss Warn, tried to add a place there and got an error. The Foss Warn self-check reported a problem with notifications. So I tried to open ntfy and it immediately crashed every time (I believe there was a second/new topic in the list that was briefly visible, additional to one registered before changing the default server). After reinstalling ntfy and changing the default server to "https://unifiedpush.kde.org" (after seeing from the logs what the problem was) everything worked fine and I could setup Foss Warn without errors.
BreizhHardware 2026-05-07 00:30:20 +02:00
Author
Owner

@binwiederhier commented on GitHub (Feb 2, 2026):

Thank you for reporting. Fixed in https://github.com/binwiederhier/ntfy-android/pull/158

<!-- gh-comment-id:3832685282 --> @binwiederhier commented on GitHub (Feb 2, 2026): Thank you for reporting. Fixed in https://github.com/binwiederhier/ntfy-android/pull/158
Sign in to join this conversation.
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
starred/ntfy#1111
No description provided.