Open thii opened 3 years ago
Thanks for opening this @thii. It's definitely wrong for xcodes to save an HTML response as a XIP. I have some questions about what you've posted though:
It appears that it might have downloaded the HTML file twice, because it finds a corrupt XIP and then redownloads another one. Can you reproduce this every time you run this xcodes install 11.3.1
command? Does it happen with other Xcode versions?
Do you get an error if you run xcodes update
?
OSStatus error:[-25308] User interaction is not allowed.
: I haven't seen this error before, but a quick search seems to indicate that it's related to accessing items in the keychain. Can you tell me more about the context in which you were running xcodes install 11.3.1
? Please share as much as you can, but one specific question I have is was this via a login session with a GUI or over SSH?
The part below is interesting. I think this is a different message than #52, but I wonder if xcodes should be checking something else (either a response status code or a message like this in the body) to determine if the user needs to agree to the latest license agreement.
<p class="intro">The Apple ID you signed in with does not have permission to view this page.</p>
<p>If you’re currently a member of the Apple Developer Program, you or your <span class="nowrap">Account Holder</span> may need to update your account by agreeing to the latest license agreement in order to access this page. To view your current membership status and benefits, <a href="/account/?view=membership#/welcome">visit your account</a>.</p>
Can you confirm that the account you're using is a member of a developer team, and see if there's a banner about agreeing to the latest license agreement when you sign in with it to access http://developer.apple.com/download/more/? It would be nice if there was something more than what's in the HTML body, like a unique status code, to represent this case, so the more info you can provide about this the easier it'll be to fix the issue.
Thanks for your help! 😄
It seems I was using different Apple IDs. I was able to install it when forced using a specific account with the XCODES_USERNAME
environment variable.
For other questions:
Does it happen with other Xcode versions?
I didn't try, but I would think so. After passing XCODES_USERNAME
, I think it will update the username value in Keychain so the failure didn't happen gain.
Do you get an error if you run xcodes update?
Yes.
Was this via a login session with a GUI or over SSH?
First time, it was over SSH. Then I went to the machine and run it directly but the problem persisted.
Can you confirm that the account you're using is a member of a developer team, and see if there's a banner about agreeing to the latest license agreement when you sign in with it to access http://developer.apple.com/download/more/?
I can't figure out which account it was trying to use to log in, but I think this might be the reason.
Yo have to enter in the developer portal and accept the license agreement, after that if you try again to download with xcodes, it will work. First remove the wrong file just in case
I just ran into the OSStatus error:[-25308] User interaction is not allowed.
error as well. This is only occurring over SSH. When running directly in Terminal on the machine itself it works fine.
I'm running xcodes update
to reproduce it.
Every time it asks me for my password, and after entering it it has the message again, but does list all the versions (which indicates that it worked). But I have to enter my password every time.
charliefish@Computer Folder % xcodes update
OSStatus error:[-25308] User interaction is not allowed.
Apple ID Password (*******@******.com):
OSStatus error:[-25308] User interaction is not allowed.
Are there any workarounds for this?
I'd be happy to create a separate issue if needed. Just wanted to ask here first since it was brought up here (even tho I think it's a different issue).
Experiencing the same. New M1 iMac fresh Homebrew and fresh xcodes:
/D at 14:20:01
; xcodes install --path ~/Downloads/Xcode-13.2.0+13C90.xip 13.2.0
(2/6) Unarchiving Xcode (This can take a while)
The archive "Xcode-13.2.0+13C90.xip" is damaged and can't be expanded.
/D at 14:20:36
; cat ~/Downloads/Xcode-13.2.0+13C90.xip
<!DOCTYPE html>
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="Author" content="Apple Inc." />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<link rel="shortcut icon" href="/favicon.ico?08172144302" />
...
<title>Unauthorized - Apple Developer</title>
<meta name="omni_page" content="Unauthorized" />
<meta name="Description" content="The page you requested does not exist.">
I guess the download source is broken and not responding with the appropriated contents?
Btw I am getting this error too from the download page so I guess the auth headers aren't set correctly: Any source here https://github.com/xcodereleases/data/blob/master/Sources/XCData/Xcode13.swift redirects to -> https://developer.apple.com/unauthorized/
Ok, I have this banner here, will fix this and try it again. Maybe you have that too, @thii? Got it here: https://developer.apple.com/account/
This path here seems to work fine: https://download.developer.apple.com/Developer_Tools/Xcode_13.2/Xcode_13.2.xip
Thanks for the feedback - I will make a change to fix this now that I know how to handle those situations with having to accept new agreements.
Just a note, that the same error will come if you haven't yet accept the terms after registration or creation of an account through an admin. So, make sure to log in into developer.apple.com first and accept these :).
Luckily, after that, xcodes will remove the damaged xip and try it again, thanks!
Xcodes 1.0 can now download Xcode without having a username and password 🥳 Closing as we no longer have to worry about agreements!
Hello @MattKiazyk could we reopen please? I am trying to switch from xcode-install (xcversion) to xcodes, but I am getting this same error (latest version of xcodes: 1.1.0):
xcodes install --latest
Updating...
Latest non-prerelease version available is 14.1
Downloading with aria2
(2/6) Unarchiving Xcode (This can take a while)
Using regular unxip. Try passing `--experimental-unxip` for a faster unxip process
The archive "Xcode-14.1.0+14B47b.xip" is damaged and can't be expanded.
Removing damaged XIP and re-attempting installation.
Updating...
Latest non-prerelease version available is 14.1
Downloading with aria2
(2/6) Unarchiving Xcode (This can take a while)
Using regular unxip. Try passing `--experimental-unxip` for a faster unxip process
The archive "Xcode-14.1.0+14B47b.xip" is damaged and can't be expanded.
I checked on App Store Connect and the Developer portal (I am an admin, but not the account holder) and I see no agreement I need to accept or that the account holder must accept. https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_14.1/Xcode_14.1.xip --> this downloads just fine from the browser for me when I am logged in the account.
Also, if I try to install Xcode via xcversion it works (asks me to provide the 2FA code for my account and then downloads just fine):
xcversion install 14.1
Available session is not valid any more. Continuing with normal login.
Session loaded from environment variable is not valid. Continuing with normal login.
Two-factor Authentication (6 digits code) is enabled for account '<account>'
More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915
If you're running this in a non-interactive session (e.g. server or CI)
check out https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification
Please enter the 6 digit code you received at +44 ••••• •••• [phone number edited]:
223512
Requesting session...
100 309 100 309 0 0 469 0 --:--:-- --:--:-- --:--:-- 476%
100 305 100 305 0 0 230 0 0:00:01 0:00:01 --:--:-- 297k
100 305 100 305 0 0 230 0 0:00:01 0:00:01 --:--:-- 297k
@Panajev is the xip file a html file if you open it?
It is an HTML file :/.
@Panajev can you try one thing. Can you browse to ~/users/xxxx/Library/Application Support/com.robotsandpencils.xcodes
and delete any .xip's that are in there.
Then try again. Similar issues in the Xcodes UI were happening and this was a fix - https://github.com/RobotsAndPencils/XcodesApp/issues/320
I will and report back :)! Thanks for the speedy replies.
Tried it:
pwd
/Users/<user>/Library/Application Support/com.robotsandpencils.xcodes
rm -rf *
zsh: sure you want to delete all 2 files in /Users/<user>/Library/Application Support/com.robotsandpencils.xcodes [yn]? y
ls
xcodes install 14.0.1
Downloading with aria2
(2/6) Unarchiving Xcode (This can take a while)
Using regular unxip. Try passing `--experimental-unxip` for a faster unxip process
The archive "Xcode-14.0.1+14A400.xip" is damaged and can't be expanded.
Removing damaged XIP and re-attempting installation.
Downloading with aria2
(2/6) Unarchiving Xcode (This can take a while)
Using regular unxip. Try passing `--experimental-unxip` for a faster unxip process
The archive "Xcode-14.0.1+14A400.xip" is damaged and can't be expanded.
Same if I try to download/install 14.1, the *.xip file downloaded is HTML :/.
I see the same error after a fresh install, Application Support just contains available-xcodes.json
.
@Schaefers @Panajev What is your MacOS version? Trying to figure out the similarities, as I see some errors coming from XcodesApp too, which all seem to be 13.0+
@Schaefers @Panajev What is your MacOS version? Trying to figure out the similarities, as I see some errors coming from XcodesApp too, which all seem to be 13.0+
I'm on 13.0.1 (22A400). But I'm seeing the same error on a 12.6.1 machine.
@Schaefers @Panajev What is your MacOS version? Trying to figure out the similarities, as I see some errors coming from XcodesApp too, which all seem to be 13.0+
macOS Monterey, 12.6.1 I think, but I need to check the machine once I am back on it (it is not Ventura for sure though, the OS upgrade is still blocked by company policy :)).
@Schaefers @MattKiazyk seems fixed by the 1.2.x release :). It does prompt for the AppleID data and can download (super super fast) the Xcode release needed. One step closer to get off of the great xcversions (xcode-install) tool.