Code Monkey home page Code Monkey logo

Comments (15)

w1ll1am23 avatar w1ll1am23 commented on July 30, 2024 1

Ahhh okay awesome, disabling instant run worked. Thanks for the help.

from home-assistant-android.

dixonl90 avatar dixonl90 commented on July 30, 2024 1

I just ran into the same issue, and have been pulling my hair out why the auth wasn't working. It might be worth putting a note in the README about the Instant Run incompatibility with Ason.

from home-assistant-android.

Maxr1998 avatar Maxr1998 commented on July 30, 2024

@w1ll1am23 Hi! Thanks for the report, and the offer to contribute! That would be very appreciated :)
On your issue, could you send me a logcat of the login process? I'd need to know if there's any http error or what warnings/errors my authentication process logs.

from home-assistant-android.

w1ll1am23 avatar w1ll1am23 commented on July 30, 2024

@Maxr1998 sure thing, https://pastebin.com/JntX9k2e

I have been looking at this since I opened it can can't figure out what is going on, but I am new to Android so that doesn't mean much.

from home-assistant-android.

Maxr1998 avatar Maxr1998 commented on July 30, 2024

@w1ll1am23 Ok, nothing special visible in the logs. At least we now know that the socket connection works fine, and that there is a response from the Home Assistance instance.
Could you repeat your logging again, but this time with Log.d(TAG, message.toString()); added directly after this line in your local build?

from home-assistant-android.

w1ll1am23 avatar w1ll1am23 commented on July 30, 2024

Ahhh there ya go. I was wondering if those extra keys were causing the problem, but wasn't sure how they got added in.

This is from the send method

06-27 15:39:40.095 28801-28837/io.homeassistant.android D/HassService: send: {"api_password":"MY_PASSWORD","type":"auth","$change":null,"serialVersionUID":1751593233156997204}

This is from the on message received.

06-27 15:38:01.306 27844-27949/io.homeassistant.android D/HassService: onMessage: {"message":"Message incorrectly formatted: extra keys not allowed @ data['$change']. Got None\nextra keys not allowed @ data['serialVersionUID']. Got 1751593233156997204","type":"auth_invalid"}

from home-assistant-android.

w1ll1am23 avatar w1ll1am23 commented on July 30, 2024

I don't think it matters, but I commented out

import io.homeassistant.android.location.LocationUpdateReceiver;

and everything in

updateLocationTracker

In the settingsActivity because that package doesn't exist...

from home-assistant-android.

Maxr1998 avatar Maxr1998 commented on July 30, 2024

Ah, so that's the cause! This is actually an upstream bug of the Ason library, whose serializer also includes compiler-generated fields. Luckily, you can easily fix this (for now) by just disabling instant run in Android Studio - then it always has to do a full build, but at least these fields don't get included.

from home-assistant-android.

Maxr1998 avatar Maxr1998 commented on July 30, 2024

It actually does, even two times ;) [1] [2]

It's just not in the main source set because it's flavor-dependent.

from home-assistant-android.

Maxr1998 avatar Maxr1998 commented on July 30, 2024

Glad you could fix it! As I said, looking forward to any contribution, no matter how big or small :)

from home-assistant-android.

Maxr1998 avatar Maxr1998 commented on July 30, 2024

@dixonl90 actually, a fix was merged into Ason just two days ago, and since I'm currently building from my own fork anyway until there is a new upstream release, you can use Instant run without any problems now ;)

from home-assistant-android.

dixonl90 avatar dixonl90 commented on July 30, 2024

Fab, thanks for the update. :)

from home-assistant-android.

MrManor avatar MrManor commented on July 30, 2024

Hi guys. For one like me which is not a developer: Is this still a problem and is there any way to use this app as of today? I have downloaded it from F-droid recently and I am unable to login.

from home-assistant-android.

Maxr1998 avatar Maxr1998 commented on July 30, 2024

Hi @MrManor, no, the problem you're having is probably not related to this issue - I suppose it's more caused by the new login system Home Assistant uses now. I didn't get around to support that yet, however, the app should still work if you enable the legacy api key - that's at least how I use it atm.

from home-assistant-android.

MrManor avatar MrManor commented on July 30, 2024

the app should still work if you enable the legacy api key

Ok, thanks. I'll try using legacy key.

from home-assistant-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.