Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: UI not updating properly #267

Closed
binwiederhier opened this issue May 21, 2022 · 29 comments
Closed

iOS: UI not updating properly #267

binwiederhier opened this issue May 21, 2022 · 29 comments
Labels
🪲 bug Something isn't working ios ntfy iOS app

Comments

@binwiederhier
Copy link
Owner

binwiederhier commented May 21, 2022

iOS 15.4.1
iPhone SE (2nd generation)

"As far as I can see - most things work as expected, but when the app is already open and is foreground - I can see push notification appear, but app not updates most of the time. Also when I open app from notification it sometime does not update and show latest messages. The screenshot is depicting such situation - the push notification on the top of the screen is actually 4th massage, but app UI still stuck at 3"

See #4 (comment)

@binwiederhier binwiederhier added 🪲 bug Something isn't working ios ntfy iOS app labels May 21, 2022
@binwiederhier binwiederhier mentioned this issue May 21, 2022
@rhld16
Copy link
Contributor

rhld16 commented May 22, 2022

Similar behaviour is seen on iPhone 6s, iOS 15.1.
The notification appears in the notification center but does not appear in-app. This can however be fixed by reloading the topic page.

@binwiederhier
Copy link
Owner Author

I don't know the reason for why it's happening, but it seems like a solvable issue. It's quite tricky actually, because the notification is saved from the notification app extension, which is a different process than the main app, so we have to notify the main app and then update the views. The way I did manage to do that on my iPhone was a hack and could easily be a race condition that just happens to work on my device.

I'll figure it out...

binwiederhier added a commit to binwiederhier/ntfy-ios that referenced this issue May 24, 2022
@binwiederhier
Copy link
Owner Author

I think this is fixed by binwiederhier/ntfy-ios@9060af5, but I won't be able to confirm it until I do another build and people an try it out.

@binwiederhier
Copy link
Owner Author

I believe this is fixed in 1.1, see #4 to test the new version. Closing this for now until I hear more issues with this.

@binwiederhier
Copy link
Owner Author

This is not fixed. It's still happening in the wild. Sometimes even on my iPhone 7. I am completely clueless as to why

@binwiederhier binwiederhier reopened this Jul 12, 2022
@Tylermarques
Copy link

Tylermarques commented Feb 26, 2023

Just wanted to confirm that this is still an open bug.

On an iPhone 12 pro, iOS 16.3.1.

I receive notifications but can't view any of the messages in the topic, regardless of however many times I refresh (pulling down on the topic).

@reedhaffner
Copy link

Same as above. I get a generic 'New notification' on SOME (not all) topics and messages. When I click on the notification, it takes me to the home screen, but not to the topic that it was about. If I attempt to refresh the topic, the message will never show up. I can verify that the message is sent through Desktop. iPhone 14 Pro Max iOS 16.5 and self-hosted.

@plia7
Copy link

plia7 commented Jun 25, 2023

Hello,

I can confirm having this issue too with my iPhone 12 Pro Max iOS 14.4.1.
Sometime it works when I receive the notification, when I click on it, it does take me to the app where the notification is showing without a manual refresh. But sometime it doesn't work without a manual refresh. If I'm already inside the app ui, and a new notification arrives, it doesn't reflect the new notification. I hope it can be fixed to make the functionality more consistent.

Thanks.

@Aarkon
Copy link

Aarkon commented Jul 3, 2023

I have to confirm that neither do I receive notifications nor does the content of my app update without manual refreshing, regardless if I have it open or not (iPhone 13 Pro, iOS 16.5.1).

Love your work non the less!

@eXistenZ0688
Copy link

installed the latest and also only manual pulls/manual refresh show the new messages on iOS 16.6

@Kzumelvin
Copy link

Kzumelvin commented Sep 1, 2023

Same here on iOS 16.6 iPhone 13. But i get this wierd behavior:

iPhone:
When i send a notification from https://ntfy.sh/, i get a push notification as it should be.
When i instead send a message from my own hosted server, i get the behavior like you all describe.
My server is behind a nginx proxy for ssl certification.

WebApp:

I subscribed to ntfy.sh/ and everything works fine.
When i subscribe to / there is an infinite loading circle in the sidebar.
The message also needs about a minute to show up in the sent messages.

I also recently watched the networkchuck video and he also installed it locally with a cloudflare secure tunnel. He seems to get it working quite seamlessly.

i think it is some kind of server issue so i will test different server settings the next days and will report.

@wunter8
Copy link
Contributor

wunter8 commented Sep 1, 2023

Unfortunately, the iOS app is very buggy. The PWA will give you a much better experience: https://docs.ntfy.sh/subscribe/pwa/

If you're self-hosting, follow these instructions to set up web push: https://docs.ntfy.sh/config/#web-push

@Chiller2019
Copy link

Still the same issue.
iOS 17.0.3
on iPad the same

@kWAYTV
Copy link

kWAYTV commented Nov 6, 2023

Still same issue 17.2

@binwiederhier
Copy link
Owner Author

This is a known issues (https://docs.ntfy.sh/known-issues/), but we have a fix for this, which I hope we can release soon binwiederhier/ntfy-ios#17

@kWAYTV
Copy link

kWAYTV commented Nov 6, 2023

This is a known issues (https://docs.ntfy.sh/known-issues/), but we have a fix for this, which I hope we can release soon binwiederhier/ntfy-ios#17

that's nice to hear! i hope to hear from that soon

@binwiederhier
Copy link
Owner Author

📢 A new version of the ntfy iOS app is currently in TestFlight. This version (hopefully) fixes the issues with the UI not properly refreshing, as well as fixes for subscriptions "getting lost". It contains no other fixes. More to come. To test the app, please use this TestFlight link: https://testflight.apple.com/join/P1fFnAm9

@binwiederhier
Copy link
Owner Author

(Hopefully) fixed as part of v1.3

@lolzivkovic
Copy link

I am experiencing same issue where only when I refresh notification they show up. Nothing happens unless I refresh. upstream-base-url is set and everything was working until recently.
iOS Version: 17.4.1

@AntoVie
Copy link

AntoVie commented Jun 6, 2024

Still the same issue.
iOS 17.5.1

@kWAYTV
Copy link

kWAYTV commented Jun 6, 2024

Same here, worked for few months then fucked up

Still the same issue. iOS 17.5.1

@wunter8
Copy link
Contributor

wunter8 commented Jun 6, 2024

I'm happy to help get notifications working on iOS. It typically involves some back and forth, so Discord usually works better for chatting about the issues.

But in summary, these are the things you need to do:

  1. Put upstream-base-url: "https://ntfy.sh" in server.yml (or the corresponding env variable for docker) (make sure you didn't copy the URL from somewhere else with fancy quotation marks!! (this one is fancy “ and this one ” but this one is normal ". it can be very hard to visually tell a difference, so either copy/paste the string I typed from above, or delete the quotes in server.yml and retype them by hand)
  2. Open the self-hosted web app in a browser (e.g., https://ntfy.mydomain.com, http://mydomain.com:8080, etc.)
  3. Copy the full URL from the browser (with http/https and the port, if any) into base-url in server.yml but make sure there is no trailing slash
  4. Copy the full URL from the browser (with http/https and the port, if any) into the "default server URL" setting in the ntfy iOS app but make sure there is no trailing slash

@AntoVie
Copy link

AntoVie commented Jun 6, 2024

@wunter8 Thanks for the guide but this not fix the problem @lolzivkovic get. I have the same problem and it's seem to be the place to say that the problem is not fixed. I have read documentation and found that the problem is know, I just want to be sure that this problem is not lost in the univers.

@lolzivkovic
Copy link

lolzivkovic commented Jun 6, 2024

@wunter8 I am using docker for hosting, with docker compose enviroment variables. It works on android and it worked for iOS. I have proper permissions for folders/files.
Here is my docker-compose.yml:
services:
ntfy:
image: binwiederhier/ntfy
container_name: ntfy
command:
- serve
environment:
NTFY_BASE_URL: https://ntfy.domain.com
NTFY_CACHE_FILE: /var/lib/ntfy/cache.db
NTFY_AUTH_FILE: /var/lib/ntfy/user.db
NTFY_AUTH_DEFAULT_ACCESS: deny-all
NTFY_BEHIND_PROXY: true
NTFY_ATTACHMENT_CACHE_DIR: /var/lib/ntfy/attachments
NTFY_ENABLE_LOGIN: true
NTFY_UPSTREAM_BASE_URL: https://ntfy.sh
volumes:
- /var/lib/ntfy:/var/lib/ntfy
ports:
- 127.0.0.1:2586:80
restart: unless-stopped

@wunter8
Copy link
Contributor

wunter8 commented Jun 6, 2024

@AntoVie Can you describe the problem? Do you only get notifications when you pull to refresh? Do the notifications only say "new message"?

@AntoVie
Copy link

AntoVie commented Jun 6, 2024

@wunter8 The problem is that I only get notifications when I pull to refresh. No notification on my Iphone or somewhere else. I need to refresh the page and then the new message show.

@wunter8
Copy link
Contributor

wunter8 commented Jun 6, 2024

@AntoVie what do you mean by "no notification somewhere else"? Does the web app work okay (e.g., from a desktop/laptop or just browsing to the website on your iPhone)?

@AntoVie
Copy link

AntoVie commented Jun 6, 2024

@wunter8 Sorry it was no clear, there's no other notification on my cellphone. The web app work great.

@wunter8
Copy link
Contributor

wunter8 commented Jun 6, 2024

@AntoVie have you tried the PWA on iOS? That should be much more reliable. Follow these instructions to set up web push: https://docs.ntfy.sh/config/#web-push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working ios ntfy iOS app
Projects
None yet
Development

No branches or pull requests