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

Android App Crashes when trying to connect to Home Assistant instance #2477

Closed
saniho opened this issue Apr 26, 2022 · 5 comments · Fixed by #2497
Closed

Android App Crashes when trying to connect to Home Assistant instance #2477

saniho opened this issue Apr 26, 2022 · 5 comments · Fixed by #2497
Labels
bug Something isn't working onboarding

Comments

@saniho
Copy link

saniho commented Apr 26, 2022

Home Assistant Android version:
beta-2234-6c64b31f-full

Android version:
Android 6.0.1

Phone model:
Galaxy Tab 2 10

Home Assistant version:
2022.4.0

Last working Home Assistant release (if known):

Description of problem:
Android Home Assistant app cannot connect to home assistant instance: either local home assistant domain (http://homeassistant.local/) . I can configure the home assistant instance from my phone, but the galaxy crashes a few seconds after I select the instance from the instance selection screen. I briefly can see the "Connecting..." loading message before the app fatally crashes. Consistently reproduced after fresh installs on my galaxy tab.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):


Screenshot of problem:
1651002571110
Additional information:

@saniho saniho added the bug Something isn't working label Apr 26, 2022
@dshokouhi
Copy link
Member

it looks like the top part of the error is cut off, can you show us the whole error?

@dshokouhi dshokouhi added question Further information is requested onboarding labels Apr 27, 2022
@saniho
Copy link
Author

saniho commented Apr 27, 2022

please find more detail, let me know if you need more information
IMG_20220427_210236
IMG_20220427_210223

@dshokouhi dshokouhi removed the question Further information is requested label Apr 27, 2022
@ttuffin
Copy link

ttuffin commented May 1, 2022

I was having the same problem running the latest version of the android app on a very old Nexus 10 device. I fixed it by clearing all app data, removing the app, opting out of the beta and installing the latest stable release.

@dshokouhi
Copy link
Member

I was having the same problem running the latest version of the android app on a very old Nexus 10 device. I fixed it by clearing all app data, removing the app, opting out of the beta and installing the latest stable release.

Did you get the exact same error as the above screenshots? Can you confirm the version of android the tablet is running? Fixing the issue by opting out of the beta is not a real fix because once we cut a release the issue will then be in the release version.

@jpelgrom
Copy link
Member

jpelgrom commented May 1, 2022

Found the cause: FasterXML/jackson-databind#3412, looks like the app is crashing on all API <26 devices since the 19th of March... Can easily be reproduced on an emulator.

Plain text crash log for future searches
2022-05-01 19:29:34.158 4697-4697/io.homeassistant.companion.android.debug E/AndroidRuntime: FATAL EXCEPTION: main
    Process: io.homeassistant.companion.android.debug, PID: 4697
    java.lang.NoSuchMethodError: No virtual method getParameterCount()I in class Ljava/lang/reflect/Method; or its super classes (declaration of 'java.lang.reflect.Method' appears in /system/framework/core-oj.jar)
        at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector._isIncludableMemberMethod(AnnotatedMethodCollector.java:187)
        at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector._addMemberMethods(AnnotatedMethodCollector.java:118)
        at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collect(AnnotatedMethodCollector.java:49)
        at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collectMethods(AnnotatedMethodCollector.java:40)
        at com.fasterxml.jackson.databind.introspect.AnnotatedClass._methods(AnnotatedClass.java:387)
        at com.fasterxml.jackson.databind.introspect.AnnotatedClass.memberMethods(AnnotatedClass.java:327)
        at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addMethods(POJOPropertiesCollector.java:680)
        at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collectAll(POJOPropertiesCollector.java:422)
        at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getPropertyMap(POJOPropertiesCollector.java:386)
        at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getProperties(POJOPropertiesCollector.java:233)
        at com.fasterxml.jackson.databind.introspect.BasicBeanDescription._properties(BasicBeanDescription.java:164)
        at com.fasterxml.jackson.databind.introspect.BasicBeanDescription.findProperties(BasicBeanDescription.java:239)
        at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._findCreatorsFromProperties(BasicDeserializerFactory.java:328)
        at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._constructDefaultValueInstantiator(BasicDeserializerFactory.java:272)
        at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:223)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:261)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:150)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:415)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:350)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
        at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
        at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:642)
        at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:2376)
        at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:193)
        at com.fasterxml.jackson.databind.ObjectMapper._newReader(ObjectMapper.java:754)
        at com.fasterxml.jackson.databind.ObjectMapper.readerFor(ObjectMapper.java:4119)
        at retrofit2.converter.jackson.JacksonConverterFactory.responseBodyConverter(JacksonConverterFactory.java:60)
        at retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:362)
        at retrofit2.Retrofit.responseBodyConverter(Retrofit.java:345)
        at retrofit2.HttpServiceMethod.createResponseConverter(HttpServiceMethod.java:124)
        at retrofit2.HttpServiceMethod.parseAnnotations(HttpServiceMethod.java:85)
        at retrofit2.ServiceMethod.parseAnnotations(ServiceMethod.java:39)
        at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:202)
        at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
        at java.lang.reflect.Proxy.invoke(Proxy.java:813)
        at $Proxy1.getToken(Unknown Source)
2022-05-01 19:29:34.159 4697-4697/io.homeassistant.companion.android.debug E/AndroidRuntime:     at io.homeassistant.companion.android.common.data.authentication.impl.AuthenticationRepositoryImpl.registerAuthorizationCode(AuthenticationRepositoryImpl.kt:101)
        at io.homeassistant.companion.android.launch.LaunchActivity.registerAndOpenWebview(LaunchActivity.kt:132)
        at io.homeassistant.companion.android.launch.LaunchActivity.access$registerAndOpenWebview(LaunchActivity.kt:32)
        at io.homeassistant.companion.android.launch.LaunchActivity$onOnboardingComplete$1$1$1.invokeSuspend(LaunchActivity.kt:100)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6077)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
    	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@1b3b00d, Dispatchers.Main]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working onboarding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants