iOS icon indicating copy to clipboard operation
iOS copied to clipboard

IOS Notification not working with iOS 15

Open reesion opened this issue 3 years ago • 12 comments

iOS device model, version and app version

Model Name: iPhone XS Software Version: 15.1 App version: 2021.11.1 (2021.266)

Home Assistant Core Version core-2021.11.3

Describe the bug iOS push notification stopped working To Reproduce Tried sending notification via Services using notify. but did not receive any notification

Expected behavior iPhone to receive notification when triggered.

reesion avatar Nov 15 '21 03:11 reesion

Further testing indicates that it only works on local connection when local push is enabled and SSID is specified.

reesion avatar Nov 15 '21 10:11 reesion

Having the same issue. Notifications stopped working for the most part with some rare occasional exceptions. Here's the error I'm getting on the server:

Error sending notification to https://mobile-apps.home-assistant.io/api/sendPushNotification: ContentTypeError(RequestInfo(url=URL('https://mobile-apps.home-assistant.io/api/sendPushNotification'), method='POST', headers=<CIMultiDictProxy('Host': 'mobile-apps.home-assistant.io', 'User-Agent': 'HomeAssistant/2021.11.5 aiohttp/3.7.4.post0 Python/3.9', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Content-Length': '444', 'Content-Type': 'application/json')>, real_url=URL('https://mobile-apps.home-assistant.io/api/sendPushNotification')), (), message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', headers=<CIMultiDictProxy('Connection': 'keep-alive', 'Content-Length': '1624', 'Content-Type': 'text/html; charset=UTF-8', 'Referrer-Policy': 'no-referrer', 'X-Fh-No-Setcookie-Unroll': 'true', 'Accept-Ranges': 'bytes', 'Date': 'Wed, 01 Dec 2021 21:56:23 GMT', 'X-Served-By': 'cache-pwk4921-PWK', 'X-Cache': 'MISS', 'X-Cache-Hits': '0', 'X-Timer': 'S1638395784.650252,VS0,VE31', 'Vary': 'x-fh-requested-host, accept-encoding')>)

Just tried enabling local push in the app and was able to receive a test notification.

achurak avatar Dec 01 '21 21:12 achurak

If you navigate to https://mobile-apps.home-assistant.io/api/sendPushNotification in your browser, do you see an error message like {"errorMessage":"You did not send a token!"}? Is it possible you've at a DNS level blocked access to Firebase or something like that?

zacwest avatar Dec 01 '21 22:12 zacwest

If you navigate to https://mobile-apps.home-assistant.io/api/sendPushNotification in your browser, do you see an error message like {"errorMessage":"You did not send a token!"}? Is it possible you've at a DNS level blocked access to Firebase or something like that?

It is exactly what I see: {"errorMessage":"You did not send a token!"}. What does it mean?

achurak avatar Dec 01 '21 22:12 achurak

That's what's expected, but the error log you're seeing is a non-JSON response of some sort, which makes me wonder what it's connecting to. It's possible it's a Firebase error page, but I don't know exactly what could be going wrong there. Can you share what notify call you are issuing?

zacwest avatar Dec 01 '21 22:12 zacwest

That's what's expected, but the error log you're seeing is a non-JSON response of some sort, which makes me wonder what it's connecting to. It's possible it's a Firebase error page, but I don't know exactly what could be going wrong there. Can you share what notify call you are issuing?

So I've tried to curl the same link from the hass container and received 403 Forbidden:

<p><b>403.</b> <ins>That’s an error.</ins>
  <p>Your client does not have permission to get URL <code>/sendPushNotification/api/sendPushNotification</code> from this server.  <ins>That’s all we know.</ins>

Doesn't look like it's the app's problem. Wondering if it has something to do with my containers going out through VPN tunnels?

achurak avatar Dec 01 '21 22:12 achurak

Alright, I've just excluded hass container's IP from the VPN redirection for HTTPS traffic and was able to receive the same "token" message, so in my case it looks like Firebase blocked my VPN provider's IP addresses. Thanks for your help!

achurak avatar Dec 01 '21 22:12 achurak

I don't want to hijack this thread, but for me it is only a problem when I try to add an attachment to the notifications; not sure if both are related. Camera images or stills added and nothing gets through. The configuration itself didn't change; it used to work in the past. When I remove the attachment, I get the notification without problems. Nothing in the logs that help me - it just mentions a notification sent.

thomasdg avatar Dec 09 '21 14:12 thomasdg

same issue here. Notifications stopped working as supposed. Iphone XS and Nabu Casa subscriber.

Ehlz77 avatar Jan 11 '22 12:01 Ehlz77

same problem here when trying to clear a notification as described in https://companion.home-assistant.io/docs/notifications/notifications-basic#clearing

henning-meinhardt avatar Feb 24 '22 23:02 henning-meinhardt

Notifications not working here as well.

iOS 15.4.

They seems to work on local push (can’t test that now because I’m outside the country), but otherwise the counter get decreased, and nothing appears.

meme1337 avatar Mar 29 '22 06:03 meme1337

Is this still an issue with latest versions of app and core? Feel free to reopen if needed

bgoncal avatar Mar 26 '24 12:03 bgoncal