Hey everyone :wave: I'm starting to see this on al...
# multiplatform
s
Hey everyone 👋 I'm starting to see this on all my repos on Github Actions, including Arrow.
Invalid device: Apple Watch Series 5 - 44mm
8405 Any ideas how to fix this? It's been blocking a couple projects, and I've tried a couple things but none seems to work. If I check the MacOs runner to list the simulators it lists this specific simulator, and it's amongst the list 🤔
You'll either need to add a new simulator in CI with the likes of
xcrun simctl create $foo $bar
or you can force the simulator to be used by Kotlin with
Copy code
tasks.withType<KotlinNativeSimulatorTest> {
    deviceId = "$foo"
}
I remember something about
44mm
vs
(44mm)
or something like this
The string has to match exactly IIRC
s
I saw your message when browsing Slack but I couldn't figure out how to use
KotlinNativeSimulatorTest
since it only seems to fail for watch 🤔 Can you run the watch tests on an iPhone? I tried
xcrun simctl create
but I got a message that the device already existed :s
m
This is what I did to "fix" it on my local machine
Copy code
xcrun simctl create "Apple Watch Series 5 - 44mm" "Apple Watch Series 5 (44mm)"
s
Okay, going to try that command on CI.
m
Can you run the watch tests on an iPhone?
Yea, good call, I think not. I guess it then has to check the name or something like this
Copy code
tasks.withType<KotlinNativeSimulatorTest> {
    when (name) {
       "watchosSimulatorArm64Test" -> deviceId = "Apple Watch Series 5 (44mm)"
    }
}
Not great but should work
r
FYI this should be fixed in 1.8.0-Beta, where test devices are picked from the list of available devices: https://youtrack.jetbrains.com/issue/KT-54090/Take-an-Apple-test-device-from-the-device-list
s
Oh nice! Happy to hear that! Hopefully it can progress from the beta soon 🤞
j
You can also downgrade Xcode
s
@jw so Github Action started failing because they upgraded XCode in the runners? 🤕
r
@simon.vergauwen they indeed made Xcode 14 the default recently
s
Aha, okay. That explains a lot. I solved the issue by using the recommendation from @mbonnin in Arrow.
xcrun simctl create "Apple Watch Series 5 - 44mm" "Apple Watch Series 5 (44mm)"
Downgrading XCode in Github Actions sound tedious, so I'll Martin's fix until 1.8.0 is released. Thanks for all the help 🙏
j
It's a three-line change
s
Any reference you could share?
s
Thank you for sharing!