FormidableLabs / react-native-owl

Visual regression testing library for React Native that enables developers to introduce visual regression tests to their apps.
https://formidable.com/open-source/react-native-owl/
MIT License
635 stars 27 forks source link

Xcode 15.0 support #165

Closed thep-dr closed 5 months ago

thep-dr commented 11 months ago

Hi FormidableLabs,

Thank you for a great product.

I have a hard time spinning up tests when using Xcode 15. Is it something that should be supported?

It seems like it thinks that the Simulator has not been started, however, it is running.

Command: npx owl test --platform iOS

Output:

[OWL - CLI] Starting websocket server.
[OWL - CLI] Running tests on ios.
Error: Command failed with exit code 149: xcrun simctl status_bar iPhone 14 override --time 9:41
    at makeError (/Users/xxx/Documents/xxx/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/xxx/Documents/xxx/node_modules/execa/index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  shortMessage: 'Command failed with exit code 149: xcrun simctl status_bar iPhone 14 override --time 9:41',
  command: 'xcrun simctl status_bar iPhone 14 override --time 9:41',
  escapedCommand: 'xcrun simctl status_bar "iPhone 14" override --time "9:41"',
  exitCode: 149,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Specify --help for available options

If I run the command failing command: xcrun simctl status_bar "iPhone 14" override --time 9:41

Output:

An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=405):
Unable to lookup in current state: Shutdown
simplisticated commented 11 months ago

I'm getting the same error. It's a huge blocker for the implementation of visual regression tests in a mobile app.

Artem-Nanavov commented 10 months ago

Yes, I found the solution, need to use this command before run test.

SIMCTL_CHILD_SIMULATOR_RUNTIME_VERSION=16.4 xcrun simctl boot "<device name>"

Example: SIMCTL_CHILD_SIMULATOR_RUNTIME_VERSION=16.4 xcrun simctl boot "iPhone 14 Pro Max".

Read why this happening here.

robwalkerco commented 7 months ago

Is this still an issue? I presume that it's resolved by Apple now that iOS Simulators 17.x are released

robwalkerco commented 5 months ago

Closing as it appears that this was resolved by newer ios simulator versions