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

iOS simulator unavailable, device type profile not found #97303

Closed
jmagman opened this issue Jan 26, 2022 · 64 comments
Closed

iOS simulator unavailable, device type profile not found #97303

jmagman opened this issue Jan 26, 2022 · 64 comments
Assignees
Labels
c: flake Tests that sometimes, but not always, incorrectly pass P0 Critical issues such as a build break or regression team-infra Owned by Infrastructure team

Comments

@jmagman
Copy link
Member

jmagman commented Jan 26, 2022

Try job module_test_ios trying to create a simulator:

[module_test_ios] [STDOUT] Executing "xcrun simctl create TestAdd2AppSim com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3" in "/opt/s/w/ir/x/w/recipe_cleanup/tmp81ddsf_o/flutter sdk" with environment {BOT: true, LANG: en_US.UTF-8}
[module_test_ios] [STDOUT] stderr: Invalid device type: com.apple.CoreSimulator.SimDeviceType.iPhone-11

List of simulators shows all the simulators are "unavailable, device type profile not found"

-- iOS 13.0 --
    iPad Air (3rd generation) (C657E8D4-422B-4449-94E7-3B04431E2F18) (Shutdown) (unavailable, device type profile not found)
    iPad Pro (11-inch) (C3480239-0A68-47BF-97E9-20CFDA93F7D9) (Shutdown) (unavailable, device type profile not found)
    iPad Pro (12.9-inch) (3rd generation) (19F3AE1E-AFAB-447B-9AF6-7B8BB57D9897) (Shutdown) (unavailable, device type profile not found)
    iPad Pro (9.7-inch) (117D9CD0-82C8-458D-B3C4-8CA0331A03AD) (Shutdown) (unavailable, device type profile not found)
    iPhone 11 (6B11A7F3-E077-42F1-9911-D7C1B8D55CCE) (Shutdown) (unavailable, device type profile not found)
    iPhone 11 Pro (2E9AD3C2-AEE6-4152-A14F-882F3DFFDF91) (Shutdown) (unavailable, device type profile not found)
    iPhone 11 Pro Max (8C49B646-040E-4CB6-9FDC-10362CEB54B1) (Shutdown) (unavailable, device type profile not found)
    iPhone 8 (5DCC7E66-B73E-463A-A91D-F28E3B4E329B) (Shutdown) (unavailable, device type profile not found)
    iPhone 8 Plus (18E32AAD-47C2-424D-8A9E-7BFEEA4727A1) (Shutdown) (unavailable, device type profile not found)

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8823963857735512193/+/u/list_simulators/stdout

Compare to a successful prod run. Both are running 12c33.

-- iOS 13.0 --
    iPhone 8 (D6D03B46-EA7B-4A19-9115-6DB597FCF8B6) (Shutdown) 
    iPhone 8 Plus (D23E78A6-2A7F-410D-91FD-2D6779CC411B) (Shutdown) 
    iPhone 11 (3ACE52C8-0530-491A-9226-6A95068DFEF8) (Shutdown) 
    iPhone 11 Pro (6C3DB249-0409-4726-BABB-8BF3417E3E12) (Shutdown) 
    iPhone 11 Pro Max (98B27E12-DECA-41F3-AD22-530C3FE08CC9) (Shutdown) 
    iPad Pro (9.7-inch) (9A5CB7DA-3709-4970-BA8E-A359F60F2A2C) (Shutdown) 
    iPad Pro (11-inch) (EB1BBB3C-9519-4976-B394-D5E3F1C81455) (Shutdown) 
    iPad Pro (12.9-inch) (3rd generation) (420854E4-EE4A-4962-AE41-157DF43EA734) (Shutdown) 
    iPad Air (3rd generation) (4DEB6175-773A-45C8-A791-AF125666FDD9) (Shutdown) 

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8823956734184440353/+/u/list_simulators/stdout

Blocking the plugin roll #97295, which is blocking an engine roll.

@jmagman jmagman added team-infra Owned by Infrastructure team P0 Critical issues such as a build break or regression labels Jan 26, 2022
@jmagman jmagman added this to New in Infra Ticket Queue via automation Jan 26, 2022
@jmagman
Copy link
Member Author

jmagman commented Jan 26, 2022

Re-running the test in #97295, I don't see it failing in other PRs (that PR is definitely not the issue though)

@jmagman
Copy link
Member Author

jmagman commented Jan 26, 2022

Suspect the re-run will succeed, the simulator list looks correct:

-- iOS 13.0 --
    iPhone 8 (96198A19-44E4-4FAB-8516-DD50D00289BF) (Shutdown) 
    iPhone 8 Plus (91CF9D98-4DBC-4451-A823-A0A5B8A59EC6) (Shutdown) 
    iPhone 11 (D6B26EFF-F0AC-4071-A061-94336006AC33) (Shutdown) 
    iPhone 11 Pro (B03469C1-55BD-4B36-BD88-A082F905115B) (Shutdown) 
    iPhone 11 Pro Max (16B9D00E-E5F5-42E1-B5F7-C5B78458BFF0) (Shutdown) 
    iPad Pro (9.7-inch) (C19AAD9E-F393-4AEE-86B0-D3B99F6CAFD2) (Shutdown) 
    iPad Pro (11-inch) (B4B9BB52-BFE4-422D-8B5E-B06A759E3FEB) (Shutdown) 
    iPad Pro (12.9-inch) (3rd generation) (07FC72C6-605D-4A1D-ACB6-A1FF09BA7D09) (Shutdown) 
    iPad Air (3rd generation) (E552B27C-FDCD-4228-B33E-74C9A8207A54) (Shutdown)

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8823953796628412001/+/u/list_simulators/stdout

Reducing priority.

@jmagman jmagman added P2 and removed P0 Critical issues such as a build break or regression labels Jan 26, 2022
@jmagman
Copy link
Member Author

jmagman commented Jan 26, 2022

I've seen that unavailable, device type profile not found before while investigating #91689 when simulator runtimes were missing, but the runtimes look correct this time:

== Runtimes ==
iOS 13.0 (13.0 - 17A577) - com.apple.CoreSimulator.SimRuntime.iOS-13-0
iOS 14.3 (14.3 - 18C61) - com.apple.CoreSimulator.SimRuntime.iOS-14-3
watchOS 6.1 (6.1.1 - 17S445) - com.apple.CoreSimulator.SimRuntime.watchOS-6-1
watchOS 7.2 (7.2 - 18S561) - com.apple.CoreSimulator.SimRuntime.watchOS-7-2

@jmagman
Copy link
Member Author

jmagman commented Jan 26, 2022

And interestingly only the 14.3 iPhone 12* devices are available...?

== Device Types ==
iPhone 12 mini (com.apple.CoreSimulator.SimDeviceType.iPhone-12-mini)
iPhone 12 (com.apple.CoreSimulator.SimDeviceType.iPhone-12)
iPhone 12 Pro (com.apple.CoreSimulator.SimDeviceType.iPhone-12-Pro)
iPhone 12 Pro Max (com.apple.CoreSimulator.SimDeviceType.iPhone-12-Pro-Max)
...
-- iOS 14.3 --
    iPhone 12 mini (5B76E7EE-4109-4327-BD3C-08B088482192) (Shutdown) 
    iPhone 12 (5F6A55BC-C974-4D3B-AC0F-B92F55ED1AD6) (Shutdown) 
    iPhone 12 Pro (E7FEF58E-626E-4EFB-AE6A-5CB49FCE6321) (Shutdown) 
    iPhone 12 Pro Max (787AB908-C531-44CD-9530-524CCA545D60) (Shutdown)

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8823963857735512193/+/u/list_simulators/stdout

@CaseyHillers
Copy link
Contributor

I'll monitor the builds to see if this flake occurs again

@CaseyHillers CaseyHillers moved this from New to Triaged in Infra Ticket Queue Jan 26, 2022
@CaseyHillers CaseyHillers self-assigned this Jan 26, 2022
@godofredoc
Copy link
Contributor

Waiting for the battery healthcheck to land in production.

@jmagman
Copy link
Member Author

jmagman commented Jan 27, 2022

I don't think this is related to the tethered device's health, it's that the simulators aren't set up in a way Xcode can find them.

@godofredoc
Copy link
Contributor

Would this be fixed with the new way to provide runtimes?

@keyonghan
Copy link
Contributor

Seem the failures happened on only two bots: build857-m9 and build866-m9.

Take a further look, builder Mac module_test_ios has been consistently failing on these two bots.

/cc @jmagman Any settings/config that may cause this behavior from bot side? All bots should be configured in the same way though.

@jmagman
Copy link
Member Author

jmagman commented Feb 2, 2022

Maybe the simulator device types were removed on those machines? I can't figure out where on disk the different types of simulator device images would live though.

@godofredoc
Copy link
Contributor

Could this be related to testing the runtimes functionality of osx_sdk in those two bots?

@jmagman
Copy link
Member Author

jmagman commented Feb 2, 2022

Not sure, from #97303 (comment) the symptoms look different, the simulator runtimes (OS version iOS-14-3) is present, but the actual device type images (iPhone-11) is missing.

I could change the test to iPhone 12 which does seem available, though it would be good to know why the builders are different.

@godofredoc
Copy link
Contributor

@keyonghan can we delete the caches on those two machines and manually re-run the test?

@jmagman
Copy link
Member Author

jmagman commented Feb 3, 2022

I can't figure out where on disk the different types of simulator device images would live though.

I think they are in Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/DeviceTypes/?

@keyonghan
Copy link
Contributor

@keyonghan can we delete the caches on those two machines and manually re-run the test?

Cleaning caches helps! Here is a success run with a pass on build857-m9.
https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/keyonghan_google.com/b66b7c9f91b799685187926648693d492f39716dc480d0c09add5ab16ba6c5c1/+/build.proto

Will run a couple of times, and also on the other bot to verify.

@keyonghan
Copy link
Contributor

keyonghan commented Feb 3, 2022

Five times all passed on build857-m9.
Same pass on build866-m9 after caches clean.
Closing. Please reopen if issue happens again.

Infra Ticket Queue automation moved this from Triaged to Done Feb 3, 2022
@jmagman
Copy link
Member Author

jmagman commented Feb 10, 2022

This just happened again:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8822650102210541713/+/u/list_simulators/stdout

Failing test:

plugin_lint_mac] [STDOUT] stdout:  -> integration_test (0.0.1)
[plugin_lint_mac] [STDOUT] stdout:     - ERROR | [iOS] unknown: Encountered an unknown error (Could not find a `ios` simulator (valid values: watchos). Ensure that Xcode -> Window -> Devices has at least one `ios` simulator listed or otherwise add one.

@jmagman jmagman moved this from Done to New in Infra Ticket Queue Mar 29, 2022
@keyonghan
Copy link
Contributor

The above cl added only two more runtime caches without affecting existing osx_sdk cache:
Screen Shot 2022-03-29 at 5 02 19 PM

@keyonghan
Copy link
Contributor

The two failed builds happened on https://chromium-swarm.appspot.com/bot?id=build818-m9 and https://chromium-swarm.appspot.com/bot?id=build817-m9, both had an earlier failed run on Mac clang-tidy at step install xcode. Wondering if we need a cache refresh.

Trying an led run on a good bot to validate.

@keyonghan
Copy link
Contributor

An led run on build819: https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/keyonghan_google.com/728275e5db28c25ac54938b9e956ab0e40a80813c891077d4d8edf567cc8398b/+/build.proto

So far the device type profile is there. Expectation is the build will pass.

@godofredoc
Copy link
Contributor

Can we try led runs on build818 and 817 and check the content of the xcode simruntime folder from ssh?

@keyonghan
Copy link
Contributor

Latest update:
Led runs on two failed bots:
build 817, build 818

I was blocked on permission issue to ssh to these bots, and @godofredoc is helping validate some cases instead of simply refreshing the caches. From godofredo:

The problem was that the build was run with runtimes property and the old cache name

@zanderso
Copy link
Member

What's the status of this? The Engine tree has been closed for 17 hours.

@CaseyHillers CaseyHillers moved this from New to In progress in Infra Ticket Queue Mar 30, 2022
@CaseyHillers
Copy link
Contributor

Out of curiosity, why is Mac Web Engine left on Mac 10? I kicked off a build in https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Web%20Engine/24081/overview to see if it would pass on Mac 12.

@jmagman
Copy link
Member Author

jmagman commented Mar 30, 2022

Out of curiosity, why is Mac Web Engine left on Mac 10?

It's on macOS 10.15 and Xcode 12.3 because Safari won't launch on the Xcode 13 simulators #99885

@CaseyHillers
Copy link
Contributor

CaseyHillers commented Mar 30, 2022

Copying from internal chat (thanks @keyonghan for the recap):

  1. @jmagman landed PR to push engine builders to xcode13+mac12 with Web Engine remaining in mac10
  2. In post-submit, the ci.yaml roller broke (os dimension not populated and post-submit scheduler had a bug), those builders are still running on mac10 but with new xcode version and runtime (which is not compatible)
  3. @CaseyHillers helped manual roll the ci yaml, and other engine builders are switched to mac12 and running through
  4. However for Web Engine, it is still running on mac10, where earlier failed builds (new xcode and runtime) have polluted the cache.

The hesitation here is there's an issue with the recipes not correctly identifying older xcodes/simulators being used, and not wiped the directory.

AIs:

  • @CaseyHillers to move build825-m9 to staging for future investigation on the true root cause CL
  • Infra will wipe the mac caches on Mac 10 bots

@CaseyHillers
Copy link
Contributor

CaseyHillers commented Mar 30, 2022

I went through the engine build dashboard to find Mac 10 bots run that failed with xcode 13. I gathered the list and will start wiping them:

# Failed bot list
build812-m9
build813-m9
build814-m9
build815-m9
build816-m9
build817-m9
build818-m9
build820-m9
build821-m9
build822-m9
build823-m9
build824-m9
build826-m9
build827-m9

Update: I'm blocked from accessing m9 bots. Requesting permissions for the engprod team to have access (currently @godofredoc is the only one)

@CaseyHillers
Copy link
Contributor

Talked with @yjbanov and it seems like Mac Web Engine is running on Mac 12 now. We landed flutter/engine#32337 as the issue is running this test on the corrupt Mac 10 bots.

@jmagman
Copy link
Member Author

jmagman commented Mar 30, 2022

Talked with @yjbanov and it seems like Mac Web Engine is running on Mac 12 now. We landed flutter/engine#32337 as the issue is running this test on the corrupt Mac 10 bots.

This builder failed many times on Xcode 13 due to #99885 /cc @godofredoc it passed a few times for reasons we couldn't figure out.

@keyonghan
Copy link
Contributor

The latest build is hanging. I guess we need a revert: flutter/engine#32340
Meanwhile, I am cleaning up caches.

@godofredoc
Copy link
Contributor

I have some local changes I used for validation yesterday unfortunately I haven't been able to test them yet. I'll upload the current version of the recipe change just in case someone has free cycles to validate it.

@godofredoc
Copy link
Contributor

Here is a run with the changes to remove the runtimes properly: https://chromium-swarm.appspot.com/task?id=59f5766358a6e610

@keyonghan
Copy link
Contributor

All bots are cleaned up, and we should be ready to land flutter/engine#32340 to unblock the tree.

@CaseyHillers
Copy link
Contributor

After 15+ green runs, this looks fixed. Thanks Keyong!

Infra Ticket Queue automation moved this from In progress to Done Mar 31, 2022
@github-actions
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 Apr 14, 2022
@flutter-triage-bot flutter-triage-bot bot added the c: flake Tests that sometimes, but not always, incorrectly pass label Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: flake Tests that sometimes, but not always, incorrectly pass P0 Critical issues such as a build break or regression team-infra Owned by Infrastructure team
Projects
No open projects
Development

No branches or pull requests

7 participants