-
Notifications
You must be signed in to change notification settings - Fork 278
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 |
Retry the login sequence with my workaround to get out of the loop: Daniel's sequence |
I now have the |
I restored |
I also have a side problem. Has anyone found a way to put a try catch without removing the service altogether? I tried with continue_on_error: true |
Although this does not directly check for the
In automation/script:
|
This seems to be resolved for me in 4.13.0 released today. |
Sadly 4.13 has not fixed it for me. 2024-09-16` 22:41:42.719 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [email protected] - amazon.co.uk for alexa_media Traceback (most recent call last): |
4.13.1 and I still have the issue unfortunately
|
Same here, still happening with 4.13.1 |
Some here, Error setting up entry [email protected] - amazon.es for alexa_media |
Has everyone tried deleting the integration config entry and setting it up again? |
I didnt want to be that guy 🤣🤣🤣 but, "its working for me" after doing that :) |
As specified by people earlier it will work initially but just stop again on it's own... :( |
If that's true after doing as I outlined then there's still an issue with cookie manipulation/credentials. |
I'm also facing this issue |
Guys, its working normally for me since I updated everything on my Rasp. Even before this week update of the integration. Has anyone else tried updating the OS? The problema persisted? No more problems for me |
I am running latest version of HAOS (as a vm on proxmox), not sure if that would be the equivalent to what you're saying |
Humm… I’m not sure now… it’s working for me since my last attempt to fix it… I always keep it up to date so might have updated then deleted stuff and fixed it and it didn’t re-break. I’ll report back IF it breaks again! Promise! 😇 |
This is a bug in alexapy 1.29.2. I changed it locally and now it reads:
|
Daniel is a god! @danielbrunt57 I removed the integration, rebooted, added the integration again, went into endless login loop, used the Daniel method to try to create a new account with the same email, it failed as planned, logged in again and this time got to the 2FA page. After this everything started working! It's 3am and it took 3 hours to fix but it's working!!! :-) |
This worked for me as well… for a while. After some time it asked me to reconfigure it again, with the added issue that it can only be reconfigured locally because it uses the local Hass address even if you’re accessing remotely 😢 |
Today I updated to 4.13.2 with a broken instance. It fixed itself after restarting. I'm mildly optimistic. |
With what I know now about the proxy process, I'm thinking it should work from a remote browser session by providing the remote URL to access your Home Asdistant as the 'local URL`, but I've not tested that scenario... |
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. |
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: