androidseb25 / iGotify-Notification-Assistent

Docker container for sending Gotify notifications to iOS devices (bridge to gotify websocket)
MIT License
99 stars 3 forks source link

Push notification doesn't works #57

Closed surfparadise closed 2 months ago

surfparadise commented 2 months ago

Hi, the app works well. I can see all the notifications list when app is open, but when a new notification is generated, I don't receive the push notification when the app is on the backgroud or it is closed.

Thanks

androidseb25 commented 2 months ago

Can you please provide some logs for me from the app (Settings -> Device Logs -> app_20240422_latest.log) and from the docker container? Without logs i can't help you

surfparadise commented 2 months ago

I check the log. The igotify container need to be accessible from internet? With dns domain?

androidseb25 commented 2 months ago

no the iGotify Container don't be available from the out site of the internet. he only need a internet connection to send the notifications and check if the domains are available

surfparadise commented 2 months ago

Ok, found the problem. I have a firewall configured to block the communication inside my lan from igotify container. Thanks!

surfparadise commented 2 months ago

...ok, but If I want that the IOS app connect to igotify container outside of my LAN, I have to provide the public dns address of the container, ...and the web GUI of the container is public without any kind of password. It's not really secure. Isn't it?

androidseb25 commented 2 months ago

It's not really secure. Isn't it?

Take a look at the sources, there you can see how everything is working

surfparadise commented 2 months ago

Understood. From the point of you of the client IOS application it is safe. But if I connect to iGOTIFY container web page with a web browser, the webpage is public and available by everyone.

androidseb25 commented 2 months ago

yes, I know, but as I described above, nothing can happen without someone having a valid token

surfparadise commented 2 months ago

Thank you for your support. I try to out it behind a reverse proxy (nginx proxy manager), I can connect to it but the push notifications does not works. Any advice?

androidseb25 commented 2 months ago

Did you block the secntfy api in you're FW? This send the notification to the devices

surfparadise commented 2 months ago

IGotify container is on a DMZ with Internet access. So normally must works. I think the reverse proxy could be the problem.

androidseb25 commented 2 months ago

What the logs of the container says?

surfparadise commented 2 months ago

15:52:18.026 INFO LoggerView.body():68 - File: "app_20240422_latest.log" successfully deleted!

15:55:32.823 INFO Logger.getInstance():30 - ♻️ - Initialize iGotify Logger

15:55:32.832 INFO SecNtfy.initialize():65 - ♻️ - API URL https://api.secntfy.app

15:55:32.836 INFO SecNtfy.initialize():66 - ♻️ - Bundle Group group.sr.iGotify

15:55:32.840 INFO SecNtfy.initialize():77 - PubKey: MIIBCgKCAQEA0NJAxsGvVNFip1tgxgeJ6CgeuwtjtYoLdwEebmmh0vaI5VH3zJPRg8XS6seoJ4GAlN5Bss8egQ5DlTgqKf/B6Z61PfU9bxkZ6ShcD13Eum/W/3ypM5TDsB2LyOTwm0KCtbHcRAujXhyh0wWSKoc8DVbOKpG1xDvXVOPCQzDWWPVKxkLGRqWcniMgakTGRR5UNM+dNZCutI1x5AIJSxzBWDY9H4ea3Q46D/ERxhMMJ0wGWiXcMeggw7YahoI+oXXWWyCzYs3ooVTkEQzFdWLIkwb+0vnZM5zW926+aQH/0ldWCfS4zx66sXuErgOsf0hG/RgBYH1FbSI402SlVePbLwIDAQAB

15:55:32.842 INFO SecNtfy.initialize():78 - PrivKey: MIIEp*****qvA==

15:55:32.845 INFO SecNtfy.configure():102 - Model: iPhone 14

15:55:32.850 INFO SecNtfy.configure():103 - OS: 17.4.1

15:55:32.854 INFO SecNtfy.configure():105 - PubKey: MIIBCgKCAQEA0NJAxsGvVNFip1tgxgeJ6CgeuwtjtYoLdwEebmmh0vaI5VH3zJPRg8XS6seoJ4GAlN5Bss8egQ5DlTgqKf/B6Z61PfU9bxkZ6ShcD13Eum/W/3ypM5TDsB2LyOTwm0KCtbHcRAujXhyh0wWSKoc8DVbOKpG1xDvXVOPCQzDWWPVKxkLGRqWcniMgakTGRR5UNM+dNZCutI1x5AIJSxzBWDY9H4ea3Q46D/ERxhMMJ0wGWiXcMeggw7YahoI+oXXWWyCzYs3ooVTkEQzFdWLIkwb+0vnZM5zW926+aQH/0ldWCfS4zx66sXuErgOsf0hG/RgBYH1FbSI402SlVePbLwIDAQAB

15:55:32.857 INFO SecNtfy.configure():106 - PrivKey: MIIEp*****qvA==

15:55:33.058 VERBOSE AppDelegate.application():84 - APNs token retrieved: 32 bytes

15:55:33.062 VERBOSE AppDelegate.application():87 - The token: 20D30*****D73CB

15:55:33.066 INFO SecNtfy.setApnsToken():132 - 20D30*****D73CB

15:55:34.370 INFO SecNtfy.getInstance():43 - ♻️ - instance init

15:55:34.714 ERROR SecNtfy.PostDevice():159 - ♻️ - Optional("Device already added") Optional("NTFY-DEVICE-JZFe7VLcNjB6fpAQOuz6OPId9pg4M9x21fnSwz4RyKVvqZXZ0GgVy5YB") nil

15:55:34.724 VERBOSE Functions.sendTokenToSecNtfy():242 - registration token: NTFY-DEVICE-JZFe7VLcNjB6fpAQOuz6OPId9pg4M9x21fnSwz4RyKVvqZXZ0GgVy5YB

androidseb25 commented 2 months ago

Ok that's looks good

And how about the container log?

surfparadise commented 2 months ago

Fixed. I had to recreate the connection between app and igotify server. If you change just the address with 'edit', it loose the push notification ability.

androidseb25 commented 2 months ago

Ok 🤔