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

Wear app crashes on some devices #1

Open
RoadXY opened this issue Oct 3, 2020 · 2 comments
Open

Wear app crashes on some devices #1

RoadXY opened this issue Oct 3, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@RoadXY
Copy link

RoadXY commented Oct 3, 2020

Ik heb mijn Toon, twee Plugwise apparaten, Tado Airco en OpenWeatherMap als favoriet staan.
Deze crashen allemaal.
Zojuist even met een virtuele schakelaar getest: dat werkt wel.

@RoadXY
Copy link
Author

RoadXY commented Oct 14, 2020

2020-10-14 17:10:07.266 8144-8144/com.xseth.homey E/AndroidRuntime: FATAL EXCEPTION: main Process: com.xseth.homey, PID: 8144 java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Map.containsKey(java.lang.Object)' on a null object reference at com.xseth.homey.adapters.OnOffAdapter$1.onResponse(OnOffAdapter.java:147) at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:89) at retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$3wC8FyV4pyjrzrYL5U0mlYiviZw.run(lambda) 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:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@RoadXY
Copy link
Author

RoadXY commented Oct 15, 2020

Found it:
https://github.com/rkokkelk/homey-wear/blob/master/app/src/main/java/com/xseth/homey/homey/models/Device.java#L143

If the devices doesn't have one of the app supported capabilities, it get's the on/off capability by default.
When the users tries to switch the device the app crashes because the device can't be switched.

@rkokkelk rkokkelk added the bug Something isn't working label Oct 17, 2020
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

2 participants