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

Cannot login #3

Closed
mvl64 opened this issue Apr 17, 2019 · 30 comments
Closed

Cannot login #3

mvl64 opened this issue Apr 17, 2019 · 30 comments

Comments

@mvl64
Copy link

mvl64 commented Apr 17, 2019

I have a problem logging in to the fritzbox, the app keeps reporting "invalid login".
I have ensured I'm using the correct login details (account and password) and even setup a separate account on the Fritzbox for Homey with a more simple password.
I can login to the fritzbox using both accounts using the web browser.

Note: my homey and fritzbox are in separate network segments, maybe that effects this issue.
I did confirm in the firewall traffic is passed on (port 80 from homey to the fritzbox) - I log all the traffic - fritzbox ip-address is specified correctly in the settings (so, I don't use the default http://fritz.box URL).

Enabling SSL in the app's dialog did not seem to make a difference - same error message is reported back.

@puschie286
Copy link
Owner

hmm sounds like a connection establish problem
-> currently im working on another reported login problem that requires to rewrite the login-process so i will also test for you problem

hope to find some time next week for this ( probably Tuesday or Wednesday )

@nattlip
Copy link

nattlip commented Apr 19, 2019

I have a problem logging in to the fritzbox, the app keeps reporting "invalid login".
I have ensured I'm using the correct login details (account and password) and even setup a separate account on the Fritzbox for Homey with a more simple password.
I can login to the fritzbox using both accounts using the web browser.

Note: my homey and fritzbox are in separate network segments, maybe that effects this issue.
I did confirm in the firewall traffic is passed on (port 80 from homey to the fritzbox) - I log all the traffic - fritzbox ip-address is specified correctly in the settings (so, I don't use the default http://fritz.box URL).

Enabling SSL in the app's dialog did not seem to make a difference - same error message is reported back.

neither can i

@mvl64
Copy link
Author

mvl64 commented Apr 19, 2019

hmm sounds like a connection establish problem
-> currently im working on another reported login problem that requires to rewrite the login-process so i will also test for you problem

hope to find some time next week for this ( probably Tuesday or Wednesday )

Thanks ! If you need additional info, please let me know.

@puschie286
Copy link
Owner

sorry for late response

pushed a update today for better error handling b755d73
but i guess its a different problem.

so you use the same url in settings like for accessing fritzbox via web ?
(i guess you already tested to use http/https infront of your ip)

pls try [Fritzbox IP]/login_sid.lua -> it should show you a xml response

if you still have problems pls provide some informations about your setup ( fritzbox version, fritzbox local ip, homey local ip, fritzbox type ( model ) )

@mvl64
Copy link
Author

mvl64 commented May 2, 2019 via email

@puschie286
Copy link
Owner

hmm, i can check the port for https -> should be handled by the npm package 'request' but i will check

the [...]login_sid.lua address is for the browser -> your browser should show a xml file
note: there is an issue with something similar that was caused by wrong DNS setup -> Link

@mvl64
Copy link
Author

mvl64 commented May 2, 2019 via email

@mvl64
Copy link
Author

mvl64 commented May 2, 2019 via email

@puschie286
Copy link
Owner

Looks good...
It’s pretty sound like a network problem - I guess the fritzbox ip is different in your homey subnet

@mvl64
Copy link
Author

mvl64 commented May 2, 2019 via email

@puschie286
Copy link
Owner

Sry can’t see the img ( only Text no link )

@mvl64
Copy link
Author

mvl64 commented May 2, 2019 via email

@puschie286
Copy link
Owner

Unfortunately not

@mvl64
Copy link
Author

mvl64 commented May 2, 2019 via email

@puschie286
Copy link
Owner

can you upload the image somewhere ( or use the browser ) ?

currently i have no idea why the fritzbox reject the password/challenge
-> do you have other devices/services that access the fritzbox. trying to login with wrong credentials will cause all active sessions to be destroyed ( found that in the documentation^^ )

and maybe it will help to have the error message, could you post your homey/SimpleLOG log entries when trying to login ?

@mvl64
Copy link
Author

mvl64 commented May 12, 2019 via email

@puschie286
Copy link
Owner

puschie286 commented May 13, 2019

Hey, np.
Pls use your browser for github replay to be correct shown

@mvl64
Copy link
Author

mvl64 commented May 18, 2019

I was replying by email, it seems this removes the attachement (sorry, I never checked this thread on github after creating the initial ticket).
Let me try again now.
As you can see, I did log into the fritzbox using the same user id (Homey) - to confirm it works ok.
It worked fine, and the failed attempt from the app did not log this session out.

Capture

@puschie286
Copy link
Owner

puschie286 commented May 20, 2019

hmm double checked the password hashing function but everything looks good there ( tested for special keys like € @ ä ö ).
can you share your fritzbox bridge log ? ( install SimpleLOG from app store and restart FritzboxBridge to get all full log with startup and everything )
still think its a subnet problem -> can you try http://192.168.30.1 as fritzbox ip ? ( or the fritzbox ip from your homey subnet )

@mvl64
Copy link
Author

mvl64 commented May 20, 2019

My password currently does not use special characters, so that's not it.
Thanks for the tip on SimpleLog - I use PaperTrails myself (to create log entries from flows) and thought SimpleLog did the same.

The error reported is reloaded to "zero depth sigl signed cert" it seems.
See attached file.
Hope this helps !
Simple LOG.log

@puschie286
Copy link
Owner

puschie286 commented May 20, 2019

nice thx :)
can you try with http instead of https and send the log ?
( thanks for note PaperTrails, will add it to supported log apps )

@mvl64
Copy link
Author

mvl64 commented May 20, 2019

When I try without https, there is no log entry anymore
file is unchanged ...

I've even restarted the the app to confirm, as you can see in the log:
Simple LOG2.log

@puschie286
Copy link
Owner

that's bad, sounds like a timeout will happen soon ( 20s - 120s ).

im almost out of idea's how to face this problem :(

your homey ip is 192.168.30.27 and it tries to connect to 192.168.5.76
-> are you sure it is reachable ?
i guess because of the different subnet your fritzbox ip is also different for this subnet.
( maybe 192.168.30.76 ? )

@mvl64
Copy link
Author

mvl64 commented May 20, 2019

Correct, Homey is in the IoT network segment which has no access to internal networks except for some specific devices. I've included a firewall rule to allow Homey to Fritzbox and vice versa - network traffic logging shows there is a flow both ways.

-> are you sure it is reachable ?

Yes, I know it is reachable: I can see the login attempt on the FritzBox - and in return it reports "invalid password".

Both ip addresses are correct, I also see the firewall is logging traffic going from Homey to the Fritzbox.

NOTE: I only use the fritzbox for smart devices now - replaced my router and access points a while ago.
So I could try to move it into the IoT segment too - to see if that changes anything.

NOTE: I cannot change the fritz ip to 192.168.,30.1 - as that is the address of the router.

@puschie286
Copy link
Owner

yes pls try it^^

well, the point is: fritzbox-bridge use fritzboxapi -> fritzboxapi is an implementation of the official fritzbox api. ( also checked the implementation and validate with example data from documention)

so im not sure how the password can be wrong if you use the correct one and the implementation is correct :/

the last thing i can try is to setup a network with similar configuration and try to reproduce it
( will ask our network specialists for help^^ @work )

@mvl64
Copy link
Author

mvl64 commented May 20, 2019

Hmm, looking at the code it seems the password is hashed and the hash is sent to validate the password on the box. I'm using a one character password to rule out me making typos, could that be causing issues (is there a minimum length for the MD5 hash?)

@puschie286
Copy link
Owner

puschie286 commented May 20, 2019 via email

@mvl64
Copy link
Author

mvl64 commented May 20, 2019

so I could try to move it into the IoT segment too - to see if that changes anything.

I have moved the FritzBox into the same network segment as Homey (the IoT network) and it worked right away. Not sure how the API is effected by crossing the router, but apparently it's breaking the login.
I am now able to use the app - will start running some tests.

Thanks a lot for your time and effort.

@puschie286
Copy link
Owner

hehe^^
would be nice if you could share your results here - good luck till then :)

@mvl64
Copy link
Author

mvl64 commented May 21, 2019

Yes, I confirm: now (after moving FritzBox into the IoT segment) I cannot login anymore from my original network segment (main lan). This issue was unrelated to your app - just unexpected Fritz behaviour !

@mvl64 mvl64 closed this as completed May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants