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

Error: Can't find a simulator to match with "iPhone 7" #1241

Closed
matt-paul opened this issue Mar 28, 2019 · 3 comments
Closed

Error: Can't find a simulator to match with "iPhone 7" #1241

matt-paul opened this issue Mar 28, 2019 · 3 comments

Comments

@matt-paul
Copy link

matt-paul commented Mar 28, 2019

Describe the bug
Detox can't find the simulators.

To Reproduce

  1. Run detox test

  2. Run xcrun simctl list to verify available simulators.

My package.json configuration.

 "detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/myapp.app",
        "build": "xcodebuild -workspace ios/myapp.xcworkspace -scheme myapp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=NO",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    }

config.json

{
  "setupFilesAfterEnv": ["./init.js"],
  "testEnvironment": "node"
}

init.js

const detox = require('detox');
const config = require('../package.json').detox;
const adapter = require('detox/runners/jest/adapter');

jest.setTimeout(120000);
jasmine.getEnv().addReporter(adapter);

beforeAll(async () => {
  await detox.init(config);
});

beforeEach(async () => {
  await adapter.beforeEach();
});

afterAll(async () => {
  await adapter.afterAll();
  await detox.cleanup();
});

Expected behaviour
Detox should find the simulator and run the test(s). Please note that I am fairly new to React Native development and so perhaps there is something simple i am missing here.

Screenshots
Screenshot 2019-03-28 at 11 13 50

Screenshot 2019-03-28 at 11 08 12

Environment

  • Detox: 12.1.0
  • React Native: 0.59.2
  • Node: 11.12.0
  • Device: iPhone 7
  • Xcode: 10.2(10E125)
  • macOS: 10.14.4
@LeoNatan
Copy link
Contributor

Detox uses apple�simutils for finding devices.

Try running applesimutils --list --byName "iPhone 7".

Most likely, you need to upgrade `applesimutils.

@matt-paul
Copy link
Author

@LeoNatan The result of that command was an empty array, so i have upgraded and now back up again. Strange, I am not sure how this occurred as detox was happy until (i believe) i updated Xcode, however there may well be some user error involved at some point. 🤔 Thank you for your quick response.

@LeoNatan
Copy link
Contributor

Sure

@lock lock bot locked as resolved and limited conversation to collaborators Mar 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants