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

Fix Thread border agent IDs encoded as hex second instance #3838

Merged
merged 3 commits into from
Sep 2, 2023

Conversation

agners
Copy link
Member

@agners agners commented Sep 1, 2023

Summary

Core border agent IDs use a hex-encoded string (length 32), whereas the app assumed 'normal' strings (length 16). Check to make sure we use the correct conversion when adding new new dataset as well.

09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: Thread update device failed
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: java.lang.IllegalArgumentException: Invalid length of the ID (length = 32, expectedLength = 16)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at com.google.android.gms.common.internal.Preconditions.checkArgument(com.google.android.gms:play-services-basement@@18.1.0:3)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at com.google.android.gms.threadnetwork.ThreadBorderAgent$Builder.<init>(com.google.android.gms:play-services-threadnetwork@@16.0.0:1)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at com.google.android.gms.threadnetwork.ThreadBorderAgent.newBuilder(com.google.android.gms:play-services-threadnetwork@@16.0.0:1)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at io.homeassistant.companion.android.thread.ThreadManagerImpl.importDatasetFromServer(ThreadManagerImpl.kt:175)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at io.homeassistant.companion.android.thread.ThreadManagerImpl$importDatasetFromServer$1.invokeSuspend(Unknown Source:18)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at android.os.Handler.handleCallback(Handler.java:942)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at android.os.Handler.dispatchMessage(Handler.java:99)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at android.os.Looper.loopOnce(Looper.java:201)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at android.os.Looper.loop(Looper.java:288)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at android.app.ActivityThread.main(ActivityThread.java:7918)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at java.lang.reflect.Method.invoke(Native Method)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
09-01 08:33:24.959 26648 26648 E ThreadManagerImpl: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@JBassett JBassett merged commit 5a9c392 into home-assistant:master Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants