XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.59k stars 119 forks source link

Invalid HTTP response (412) after entering 2FA code #291

Open JohannesPtaszyk opened 1 year ago

JohannesPtaszyk commented 1 year ago

Installed via brew and wanted to install xcode 14.3, but after entering Apple ID and PW, when I enter the 2 FA code, the I get this error (twice):

Invalid HTTP response (412) for https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode.

I also tried SMS, but it's the same behavior 😞

image
JohannesPtaszyk commented 1 year ago

After some further investigation it could be related to error handling. In OpenHab we had a similar issue with 2FA and it was due to apple return 4xx and 5xx in some cases, even though the validation seems to be okay: https://github.com/openhab/openhab-addons/pull/14563/commits/d5f5464f1d605d1165a6fd429401c1f2d9a3df26

NikolaDucak commented 1 year ago

Had the same issue but managed to fix it.

Going to https://developer.apple.com, logging in and agreeing to "Agreements and Guidelines for Apple Developers", then doing xcodes update ... and trying xcodes install ... again fixed the issue for me.

Maybe it will work for you too.

Smasherr commented 11 months ago

Very helpful @NikolaDucak, thanks for the hint!