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

When doing Android2Android Data Transfer - 1 registered device = 2 physical device issue #4650

Open
delize opened this issue Sep 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@delize
Copy link

delize commented Sep 17, 2024

Home Assistant Android app version(s):

Android version(s):
2024.8.1-full
2024.7.1-full
Device model(s):
Pixel 7 Pro
Pixel 8 Pro
Pixel 9 Pro XL

Home Assistant version:
2024.6.X through to
2024.9.1

Last working Home Assistant release (if known):
Unknown

Description of problem, include YAML if issue is related to notifications:
I have setup 4 new phones in a span of 3 months (yes I know, very annoying - work testing and personal testing).

I have a bunch of automations that occur when I enter or exit zones, and I have been getting very confused as to why I have automations triggering or stopping even when they contradict physical situations I am in. I have found / come to the conclusion that this is because the "Setup New Device" flow when setting up a new Android Device, is transferring the entire Device Token/Registration of the Companion App, and causing 2 physical devices to seem like a single registered device.

This is noticeable in (my situations so far):

  • Push Notifications
  • Zone Enter / Exit Automations

In my situation, I have left my "new" device at home, until I have obtained a case and screen protector, which is in the Home Zone, where my "old" device, is on my person entering a Work location Zone. When the situations occur, the physical device registration get's sent to from the "old" device, and then nearly instantly swaps back to the "new" device when it wakes up.

If I open up the app on the "new" phone, the Home Assistant App is not configured, and makes me sign in to the app.

Companion App Logs:

Old Device:

--------- beginning of main
09-17 20:29:31.433 30005 28109 E WebSocketRepository: Websocket: onFailure
09-17 20:29:31.433 30005 28109 E WebSocketRepository: java.net.SocketException: Software caused connection abort
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at java.net.SocketInputStream.socketRead0(Native Method)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at java.net.SocketInputStream.read(SocketInputStream.java:173)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at java.net.SocketInputStream.read(SocketInputStream.java:143)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:983)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:947)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:862)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:835)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okio.InputStreamSource.read(JvmOkio.kt:93)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:153)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okio.RealBufferedSource.request(RealBufferedSource.kt:210)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okio.RealBufferedSource.require(RealBufferedSource.kt:203)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okio.RealBufferedSource.readByte(RealBufferedSource.kt:213)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:124)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:107)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:307)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:529)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
09-17 20:29:31.433 30005 28109 E WebSocketRepository: 	at java.lang.Thread.run(Thread.java:1012)
09-17 20:29:31.434 30005 30005 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1726597399094, currentMillis: 1726597771434)
09-17 20:29:31.448 30005 30005 D SensorReceiver: Received intent: android.intent.action.SCREEN_OFF
09-17 20:29:31.449 30005 30005 D SensorReceiver: Sensor(s) [is_interactive] corresponding to received event android.intent.action.SCREEN_OFF are disabled, skipping sensors update
09-17 20:29:31.449 30005 30005 D ButtonWidget: Broadcast received: 
09-17 20:29:31.449 30005 30005 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
09-17 20:29:31.449 30005 30005 D ButtonWidget: AppWidgetId: -1
09-17 20:29:31.449 30005 30005 D MediaPlayCtrlsWidget: Broadcast received: 
09-17 20:29:31.449 30005 30005 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
09-17 20:29:31.449 30005 30005 D MediaPlayCtrlsWidget: AppWidgetId: -1
09-17 20:29:31.463 30005 30005 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
09-17 20:29:31.463 30005 30005 D SensorReceiver: Sensor(s) [is_interactive] corresponding to received event android.intent.action.SCREEN_ON are disabled, skipping sensors update
09-17 20:29:31.463 30005 30005 D ButtonWidget: Broadcast received: 
09-17 20:29:31.463 30005 30005 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
09-17 20:29:31.463 30005 30005 D ButtonWidget: AppWidgetId: -1
09-17 20:29:31.466 30005 30005 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
09-17 20:29:31.466 30005 30005 D MediaPlayCtrlsWidget: Broadcast received: 
09-17 20:29:31.466 30005 30005 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
09-17 20:29:31.466 30005 30005 D MediaPlayCtrlsWidget: AppWidgetId: -1
09-17 20:29:31.467 30005 30005 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
09-17 20:29:31.468 30005 30005 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
09-17 20:29:31.468 30005 30005 D SensorReceiver: Received intent: android.os.action.DEVICE_IDLE_MODE_CHANGED
09-17 20:29:31.468 30005 30005 D SensorReceiver: Sensor(s) [is_idle] corresponding to received event android.os.action.DEVICE_IDLE_MODE_CHANGED are disabled, skipping sensors update
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.503 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:31.504 30005 30005 D LocBroadcastReceiver: Received location update.
09-17 20:29:31.507 30005 30005 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
09-17 20:29:31.507 30005 23605 D LocBroadcastReceiver: Last Location: 
09-17 20:29:31.507 30005 23605 D LocBroadcastReceiver: Coords:(59.3053405, 18.0366126)
09-17 20:29:31.507 30005 23605 D LocBroadcastReceiver: Accuracy: 100.0
09-17 20:29:31.507 30005 23605 D LocBroadcastReceiver: Bearing: 0.0
09-17 20:29:31.508 30005 23605 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
09-17 20:29:31.508 30005 23605 D LocBroadcastReceiver: Received location that is 107 milliseconds old, 1726597771401 compared to 1726597771508 with source fused
09-17 20:29:31.508 30005 23605 D LocBroadcastReceiver: Duplicate location received, not sending to HA
09-17 20:29:31.517 30005 23605 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: true, usesWifi is: true
09-17 20:29:31.526 30005 30049 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=b0c7bd7d-4e4f-47b3-99c7-88437e26b7e9, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
09-17 20:29:31.527 30005 30005 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1726597399094, currentMillis: 1726597771527)
09-17 20:29:31.528 30005 30005 D IntegrationRepository: setAppActive(): true
09-17 20:29:31.610 30005 30013 W mpanion.android: Cleared Reference was only reachable from finalizer (only reported once)
09-17 20:29:31.638 30005 30013 I mpanion.android: Background concurrent mark compact GC freed 446840(17MB) AllocSpace objects, 70(1848KB) LOS objects, 75% free, 12MB/48MB, paused 955us,1.901ms total 116.585ms
09-17 20:29:33.895 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:33.895 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:33.895 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:33.895 30005 30005 E mpanion.android: Invalid resource ID 0x00000000.
09-17 20:29:35.658 30005 30005 D CompatibilityChangeReporter: Compat change id reported: 163400105; UID 10284; state: ENABLED
09-17 20:29:35.664 30005 15982 D LogcatReader: Read logcat for pid 30005

Screenshot or video of problem:

Screenshot 2024-09-17 at 8 37 41 PM Screenshot 2024-09-17 at 8 35 24 PM Screenshot 2024-09-17 at 8 36 42 PM

Additional information:
https://discord.com/channels/330944238910963714/1285646008784523265/1285646008784523265

@delize delize added the bug Something isn't working label Sep 17, 2024
@delize delize changed the title When doing Android2Android Data Transfer, during new phones - 1 registered device = 2 physical device issue When doing Android2Android Data Transfer - 1 registered device = 2 physical device issue Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant