-
Notifications
You must be signed in to change notification settings - Fork 454
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
PyiCloudAPIResponseException('Service Temporarily Unavailable (503)') #456
Comments
Any traction on this? I just tried to pull some of my photos from iCloud and I'm getting this error. |
I am in the same situation. |
Same here |
Same issue here only since a few days |
Same issue here |
This app identified a change needed but the apple-tools repository with the fix is not public. |
I think it's indeed the authentication problem where the AUTH_ENDPOINT URL in pyicloud |
Authentication is now SRP6a. Old UID/pwd method gets the 503. |
You can check out Fastlane who have a fix now: fastlane/fastlane@faee8dc It's in ruby, but at least public. But I haven't been able to convert it to python yet either. |
I have managed to fix the authentication in another project that forks pyicloud. See commit icloud-photos-downloader/icloud_photos_downloader@4bcb2ac Just want to share it as a reference if anyone else is working on this issue. |
Can you rewrite the pyicloud Huge thanks for the work! |
This worked for me as a replacement for base.py in pyicloud. Sorry, not set up to do a pull request or the like. Maybe someone could make a new pyicloud release. Sorry, delete the headers2 = definition. Forgot to clean that up. |
it works for me !! |
Hey @DartVador, I'm still new-ish to all of this. Can you give a general idea of what you did to use the base.txt that he created? I'm assuming from the looks of the file that I'm just copying the file/contents and replacing the code in my current setup... I'm just not fully understanding where that code is that needs to be replaced or updated by this new file. I'm heading to google now, so please forgive my order of asking for help vs. searching on my own. I'm multitasking this with also playing dad to a 3yr old and a 3month old. |
the base.txt file must be renamed to base.py. |
Thank you for this info! But im VERY new to all this and after searching for about an hour or so i havent found any help on how to actually move the file into the directory, or actually anything that i feel comfortable doing without thinking ill mess up the whole thing....hahaha!. if you could guide me on how to do that, that would be great! im running home assistant os on a mini beelink pc if that helps. thank you. |
I took my same setup as always, installed the srp module, replaced base.py, but no matter what I do I get this: I even reinstalled a new python instance but get the same thing. Any ideas? |
It only gives that error for my account without 2FA |
Hi, |
same issue Missing apple_id field for account with 2FA |
I am not sure about specification is salt in srp protocol allowed to start from zero bytes or it is just a decision/buf from apple |
Example in RFC has salt as bytes, not as string, so I assume omission of leading bytes is incorrect. Spec does not explicitly tell that though. IMO posting question/concern to upstream srp project is the way to go. |
I took @Gdocal's patch, cleaned it up a bit, and posted it as a PR to the pysrp project: cocagne/pysrp#61 @Gdocal I hope you don't mind; I tried my best to make sure you are properly credited. I just thought it was important to get this fixed upstream ASAP, since other projects (like https://github.com/gcobb321/icloud3_v3) also depend on a properly working pysrp. |
Has anyone tested the srp patch? After patching |
I implemented the patch last night and it didn't break my setup that was already working.
…On Fri, Nov 1, 2024 at 12:40 PM plk ***@***.***> wrote:
Has anyone tested the srp patch? After patching base.py I get the
"missing apple_id" error but patching the srp lib as above doesn't seem to
fix this?
—
Reply to this email directly, view it on GitHub
<#456 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADVRWS5BWOMMGQMI73QPAJDZ6O4KBAVCNFSM6AAAAABMH255DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJSGMYDGNBZGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hmm, I patched both |
Did you change your password recently (regardless of 2FA)? That fixed mine |
Just did it and now get this in debug log:
I think the password reset is because you get locked out when testing this over and over. I could login via web GUI etc. but the python debug log clearly said the account was locked out which is why resetting the password changed the error. Now I'm stuck at the above error, despite having patched |
Which base.py are you using? I saw two different ones in two different pull
requests.
…On Fri, Nov 1, 2024 at 2:56 PM plk ***@***.***> wrote:
Just did it and now get this in debug log:
DEBUG:pyicloud.base.http:{'serviceErrors': [{'code': '-20101', 'message': 'Enter the email or phone number and password for your Apple\xa0Account.', 'suppressDismissal': False}]}
—
Reply to this email directly, view it on GitHub
<#456 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADVRWS46EPK4S66PVCBAW53Z6PMGDAVCNFSM6AAAAABMH255DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJSGUYDEMBXG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
make sure to clear all cache, and run code again. I had an issue with this when patched a lib. |
Latest srp patch, tried both patches for |
I had the same issue where the Error "Missing apple_id" in Home Assistant and I had to define the arguments.
|
Hmm, doesn't work for me - I'm calling this anyway:
If I add the |
You can contact me in telegram @Gdocal26 so we can investigate your issue . |
I have included the _pysrp patched code with the latest iCloud3 beta. I think it is v1.0.22 but it would be helpful if that was included in the comments at the beginning of the code. It seems to be working but I have one user who is getting a 401 from the …/signing/complete call to Apple. The username/password is valid as confirmed by a call to … setup/authenticate/username@… I think this would indicate a hash key calculation error. I just sent him new code to catch that condition and suggested he try another account or change passwords. Any thoughts on this? Is there any data that might identify the problem? What is the github repository I can fork with the latest code? |
The easiest way to verify what version of pysrp you're using is probably to
just do a "pip freeze" from the command line. That'll show you the exact
version of every Python package you have installed. The code can be found
here: https://github.com/cocagne/pysrp. I'm not familiar with the icloud
application so I'm afraid I won't be of much help in that regard. Good luck!
…On Sun, Nov 3, 2024 at 12:59 PM Gary Cobb ***@***.***> wrote:
@cocagne <https://github.com/cocagne>
I've updated pysrp to version 1.0.22 which includes the patch from @Gdocal
<https://github.com/Gdocal> & @magicus <https://github.com/magicus>.
Please let me know if errors are found. i don't have a good way to test the
code.
I have included the _pysrp patched code with the latest iCloud3 beta. I
think it is v1.0.22 but it would be helpful if that was included in the
comments at the beginning of the code. It seems to be working but I have
one user who is getting a 401 from the …/signing/complete call to Apple.
The username/password is valid as confirmed by a call to …
setup/authenticate/username@… I think this would indicate a hash key
calculation error. I just sent him new code to catch that condition and
suggested he try another account or change passwords.
Any thoughts on this? Is there any data that might identify the problem?
What is the github repository I can fork with the latest code?
—
Reply to this email directly, view it on GitHub
<#456 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANMW7FYKVG36WCZIYEICNLZ6ZP7ZAVCNFSM6AAAAABMH255DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGU2DCMRUGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@cocagne My program, iCloud3 (docs here), tracks the location and other data of iPhones, iPads, Apple Watches and other iDevices and runs as a component of Home Assistant, a program that manages home automation functions. It is responsible for the Python library running on its OS and I do not want to depend on it for pysrp support. I have copied the raw code into a file that I include with my package. |
@Gdocal any ideas when we will see a new release for this. |
Hi guys, late to the party, but I was having the same issue, so I tried to replace base.py with the new one that was mentioned a bunch of replies before this, i then ran |
Hi. Was someone able to find a solution ? |
I have to report that this 503 error just goes away for me if I wait a few days. I have no idea why. Something on the backend? Round-robin load balancing? |
Thanks a lot plk. For me also the issue has gone without doing anything. Good news so :-) |
As can be seen on the iCloud3 bug report, Apple has apparently switched back to the old way of authentication. My guess is that this is just temporary, and that the new way will return sooner or later, breaking everything again. |
The problem
I ran the program and got a 'Service Temporarily Unavailable (503)' exception
Environment
pip show pyicloud
): Version: 1.0.0python -V
): python-3.10.8Traceback/Error logs
Checklist
Additional information
The text was updated successfully, but these errors were encountered: