[GH-ISSUE #854] android app Shows me "Unable to parse a TLS packet header" when subscribing to a topic #601

Closed
opened 2026-05-07 00:25:44 +02:00 by BreizhHardware · 1 comment

Originally created by @tassosmak on GitHub (Aug 31, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/854

🐞 Describe the bug
The problem occurs when I am trying to subscribe to a topic, When I press the sub button it throws me an "Unable to parse a TLS header "

💻 Components impacted
Android App

💡 Screenshots and/or logs

Logs Below:
Screenshot_2023-08-31-10-58-20-766_io heckel ntfy-edit

This is a log of the ntfy Android app. The log shows up to 1,000 entries.

Device info:

ntfy: 1.16.0 (play)
OS: 4.19.191-g2ff700758cf0
Android: 13 (SDK 33)
Model: ruby
Product: ruby_eea

--
Settings:
{
"autoDeleteSeconds": 2592000,
"autoDownloadMaxSize": 1048576,
"broadcastEnabled": true,
"connectionProtocol": "jsonhttp",
"darkMode": -1,
"defaultBaseUrl": "https://192.168.1.94:8080",
"lastSharedTopics": [],
"minPriority": 1,
"mutedUntil": 0,
"recordLogs": true
}

Logs

1693468857363 2023-08-31 11:00:57.363 D NtfyLog Enabled log recording
1693468861903 2023-08-31 11:01:01.903 D NtfySubscriberMgr Enqueuing work to refresh subscriber service
1693468861905 2023-08-31 11:01:01.905 D NtfyMainActivity Battery: ignoring optimizations = false (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false
1693468867598 2023-08-31 11:01:07.598 D NtfyLog Enabled log recording
1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity Poll worker version matches: choosing KEEP as existing work policy
1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity Poll worker: Scheduling period work every 60 minutes
1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity ServiceStartWorker version matches: choosing KEEP as existing work policy
1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity ServiceStartWorker: Scheduling period work every 180 minutes
1693468867603 2023-08-31 11:01:07.603 D NtfyMainActivity Delete worker version matches: choosing KEEP as existing work policy
1693468867603 2023-08-31 11:01:07.603 D NtfyMainActivity Delete worker: Scheduling period work every 480 minutes
1693468867606 2023-08-31 11:01:07.606 D NtfyMainActivity Battery: ignoring optimizations = false (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false
1693468867625 2023-08-31 11:01:07.625 D NtfySubscriberMgr Enqueuing work to refresh subscriber service
1693468867627 2023-08-31 11:01:07.627 D NtfyMainActivity Battery: ignoring optimizations = false (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false
1693468867721 2023-08-31 11:01:07.721 D NtfyMainActivity Checking global and subscription-specific 'muted until' timestamp
1693468868625 2023-08-31 11:01:08.625 D NtfyFirebase Subscribing to topic ~control complete: result=null, exception=null, successful=true
1693468871947 2023-08-31 11:01:11.947 D NtfyApiService Checking anonymous read against https://192.168.1.94:8080/Test
1693468871978 2023-08-31 11:01:11.978 W NtfyAddFragment Connection to topic failed: Unable to parse TLS packet header
Exception:
javax.net.ssl.SSLException: Unable to parse TLS packet header
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:807)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:858)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.-$$Nest$mprocessDataFromSocket(Unknown Source:0)
at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:241)
at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at io.heckel.ntfy.msg.ApiService.checkAuth(ApiService.kt:156)
at io.heckel.ntfy.ui.AddFragment$checkReadAndMaybeShowLogin$1.invokeSuspend(AddFragment.kt:209)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

1693468873526 2023-08-31 11:01:13.526 D NtfyMainActivity Checking global and subscription-specific 'muted until' timestamp
1693468874583 2023-08-31 11:01:14.583 D NtfySettingsActivity Create io.heckel.ntfy.ui.SettingsActivity@5de0f20

Originally created by @tassosmak on GitHub (Aug 31, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/854 :lady_beetle: **Describe the bug** The problem occurs when I am trying to subscribe to a topic, When I press the sub button it throws me an "Unable to parse a TLS header " :computer: **Components impacted** Android App :bulb: **Screenshots and/or logs** Logs Below: ![Screenshot_2023-08-31-10-58-20-766_io heckel ntfy-edit](https://github.com/binwiederhier/ntfy/assets/86314553/9a70499e-d1d6-4ed2-97ec-0406961a8e7e) This is a log of the ntfy Android app. The log shows up to 1,000 entries. Device info: -- ntfy: 1.16.0 (play) OS: 4.19.191-g2ff700758cf0 Android: 13 (SDK 33) Model: ruby Product: ruby_eea -- Settings: { "autoDeleteSeconds": 2592000, "autoDownloadMaxSize": 1048576, "broadcastEnabled": true, "connectionProtocol": "jsonhttp", "darkMode": -1, "defaultBaseUrl": "https://192.168.1.94:8080", "lastSharedTopics": [], "minPriority": 1, "mutedUntil": 0, "recordLogs": true } Logs -- 1693468857363 2023-08-31 11:00:57.363 D NtfyLog Enabled log recording 1693468861903 2023-08-31 11:01:01.903 D NtfySubscriberMgr Enqueuing work to refresh subscriber service 1693468861905 2023-08-31 11:01:01.905 D NtfyMainActivity Battery: ignoring optimizations = false (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false 1693468867598 2023-08-31 11:01:07.598 D NtfyLog Enabled log recording 1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity Poll worker version matches: choosing KEEP as existing work policy 1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity Poll worker: Scheduling period work every 60 minutes 1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity ServiceStartWorker version matches: choosing KEEP as existing work policy 1693468867602 2023-08-31 11:01:07.602 D NtfyMainActivity ServiceStartWorker: Scheduling period work every 180 minutes 1693468867603 2023-08-31 11:01:07.603 D NtfyMainActivity Delete worker version matches: choosing KEEP as existing work policy 1693468867603 2023-08-31 11:01:07.603 D NtfyMainActivity Delete worker: Scheduling period work every 480 minutes 1693468867606 2023-08-31 11:01:07.606 D NtfyMainActivity Battery: ignoring optimizations = false (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false 1693468867625 2023-08-31 11:01:07.625 D NtfySubscriberMgr Enqueuing work to refresh subscriber service 1693468867627 2023-08-31 11:01:07.627 D NtfyMainActivity Battery: ignoring optimizations = false (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false 1693468867721 2023-08-31 11:01:07.721 D NtfyMainActivity Checking global and subscription-specific 'muted until' timestamp 1693468868625 2023-08-31 11:01:08.625 D NtfyFirebase Subscribing to topic ~control complete: result=null, exception=null, successful=true 1693468871947 2023-08-31 11:01:11.947 D NtfyApiService Checking anonymous read against https://192.168.1.94:8080/Test 1693468871978 2023-08-31 11:01:11.978 W NtfyAddFragment Connection to topic failed: Unable to parse TLS packet header Exception: javax.net.ssl.SSLException: Unable to parse TLS packet header at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:807) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:858) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.-$$Nest$mprocessDataFromSocket(Unknown Source:0) at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:241) at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220) at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379) at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337) at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209) at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) at io.heckel.ntfy.msg.ApiService.checkAuth(ApiService.kt:156) at io.heckel.ntfy.ui.AddFragment$checkReadAndMaybeShowLogin$1.invokeSuspend(AddFragment.kt:209) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 1693468873526 2023-08-31 11:01:13.526 D NtfyMainActivity Checking global and subscription-specific 'muted until' timestamp 1693468874583 2023-08-31 11:01:14.583 D NtfySettingsActivity Create io.heckel.ntfy.ui.SettingsActivity@5de0f20
BreizhHardware 2026-05-07 00:25:44 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@binwiederhier commented on GitHub (Sep 24, 2023):

@tassosmak ntfy does not support self-signed certificates yet. Duplicate of https://github.com/binwiederhier/ntfy/issues/215 -- Please 👍 the other ticket

<!-- gh-comment-id:1732603912 --> @binwiederhier commented on GitHub (Sep 24, 2023): @tassosmak ntfy does not support self-signed certificates yet. Duplicate of https://github.com/binwiederhier/ntfy/issues/215 -- Please :+1: the other ticket
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#601
No description provided.