[GH-ISSUE #1203] iOS PWA problems #848

Open
opened 2026-05-07 00:28:09 +02:00 by BreizhHardware · 3 comments

Originally created by @gw8484 on GitHub (Oct 22, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1203

🐞 Describe the bug

When opening iOS PWA after getting push notification it often does not:

  1. Update the notification display with the new notification messages.
  2. Update the badge count display on the PWA home screen icon.

The iOS PWA should update immediately when opened after new push notification is received and it should reset the badge count on the iOS PWA home screen icon.

BTW, the same web app works as expected in a Chrome browser on a Linux desktop.

💻 Components impacted

iOS 17.6.1
ntfy v2.11.0 self hosted Docker instance on Ubuntu 22.04

💡 Screenshots and/or logs

Here is a snippet of the server log when the PWA opens but DOES NOT update where the subscription topic (/appm1) does not appear to be requested (Note, the public IP addresses have been changed):

2024/10/21 23:42:10 DEBUG HTTP request started (http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, tag=http, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=60, visitor_seen=2024-10-21T23:42:10.041Z)
2024/10/21 23:42:10 DEBUG Access to topic st_1DxBLrCgXJYXZ not authorized (error=unauthorized, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, tag=http, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=59.0000454276, visitor_seen=2024-10-21T23:42:10.041Z)
2024/10/21 23:42:10 DEBUG WebSocket error (this error is okay, it happens a lot): forbidden (error=forbidden, error_code=40301, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, http_status=403, tag=websocket, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=59.0000614642, visitor_seen=2024-10-21T23:42:10.041Z)
2024/10/21 23:42:10 DEBUG HTTP request finished (http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, tag=http, time_taken_ms=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=59.000066507, visitor_seen=2024-10-21T23:42:10.041Z)

Here is a snippet of the server log when the PWA open and DOES update everything where the subscription topic (/appm1) is requested:

2024/10/21 23:54:29 DEBUG HTTP stream connection opened (http_method=GET, http_path=/appm1/json?poll=1&since=nhWgHwucvDop, tag=subscribe, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3817183308, visitor_seen=2024-10-21T23:54:29.42Z)
2024/10/21 23:54:29 DEBUG Access to topic st_1DxBLrCgXJYXZ not authorized (error=unauthorized, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/json?poll=1, tag=http, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3817238494, visitor_seen=2024-10-21T23:54:29.42Z)
2024/10/21 23:54:29 DEBUG Connection closed with HTTP 403 (ntfy error 40301) (error=forbidden, error_code=40301, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/json?poll=1, http_status=403, tag=http, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.381962958799996, visitor_seen=2024-10-21T23:54:29.42Z)
2024/10/21 23:54:29 DEBUG HTTP request finished (http_method=GET, http_path=/st_1DxBLrCgXJYXZ/json?poll=1, tag=http, time_taken_ms=2, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3819924882, visitor_seen=2024-10-21T23:54:29.42Z)
2024/10/21 23:54:29 DEBUG HTTP stream connection closed (http_method=GET, http_path=/appm1/json?poll=1&since=nhWgHwucvDop, tag=subscribe, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3820618692, visitor_seen=2024-10-21T23:54:29.42Z)

🔮 Additional context

It seems the PWA is not always aware of the new push notifications so not requesting update for the relevant topics.
How does the PWA determine when to request updates for each subscribed topic?
Is there a way for users to force a full reload in the PWA launched from the home screen?

FYI, it does appear that sometimes after a while (>5 minutes) the PWA would eventually request update for the subscribed topic and display the new notification messages.

Originally created by @gw8484 on GitHub (Oct 22, 2024). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1203 :lady_beetle: **Describe the bug** <!-- A clear and concise description of the problem. --> When opening iOS PWA after getting push notification it often does not: 1. Update the notification display with the new notification messages. 2. Update the badge count display on the PWA home screen icon. The iOS PWA should update immediately when opened after new push notification is received and it should reset the badge count on the iOS PWA home screen icon. BTW, the same web app works as expected in a Chrome browser on a Linux desktop. :computer: **Components impacted** <!-- ntfy server, Android app, iOS app, web app --> iOS 17.6.1 ntfy v2.11.0 self hosted Docker instance on Ubuntu 22.04 :bulb: **Screenshots and/or logs** <!-- If applicable, add screenshots or share logs help explain your problem. To get logs from the ... - ntfy server: Enable "log-level: trace" in your server.yml file - Android app: Go to "Settings" -> "Record logs", then eventually "Copy/upload logs" - web app: Press "F12" and find the "Console" window --> **Here is a snippet of the server log when the PWA opens but *DOES NOT* update where the subscription topic (/appm1) does not appear to be requested (Note, the public IP addresses have been changed):** 2024/10/21 23:42:10 DEBUG HTTP request started (http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, tag=http, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=60, visitor_seen=2024-10-21T23:42:10.041Z) 2024/10/21 23:42:10 DEBUG Access to topic st_1DxBLrCgXJYXZ not authorized (error=unauthorized, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, tag=http, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=59.0000454276, visitor_seen=2024-10-21T23:42:10.041Z) 2024/10/21 23:42:10 DEBUG WebSocket error (this error is okay, it happens a lot): forbidden (error=forbidden, error_code=40301, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, http_status=403, tag=websocket, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=59.0000614642, visitor_seen=2024-10-21T23:42:10.041Z) 2024/10/21 23:42:10 DEBUG HTTP request finished (http_method=GET, http_path=/st_1DxBLrCgXJYXZ/ws?auth=QmVhcmVyIHRrX245NnE1OHk2anVieWx1MHFzdWZzaHlrcnoyNmR1, tag=http, time_taken_ms=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=59.000066507, visitor_seen=2024-10-21T23:42:10.041Z) **Here is a snippet of the server log when the PWA open and *DOES* update everything where the subscription topic (/appm1) is requested:** 2024/10/21 23:54:29 DEBUG HTTP stream connection opened (http_method=GET, http_path=/appm1/json?poll=1&since=nhWgHwucvDop, tag=subscribe, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3817183308, visitor_seen=2024-10-21T23:54:29.42Z) 2024/10/21 23:54:29 DEBUG Access to topic st_1DxBLrCgXJYXZ not authorized (error=unauthorized, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/json?poll=1, tag=http, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3817238494, visitor_seen=2024-10-21T23:54:29.42Z) 2024/10/21 23:54:29 DEBUG Connection closed with HTTP 403 (ntfy error 40301) (error=forbidden, error_code=40301, http_method=GET, http_path=/st_1DxBLrCgXJYXZ/json?poll=1, http_status=403, tag=http, topic=st_1DxBLrCgXJYXZ, topic_last_access=2024-10-21T23:29:00.992Z, topic_subscribers=0, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.381962958799996, visitor_seen=2024-10-21T23:54:29.42Z) 2024/10/21 23:54:29 DEBUG HTTP request finished (http_method=GET, http_path=/st_1DxBLrCgXJYXZ/json?poll=1, tag=http, time_taken_ms=2, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3819924882, visitor_seen=2024-10-21T23:54:29.42Z) 2024/10/21 23:54:29 DEBUG HTTP stream connection closed (http_method=GET, http_path=/appm1/json?poll=1&since=nhWgHwucvDop, tag=subscribe, user_id=u_11sCmqbbhZ, user_name=user1, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:77.77.77.77, visitor_ip=77.77.77.77, visitor_messages=2, visitor_messages_limit=17280, visitor_messages_remaining=17278, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=56.3820618692, visitor_seen=2024-10-21T23:54:29.42Z) :crystal_ball: **Additional context** <!-- Add any other context about the problem here. --> It seems the PWA is not always aware of the new push notifications so not requesting update for the relevant topics. How does the PWA determine when to request updates for each subscribed topic? Is there a way for users to force a full reload in the PWA launched from the home screen? FYI, it does appear that sometimes after a while (>5 minutes) the PWA would eventually request update for the subscribed topic and display the new notification messages.
Author
Owner

@gw8484 commented on GitHub (Oct 23, 2024):

After some additional testing, it seems that notification also stops working after a while.

Not sure if this has been reported for ntfy but it appears there are some known issues with PWA on iOS (https://github.com/firebase/firebase-js-sdk/issues/8010). The main issue is seemingly random reset of web push registrations. So, I am guessing it could be causing weird problems in ntfy including the ones reported earlier.

Unfortunately, it looks like PWA is not quite ready for prime time on iOS. It's really too bad. I was hoping PWA could be a viable alternative to the native app on iOS. The great work on ntfy is much appreciated in any case.

<!-- gh-comment-id:2430615524 --> @gw8484 commented on GitHub (Oct 23, 2024): After some additional testing, it seems that notification also stops working after a while. Not sure if this has been reported for ntfy but it appears there are some known issues with PWA on iOS (https://github.com/firebase/firebase-js-sdk/issues/8010). The main issue is seemingly random reset of web push registrations. So, I am guessing it could be causing weird problems in ntfy including the ones reported earlier. Unfortunately, it looks like PWA is not quite ready for prime time on iOS. It's really too bad. I was hoping PWA could be a viable alternative to the native app on iOS. The great work on ntfy is much appreciated in any case.
Author
Owner

@wunter8 commented on GitHub (Oct 23, 2024):

Thanks for looking into it some more. I haven't heard of others having issues with the PWA on iOS, but we'll keep this in mind

<!-- gh-comment-id:2430687799 --> @wunter8 commented on GitHub (Oct 23, 2024): Thanks for looking into it some more. I haven't heard of others having issues with the PWA on iOS, but we'll keep this in mind
Author
Owner

@michaellammers commented on GitHub (Jan 27, 2026):

Here the badge icon also doesn’t appear on my iPhone 12 with iOS 26.2 and ntfy 1.3.
Would be great to have that functionality in case I missed the push message itself.

<!-- gh-comment-id:3803764821 --> @michaellammers commented on GitHub (Jan 27, 2026): Here the badge icon also doesn’t appear on my iPhone 12 with iOS 26.2 and ntfy 1.3. Would be great to have that functionality in case I missed the push message itself.
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#848
No description provided.