xcodes icon indicating copy to clipboard operation
xcodes copied to clipboard

Invalid HTTP response (412) after entering 2FA code

Open JohannesPtaszyk opened this issue 2 years ago • 5 comments

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 avatar May 17 '23 18:05 JohannesPtaszyk

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

JohannesPtaszyk avatar May 17 '23 18:05 JohannesPtaszyk

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.

NikolaDucak avatar Jun 09 '23 19:06 NikolaDucak

Very helpful @NikolaDucak, thanks for the hint!

Smasherr avatar Jul 25 '23 09:07 Smasherr