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

Ask "save login" after hass connected #1631

Merged
merged 1 commit into from
Sep 3, 2018

Conversation

awarecan
Copy link
Contributor

@awarecan awarecan commented Sep 3, 2018

askWrite() should be called only hassConnection established, e.g., authentication passed.

Fixes: home-assistant/core#16347

Lots of users report that they never seen "save login" dialog. I finally can reproduce this issue by using Firefox (showdom==False) access my production box through external network. After some investigation, I found out that sometime askWrite() will be called before HAWS called saveTokens(), therefore askWrite() will return false, the "save login" dialog didn't show up.

Move askWrite() into hassConnected from ready should resolve it.

@ghost ghost assigned awarecan Sep 3, 2018
@ghost ghost added the in progress label Sep 3, 2018
@awarecan awarecan changed the title Ask "save login" after hassConnected Ask "save login" after hass connected Sep 3, 2018
@balloob
Copy link
Member

balloob commented Sep 3, 2018

Damn pesky race conditions, great find!

@balloob balloob merged commit e16b3db into home-assistant:master Sep 3, 2018
@ghost ghost removed the in progress label Sep 3, 2018
@awarecan awarecan deleted the fix-save-to-login branch March 16, 2019 16:38
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants