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

Received invalid command: mobile_app/push_notification_channel #1700

Closed
gieljnssns opened this issue Jul 7, 2021 · 76 comments
Closed

Received invalid command: mobile_app/push_notification_channel #1700

gieljnssns opened this issue Jul 7, 2021 · 76 comments

Comments

@gieljnssns
Copy link

iOS device model, version and app version

Model Name: XS
Software Version: 14.6
App version: 2021.7 (2021.200)

Home Assistant Core Version

core-2021.7.0b5
Describe the bug
Bug also reported at core home-assistant/core#52625
After restarting HA I receive an error from Home Assistant WebSocket API related to mobile_app
And I do not recieven any notifications on my iPhone .
After a reboot of my iPhone those work again.
To Reproduce

Expected behavior

Screenshots

Additional context

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:89
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:22:26 (110 occurrences)
Last logged: 11:23:07

[140131635737216] Received invalid command: mobile_app/push_notification_channel
@zacwest
Copy link
Member

zacwest commented Jul 7, 2021

This error message should only occur while HA is restarting, and will repeat until the mobile_app integration is loaded. I do not believe it is related to notifications not working -- if it fails to connect here for local push it is sent over the internet. However no notifications will work in this time period through any mechanism.

Do you have any other errors in the logs when notifications aren't working?

@gieljnssns
Copy link
Author

No errors in log. Just no notifications until a restart of my phone.

@gieljnssns
Copy link
Author

I can send you the downloaded logs from the app if you want to.

@zacwest
Copy link
Member

zacwest commented Jul 7, 2021

Logs may be helpful, but if notifications aren't coming through it may be failing to deliver core-side, but no errors there is hard to figure out. You can drop the app logs here.

@gieljnssns
Copy link
Author

Now just updated to the release of 2021.7 and my notifications are working after a restart.
The previous week I had to restart my iPhone a lot to get the notifications working again after a restart of HA

@gieljnssns
Copy link
Author

I think I can close this as I did some restarts and I didn't have to do another reboot of my iPhone again.

@emufan
Copy link

emufan commented Jul 12, 2021

@gieljnssns And why has this been closed, if the errors in the log are still there? Didn't get this. Can you please re-open? Even with 2021.7.1 I see e.g.

2021-07-12 08:49:51 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140144720108224] Received invalid command: mobile_app/push_notification_channel                                 
2021-07-12 08:50:03 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140144720108224] Received invalid command: mobile_app/push_notification_channel  

@leonardpitzu
Copy link

i have the same errors though notifications reach all 3 apple devices i own and have registered in HA

@KennethLavrsen
Copy link

I also see this error in my log

@sim-san
Copy link

sim-san commented Jul 15, 2021

I get the same error message after adding a ios app. I running 2021.7.2 on
Home Assistant OS 6.1.

@gieljnssns gieljnssns reopened this Jul 16, 2021
@KennethLavrsen
Copy link

Still on Home Assistant 2021.7.3. I get it many times. Resetting iphones does not help.

@zacwest
Copy link
Member

zacwest commented Jul 16, 2021

This error is not indicative of any problem, it's just that local push is attempting to start itself while HA is starting but before mobile_app is finished loading. It may be convoluted but I may be able to get it to stop logging, but you can ignore it for now.

@emufan
Copy link

emufan commented Jul 17, 2021

Will do so, but error messages which are not a real errors with a meaning are not that good. Can't you try to load local push only after mobile_app? Or ...

@Spirituss
Copy link

The same is for 2021.6 and iPhone X

@Salvora
Copy link

Salvora commented Aug 7, 2021

I noticed these after updating to 2017.8.3.

@KennethLavrsen
Copy link

Judging from the 2021.9 beta reports this bug is not getting addressed. Sad. Flooding logs can drown the real issues that need attention. Each time I restart HA I get 2-4 kilobytes of garbage. It is all too easy to miss a real problem because you get used to seeing errors and warnings thay mean nothing

@zacwest
Copy link
Member

zacwest commented Aug 28, 2021

Hopefully the HA collapsing of duplicates logs lines on the log viewing page is helpful. Sorry, I just haven't had time to put together something which can avoid this.

@groenmarsmannetje
Copy link

groenmarsmannetje commented Sep 6, 2021

This error is not indicative of any problem, it's just that local push is attempting to start itself while HA is starting but before mobile_app is finished loading. It may be convoluted but I may be able to get it to stop logging, but you can ignore it for now.

So it shouldn’t be logged as an error but as warning or information only.

@KennethLavrsen
Copy link

A few months ago it was not logged at all. I think it would be better to focus on what changed and broke things than discussing how to spam the logs

@lolouk44
Copy link

lolouk44 commented Sep 9, 2021

I'm not seeing this after upgrading to 2021.9.5...

@KennethLavrsen
Copy link

Not fixed in 2021.9.5. It must be a lucky strike or maybe a symptom of another larger problem. I get this after a restart

[281473607044160] Received invalid command: mobile_app/push_notification_channel
22:51:33 – (ERROR) Home Assistant WebSocket API - message first occurred at 22:51:20 and shows up 72 times

And that does not surprise me at there is nothing in the release note that says it would be attempted fixed

@Xitro01
Copy link

Xitro01 commented Oct 8, 2021

This is still an issue in core-2021.10.1.

@KennethLavrsen
Copy link

Indeed. Please. Can this get priority?

@sstratoti
Copy link

Are you all seeing this after the mobile_app is loaded after HA starts up?
I don’t think this is spam or a useless log. It indicates that the component isn’t ready yet. And if it becomes unavailable after HA has been running for a while, then this log message is very helpful.

I’m not a developer for this project, but I just don’t agree with this getting “priority” because of a couple of log messages at boot. If you’re seeing this constantly, then I could understand that…

@lolouk44
Copy link

I second @sstratoti 's view. As "annoying" as this is, in the grand scheme of things it's a false positive and only shows up at start. Not saying it should not be resolved, but it's not a hing that truly warrants higher priority.

@jocamane
Copy link

same in 2021.12.9

@jamespreedy
Copy link

I have it in 2021.12.9 also.
Please let me know if I can get any logs / do anything to help here.

Thanks!

@jocamane
Copy link

2022-01-16 18:07:36 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547692619520] Received invalid command: mobile_app/push_notification_channel

in my log. just now

@jocamane
Copy link

This error is after restart HA

@codyc1515
Copy link

Also facing the same issue.

@Florian-Schmidt
Copy link

Found these messages while checking boot time in 2022.2.2…

@mrwogu
Copy link

mrwogu commented Feb 6, 2022

Same here

@GrizzlyAK
Copy link

Just saw this after a Core restart 2022.2.2.

@jensihnow
Copy link

+1 for happening in 2022.2.3:

@heinoskov
Copy link

Saw this in 2022.2.6 after reboot

@jmsblah
Copy link

jmsblah commented Feb 17, 2022

Saw this on 2022.2.8 after reboot

@cfdresearch
Copy link

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:96
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 22:44:49 (1 occurrences)
Last logged: 22:44:49

[2933099800] Received invalid command: mobile_app/push_notification_channel

System Health

version core-2022.2.9
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.15.21-v7l+
arch armv7l
timezone Europe/Moscow
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4670
Installed Version 1.23.0
Stage running
Available Repositories 986
Downloaded Repositories 25
Home Assistant Cloud
logged_in true
subscription_expiration March 13, 2022, 03:00
relayer_connected true
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled false
remote_server eu-central-1-3.ui.nabu.casa
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Raspbian GNU/Linux 10 (buster)
update_channel stable
supervisor_version supervisor-2022.01.1
docker_version 20.10.12
disk_total 117.1 GB
disk_used 11.2 GB
healthy true
supported failed to load: Unsupported
supervisor_api ok
version_api ok
installed_addons File editor (5.3.3), MariaDB (2.4.0), Mosquitto broker (6.0.1), Zigbee2mqtt (1.23.0-1), Home Assistant Google Drive Backup (0.105.2), Samba share (9.5.1), Check Home Assistant configuration (3.10.0), ESPHome (2022.2.3), RPC Shutdown (2.2), Git pull (7.13.1), ZeroTier One (0.12.2), Grafana (7.4.1), Node-RED (11.0.3)
Lovelace
dashboards 2
resources 12
views 10
mode yaml

@scyto
Copy link

scyto commented Mar 16, 2022

still present in

core-2022.3.5

@oneseventhree
Copy link

oneseventhree commented Mar 26, 2022

in 2022.3.7 I get:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:96
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:45:36 AM (1 occurrences)
Last logged: 11:45:36 AM

[140667603760944] Received invalid command: mobile_app/push_notification_channel

I can only get Push commands on wifi only when I am home. Mobile data does not work or other networks

@KennethLavrsen
Copy link

This was raised in July 2021. We are April 2022 now, and it affects everyone using IOS app. And I need to post this to keep the stale bot from closing this

@jocamane
Copy link

still present in

core-2022.4.1

@oneseventhree
Copy link

in 2022.3.7 I get:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:96
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:45:36 AM (1 occurrences)
Last logged: 11:45:36 AM

[140667603760944] Received invalid command: mobile_app/push_notification_channel

I can only get Push commands on wifi only when I am home. Mobile data does not work or other networks

After two years this randomly just started working for me and I don’t get this error any more. It wasn’t even fixed with a new release it just ended up fixing itself

@KennethLavrsen
Copy link

@oneseventhree your problem with push notifications never had anything to do with this bug report.

This bug reports relates to the flooding of the home assistant log that happens when you restart home assistant and the IOS app starts retrying connections before Home Assistant is ready for it. And it creates quite many log entries when you have the IOS app on multiple devices (two iPhones and two iPads in my home).

It does not affect the function of the IOS app after the restart is completed. Your problem has been caused by something else.

@mimainka
Copy link

mimainka commented Apr 28, 2022

Same for me in core 2022.4.7.
My log gets flooded with 74 lines of
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2941191240] Received invalid command: mobile_app/push_notification_channel
All occuring in the same second. Especially during or short after a restart, Errors in the log would be a relevant information but it's too easy to miss a real and severe error due to the flooding.

Everything still works like a charm, it's just annoying.

@jdecker91
Copy link

Still present in 2022.5.0

@msbc42
Copy link

msbc42 commented May 8, 2022

Also still in 2022.5.2

@nielsaust
Copy link

As well as 2022.5.3 for me with latest iOS app

@dorko87
Copy link

dorko87 commented May 12, 2022

still in Core 2022.5.3

@xfader2018
Copy link

xfader2018 commented May 22, 2022

I wonder if this ever get fixed....

@KennethLavrsen
Copy link

KennethLavrsen commented May 22, 2022

If anyone gets annoyed by all the "still there" messages then please note that there is a bot that closes all bug reports with no changes after just a few weeks so we have to keep nagging until the bug gets resolved to avoid the bug to be closed by the bot.

It is clear that the developer either sees no urgency in working on this OR - and this is important - OR has issues in his personal life that demands change of life priorities so do not assume ill intentions behind the lack of action. I have been through such situation when I lead the Motion camera project and years of critical illness changed my life priorities.

That said. This bug report really could benefit from help from another dev. The issue arrived when the behaviour of the HA core was changed. It was as I understand not a change to the IOS app that caused the issue. Maybe a core dev could step in a implement some delay in the core code so we avoid the flood of the log. I still get in the order of 20-100 errors in the log after each restart of HA because we have multiple IOS app devices in the family and they all bombard HA with failing connect requests. If HA could simply ignore these connections until it is ready to receive them, the visible and annoying part of the problem would be solved

@groenmarsmannetje
Copy link

To be honest I could live when this is logged as INFO message instead of Error or Warning until a root cause analyses and real solution has been found. That should be a couple of minutes of work for a developer. Then at least my log will not be flooded anymore.

@gieljnssns
Copy link
Author

Not seeing this anymore in the 2022.6 betas

@gieljnssns
Copy link
Author

I think this is resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests