ha-google-home
ha-google-home copied to clipboard
Getting the error: master_token doesn't follow the AAS_ET format
Describe the bug
I am using HA 2023.12.2 and the google_home v1.10.2 . I used the Docker method to get the master token using the app password. The token was generated successfully. I then tried to add the integration and then I get the following error in the log.
2023-12-14 11:35:27.482 ERROR (MainThread) [glocaltokens.client] master_token doesn't follow the AAS_ET format
I have tried out all possible combinations with/without @gmail.com
, app password/account password, tripple checked for any blank spaces and etc but nothing worked out.
My master token is in the format:
aas_et/AKppINabdfhtfy6ughnghjghjgjghbhhbnmnghjhjghjghjghjghjgh
Version of the integration
If you are unsure about the version check the github release here.
1.10.2
Logs
2023-12-14 11:35:27.482 ERROR (MainThread) [glocaltokens.client] master_token doesn't follow the AAS_ET format
The check is pretty simple.
- Token must start with
aas_et/
- Token must be exactly 223 characters long.
Make sure you copied the whole thing.
Yes, I did. I cropped it for the purpose of this ticket. I have replaced some characters in the generated master token.
aas_et/AK----a--tE--e----5---K--------5------------------8-A8--K-49----------7K-_----t---E--k5-A-5----4-------E--------a---------TK4-as-------E----7-----A--t-9--K--t-------e--------6---9-eS---e--9-----==
When I pasted the token in MS Office Word, it tells me that there are only 203 characters. I have copied the token exactly as it was generated.
MS Word is not the best tool for this, it can automatically replace some characters with something else. Try Notepad instead.
I tried an online character count website as well. Same thing. I tried VS Code as well and it shows 203 characters.
Any advice @leikoilja?
this is the first time we heard that token length is 203 instead of 223 characters. @kaizersoje do you have access to any other accounts to check the length of the master token there? We can cater for 203 chars as well as 223, but we would need to know if it's google's new pattern? 🤔
Hi @leikoilja I am away on holiday at the moment. So it will be a while I can look into this.
Hi, I'm having a similar issue but my token is 224 chars long (checked with echo 'aas_et/.....=' |wc -c
)
Before upgrading (I don't know from wich version to the last one) it was working well
Hi, I'm having a similar issue but my token is 224 chars long (checked with
echo 'aas_et/.....=' |wc -c
) Before upgrading (I don't know from wich version to the last one) it was working well
me too my token have 224 chars long
Probably we should relax this check a bit, feel free to submit a PR. You will need to check that your token indeed works.
Probably we should relax this check a bit, feel free to submit a PR. You will need to check that your token indeed works.
how I can check if my token works
how I can check if my token works
You need to modify glocaltokens library here: https://github.com/leikoilja/glocaltokens/blob/master/glocaltokens/utils/token.py
And install modified version in order to test it.
I found that it says Token must be exactly 223 characters long, which is not the same as my token. Finally, I discovered that the token I copied had an EOL (end-of-line) character. After removing it, I successfully logged in. Thanks for your help 😄