Skip to content
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

Corrupted Xcode causes flutter doctor to fail repeatedly #139152

Closed
1 task done
Tracked by #133207
vashworth opened this issue Nov 28, 2023 · 8 comments
Closed
1 task done
Tracked by #133207

Corrupted Xcode causes flutter doctor to fail repeatedly #139152

vashworth opened this issue Nov 28, 2023 · 8 comments
Assignees
Labels
P2 Important issues not at the top of the work list team-infra Owned by Infrastructure team triaged-infra Triaged by Infrastructure team

Comments

@vashworth
Copy link
Contributor

Is there an existing issue for this?

Type of Request

bug

Infrastructure Environment

LUCI

What is happening?

flutter doctor continuously fails on bot https://chromium-swarm.appspot.com/bot?id=build797-m9.

It's failed three times in a row:
https://chromium-swarm.appspot.com/task?id=662be8ae622b5710
https://chromium-swarm.appspot.com/task?id=662fa671b3d5da10
https://chromium-swarm.appspot.com/task?id=662fbc7e685f7e10

Steps to reproduce

No response

Expected results

I expect flutter doctor to succeed

@vashworth vashworth added the team-infra Owned by Infrastructure team label Nov 28, 2023
@godofredoc
Copy link
Contributor

Is it failing only on that bot? the bots don't do anything special with flutter doctor.

@vashworth
Copy link
Contributor Author

It appears to be only on this specific bot, yes

@vashworth
Copy link
Contributor Author

Okay I think bot build797-m9 has a damaged version of Xcode which is causing flutter doctor to timeout. Here's what I think happened:

https://chromium-swarm.appspot.com/task?id=65e3da673e799f10 - Xcode was installed and selected, but the task was killed therefore "Xcode reset" was skipped and therefore Xcode remained selected.
https://chromium-swarm.appspot.com/task?id=65e3e77734f79410 - Xcode install was killed part way through and it became damaged (probably because CIPD files hadn't been removed yet).

Therefore in following builds, flutter doctor finds Xcode is already selected and tries to use it to get information, but I'm assuming it's getting an error message that says the Xcode package is damaged.

@vashworth
Copy link
Contributor Author

I'll experiment to see if we can find a way to tell if an Xcode package is damaged

@yusuf-goog
Copy link
Contributor

@vashworth looks like you are doing the heavy lifting on this one, so assigning it to you. Please let us know if there are any tasks you would like infra to run.

@yusuf-goog yusuf-goog added triaged-infra Triaged by Infrastructure team P2 Important issues not at the top of the work list labels Nov 28, 2023
@vashworth
Copy link
Contributor Author

Can we quarantine this bot while I try and debug it?

@vashworth vashworth changed the title flutter doctor fails repeatedly on build797-m9 Corrupted Xcode causes flutter doctor to fail repeatedly Nov 30, 2023
@vashworth
Copy link
Contributor Author

Fix added in https://flutter-review.googlesource.com/c/recipes/+/52702. Fix will reset Xcode at the beginning of the build before the flutter doctor step to prevent corrupted Xcode version from making it hang and timeout.

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2023
XuanTung95 pushed a commit to XuanTung95/recipes that referenced this issue Feb 14, 2024
…causing it to fail.

Also, add check to verify Xcode is not damaged/corrupted and if it is, clear the cache and try to install. On second attempt to re-install, try using a different output path.

This fix is aimed at preventing continuous failures on subsequent builds if the Xcode package becomes corrupted.

Fixes: flutter/flutter#139152
Related bug: flutter/flutter#138238

Change-Id: I0f72974241916e9a66f26291ddce01b4b615121f
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/52702
Reviewed-by: Keyong Han <keyonghan@google.com>
Commit-Queue: Victoria Ashworth <vashworth@google.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 Important issues not at the top of the work list team-infra Owned by Infrastructure team triaged-infra Triaged by Infrastructure team
Projects
None yet
Development

No branches or pull requests

3 participants