-
Notifications
You must be signed in to change notification settings - Fork 299
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
TypeError: can only concatenate str (not "NoneType") to str #2515
Comments
Same with 2024.8.3 |
Same here! 2024.9.1 |
It looks like your Amazon accounts do not have 2SV enabled using Authenticator App... |
Active for months too. It worked till now. |
I've no idea why this is in your logs then...
My start up log for alexapy:
|
And it's broken again... I had already seen this error message a few days ago, but I couldn't find the log anymore. It may work 1-2 times after a restart, and then the "concatenate str (not 'NoneType')" error comes back eventually.
|
That is the 3 month old "partitioned cookie problem". I'm working on a possible new solution for that but another solution is to replace |
Hello, everybody. I dont' know if it helps the discussion (I didnt read it), but I ended up in this page while browsing for the error:
My alexa media player integration was not working because of this error. I fixed up just by updating everything on my raspberry pi.
And them everything was back to normal. Hope it helps |
I think it might as my suspicions are that caching of some sort, somewhere might be responsible... |
If it helps, I get the same type of error in my logs.
|
cant add any extra information, except to say having the same error:
|
When you visit the Amazon login page with email address, instead of clicking "continue" on the email screen, try selecting the option to create a new account (bear with me). Enter anything at all for First name & Last name (like "Q W") and submit. Amazon will then inform you that it already has an account for that email. Switch back to login with email & password, which should now be on one screen, click continue and you should then see the OTP screen. I spent several hours trying to figure out what's going on and decided to try Create New Account just to see what would happen and thereby discovered the above. |
I believe I remember encountering this error when I was also stuck in Amazon's login loop, where no cookie could be saved. The error likely isn't being caught properly but seems to occur only when there's an issue on Amazon's side. Unfortunately, I regret that the logs for this issue have already been deleted. |
This is the log entry I saw when I was stuck in the login loop (it was still in an open notepad on my PC).
|
I was also seeing the initial captcha window which is something I have not encountered for a very long time. |
Issue #2514 is related to this |
Hello everyone, I've also had the error (TypeError: can only concatenate str (not "NoneType") to str) for 3 days or one of the last updates. |
I had the same error, reinstalled the integration from HACS (after deleting
the pickle file in the .storage folder of HA) and now is working ok for 3
days.
…On Fri, Sep 13, 2024 at 8:46 AM deifel ***@***.***> wrote:
Hello everyone, I've also had the error (TypeError: can only concatenate
str (not "NoneType") to str) for 3 days or one of the last updates.
Is there a solution now or is it being worked on? Currently, some
automations are no longer working because of this.
Thank you very much
—
Reply to this email directly, view it on GitHub
<#2515 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEUCREIEI6DSMNKUW6YZ2XLZWKC4PAVCNFSM6AAAAABN4HX5QGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBYGE2TMMZYGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
ChatGPT: The error you're encountering is a TypeError caused by trying to concatenate a string with a error_message += list_item.find("span").string Breakdown of the Issue:
OAuth Context:During the login process, the system initiates an OAuth login attempt, where it exchanges credentials for access tokens via an external service (Amazon). If the response during this attempt is malformed or incomplete, the login process could fail, leading to the errors you are seeing. Properly handling these scenarios by checking for missing elements or corrupted session data can help prevent these issues. By following these steps, you should be able to resolve the error and avoid the login loop caused by this unexpected behavior. |
Anyone experiencing this issue should try clearing potentially corrupted cookies, as this could help resolve the problem. |
I deleted the pickl file and removed the addon. If i now try to reinstall and configure it, i also get a loop on login page on amazon. |
Reboot again, then try Daniel's sequence |
Works für 3 hours - now the error (NoneType...) is back :( |
You may try my
My version tries to give you more useful error messages and retries to log in. |
I just updated HA from 2024.7.3 to 2024.9.1 and immediately encountered this error. Alexa has previously been working fine for months. Reloading integration and rebooting HA had no effect, nor did deleting my pickle and rebooting. I eventually restored from backup to 2024.7.3 and Alexa is working again. (This makes me wonder how this can be an Amazon problem, it must be something on our end). Following this for a fix. |
there is a new alexapy version that fixes cookie issues, i just changed the version in the manifest to "alexapy==1.29.2" and then restarted, then reset back up and ensured i added the code for 2fa and all seems to be back up and running |
When you set it back up, did you encounter a captcha window and then the endless loop from email to password back to email pages? |
same error here, alexa media player worked (more or less) for the last weeks. since today it doesnt start and i got the same behavior as mentioned by @danielbrunt57. changed manifest to 1.29.2 like @fuzzysb did and tried to configure integration |
How did you update? in log error is same |
Same for me! |
I'm still the same, I remove the devices, uninstall the integration, reinstall it, do the whole authentication process successfully, it detects the devices correctly, but after a while, I haven't been able to determine how much, it asks me to re-authenticate and I have to do the whole process again. |
@r1si Elia, I am using a python script which will issue a persistent notification if the
In Developer tools > Actions, execute
|
First, make sure OTP/Amazon 2SV via App is set up correctly and that you have provided the OTP secret to AMP so that it can generate new OTP codes when it needs to reauthenticate with Amazon.
If so, delete them, restart HA and verify they do not exist. |
That is coming from an
|
@jumavi I suggest your email + password & OTP secret is failing. After AMP ascertains credentials succeeded during the proxy authentication step, it uses those credentials to generate a token which has an expiry and has to renewed by providing credentials again. The current token is stored in alexa_auth.
|
I have encountered several of the errors reported (re-auth, cannot concatenate None type str error, etc.) but was always able to fix as follows... First, make sure OTP/Amazon 2SV via App is set up correctly and that you have provided the OTP secret to AMP so that it can generate new OTP codes when it needs to reauthenticate with Amazon.
If so, delete it, restart HA and verify it does not exist. |
I deleted the files, followed the procedure but after 3 days it stopped working again. Do you think it is possible in the future to have a fix directly in the HACS package? |
Upgraded from HA 2024.7.3 to 2024.9.3 and encountered this issue within a few hours. Using AMP 4.13.2 on both HA versions, so this may be a HA regression. |
I resign, I have tried everything or at least I think so and the final result is always the same then after a very short time, it asks me to re-authenticate again |
I followed these steps but I also previously run |
Hello, I have an installation of Home Assistan OS and after trying all the proposed solutions I always got the TypeError: can only... Yesterday I rolled back to the Core 2024.7.3 version and it seems to be maintained and working correctly |
Someone has test test the 4.13.4 version? |
@r1si None of the changes in 4.13.4 appear related to this issue. |
There is some weird sequencing of events you all have which is triggering Amazon to issue a revised login error window which AMP can no longer deal with. When the stars are aligned, that
I've modified my
|
Thanks for this! What do you mean with need time ? |
See |
I've updated to v4.13.5 and still the integration fails some time after doing a log-in. I think now I am on this bandwagon #2453 Did anybody on this thread has been able to fully solve their issue with this update? |
I also updated to v4.13.5 and the integration failed some time after doing a log-in, also for me.... |
I give up... |
It's merged but I don't see it in the latest Hass changes log, am I wrong? |
alexapy is a python package that is used by HA, but does not belong to HA |
Describe the bug
The integration no longer starts. In the past, multiple restarts helped (HA 2024.07 / HA 2024.08), but recently, nothing helps anymore. A complete reinstallation worked for 2 days, but after several restarts, the same problem occurred again.
Same or similar to #1072
TypeError: can only concatenate str (not "NoneType") to str
To Reproduce
🤷♂️
Expected behavior
Screenshots
System details
const.py
or HA startup log): 4.12.12pip show alexapy
in homeasssistant container or HA startup log): 1.28.2Debug Logs (alexa_media & alexapy)
Please provide logs.
Additional context
The text was updated successfully, but these errors were encountered: