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

Xcode Simulator not found when running ios from a new Ignite project #1401

Closed
budda opened this issue Apr 6, 2019 · 24 comments
Closed

Xcode Simulator not found when running ios from a new Ignite project #1401

budda opened this issue Apr 6, 2019 · 24 comments
Labels

Comments

@budda
Copy link
Contributor

budda commented Apr 6, 2019


What's going on?

A default macOS Simulator doesn't open when running ios project if the project is created with Ignite CLI.

If i generate the same base project with react-native then it does open the default iPhone X simulator.


Steps to reproduce

I created a project with
react-native init awesome
and then ran it with
react-native run-ios
and the Simulator opened and showed the app.

I created a project with
ignite n awesomeIgnite
and then ran it with
react-native run-ios
and no Simulator opens. An error instead:


Could not find iPhone X simulator

Error: Could not find iPhone X simulator
    at resolve (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
    at new Promise (<anonymous>)
    at runOnSimulator (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
    at Object.runIOS [as func] (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
    at Promise.resolve.then (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/cliEntry.js:117:22)

ignite doctor results:

  platform           darwin
  arch               x64
  cpu                8 cores                                            Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  directory          /Users/mikec/Documents/code/mobile/awesomeIgnite
vvv -----[ DEBUG ]----- vvv
{ Error: not found: yarn
    at getNotFoundError (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/node_modules/which/which.js:13:12)
    at Function.whichSync [as sync] (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/node_modules/which/which.js:131:9)
    at which (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/src/core-extensions/system-extension.js:113:22)
    at Command.module.exports [as run] (/usr/local/lib/node_modules/ignite-cli/src/commands/doctor.js:45:20)
    at processTicksAndRejections (internal/process/task_queues.js:86:5) code: 'ENOENT' }
^^^ -----[ DEBUG ]----- ^^^

I don't have Yarn installed :)

@budda
Copy link
Contributor Author

budda commented Apr 6, 2019

Looking at RN local-cli/runIOS/runIOS.js it executes xcrun simctl list --json devices so am not sure what can be different between the generated projects that runIOS.js even cares about?

@budda
Copy link
Contributor Author

budda commented Apr 6, 2019

If I call react-native run-ios --simulator="iPhone 6" in the Ignite project folder I get the same simulator not found error - whatever phone model I specify.

If I do the same in the basic react-native project folder I get a different simulator, as specified, every time.

@devingray
Copy link

+1

@cassmtnr
Copy link

cassmtnr commented Apr 8, 2019

If you run rm -rf node_modules then npm install and npm audit fix it will open the iPhone X emulator but will give another error:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening Cestouapp.xcodeproj

** BUILD FAILED **

@kevinvangelder
Copy link
Member

Do you have the XCode commandline tools installed? xcode-select --install

@budda
Copy link
Contributor Author

budda commented Apr 8, 2019

Yes command line tools installed. Works fine with react-native tool direct.

@kevinvangelder
Copy link
Member

Okay, can you either check the output for the actual error (it's usually 20-50 lines up) or open the project in XCode and try building it to see what error it returns?

@cassmtnr
Copy link

cassmtnr commented Apr 8, 2019

On react-native run-ios:

info       facebook::jsc::JSCRuntime::createObject(std::__1::shared_ptr<facebook::jsi::HostObject>)::$_0::operator()() const in libReact.a(JSCRuntime.o)
      facebook::jsc::JSCRuntime::createFunctionFromHostFunction(facebook::jsi::PropNameID const&, unsigned int, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>)::$_1::operator()() const in libReact.a(JSCRuntime.o)

info ld: symbol(s) not found for architecture x86_64

info clang: error:

info linker command failed with exit code 1 (use -v to see invocation)

info

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening Cestouapp.xcodeproj

** BUILD FAILED **


The following build commands failed:
        Ld /Users/cassiano/CISS/Cestouapp/ios/build/Cestouapp/Build/Products/Debug-iphonesimulator/Cestouapp.app/Cestouapp normal x86_64
(1 failure)

debug Error: Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening Cestouapp.xcodeproj

** BUILD FAILED **


The following build commands failed:
        Ld /Users/cassiano/CISS/Cestouapp/ios/build/Cestouapp/Build/Products/Debug-iphonesimulator/Cestouapp.app/Cestouapp normal x86_64
(1 failure)

    at ChildProcess.buildProcess.on.code (/Users/cassiano/CISS/Cestouapp/node_modules/@react-native-community/cli/build/commands/runIOS/runIOS.js:231:16)
    at ChildProcess.emit (events.js:193:13)
    at maybeClose (internal/child_process.js:1001:16)
    at Socket.stream.socket.on (internal/child_process.js:405:11)
    at Socket.emit (events.js:193:13)
    at Pipe._handle.close (net.js:614:12)

If I run on Xcode it gets 52 errors on the issues panel:

:-1: Undefined symbol: _JSClassCreate
:-1: Undefined symbol: _JSContextGetGlobalObject
:-1: Undefined symbol: _JSEvaluateScript
:-1: Undefined symbol: _JSGlobalContextCreateInGroup
:-1: Undefined symbol: _JSGlobalContextRelease
:-1: Undefined symbol: _JSGlobalContextRetain
:-1: Undefined symbol: _JSObjectCallAsConstructor
:-1: Undefined symbol: _JSObjectCallAsFunction
:-1: Undefined symbol: _JSObjectCopyPropertyNames
:-1: Undefined symbol: _JSObjectGetPrivate
:-1: Undefined symbol: _JSObjectGetProperty
:-1: Undefined symbol: _JSObjectGetPropertyAtIndex
:-1: Undefined symbol: _JSObjectGetPrototype
:-1: Undefined symbol: _JSObjectHasProperty
:-1: Undefined symbol: _JSObjectIsFunction
:-1: Undefined symbol: _JSObjectMake
:-1: Undefined symbol: _JSObjectMakeArray
:-1: Undefined symbol: _JSObjectSetPrivate
:-1: Undefined symbol: _JSObjectSetProperty
:-1: Undefined symbol: _JSObjectSetPropertyAtIndex
:-1: Undefined symbol: _JSObjectSetPrototype
:-1: Undefined symbol: _JSPropertyNameAccumulatorAddName
:-1: Undefined symbol: _JSPropertyNameArrayGetCount
:-1: Undefined symbol: _JSPropertyNameArrayGetNameAtIndex
:-1: Undefined symbol: _JSPropertyNameArrayRelease
:-1: Undefined symbol: _JSStringCreateWithUTF8CString
:-1: Undefined symbol: _JSStringGetMaximumUTF8CStringSize
:-1: Undefined symbol: _JSStringGetUTF8CString
:-1: Undefined symbol: _JSStringIsEqual
:-1: Undefined symbol: _JSStringRelease
:-1: Undefined symbol: _JSStringRetain
:-1: Undefined symbol: _JSValueIsArray
:-1: Undefined symbol: _JSValueIsBoolean
:-1: Undefined symbol: _JSValueIsInstanceOfConstructor
:-1: Undefined symbol: _JSValueIsNull
:-1: Undefined symbol: _JSValueIsNumber
:-1: Undefined symbol: _JSValueIsObject
:-1: Undefined symbol: _JSValueIsObjectOfClass
:-1: Undefined symbol: _JSValueIsString
:-1: Undefined symbol: _JSValueIsUndefined
:-1: Undefined symbol: _JSValueMakeBoolean
:-1: Undefined symbol: _JSValueMakeNull
:-1: Undefined symbol: _JSValueMakeNumber
:-1: Undefined symbol: _JSValueMakeString
:-1: Undefined symbol: _JSValueMakeUndefined
:-1: Undefined symbol: _JSValueProtect
:-1: Undefined symbol: _JSValueToBoolean
:-1: Undefined symbol: _JSValueToNumber
:-1: Undefined symbol: _JSValueToObject
:-1: Undefined symbol: _JSValueToStringCopy
:-1: Undefined symbol: _JSValueUnprotect
:-1: Undefined symbol: _kJSClassDefinitionEmpty

@kevinvangelder
Copy link
Member

I saw someone mention on another thread that the simulator names have changed in the latest version of XCode, not sure if that's related or not. I've never seen the error you're getting.

@budda
Copy link
Contributor Author

budda commented Apr 8, 2019

I mentioned in comment 2 the simulator names work fine from the non Ignite project folder.

I also get the same build error as @cassianomon above.

@ruddell
Copy link
Collaborator

ruddell commented Apr 8, 2019

This was mentioned in the Slack. Looks related to facebook/react-native#24196 and infinitered/ignite-bowser#164

@kevinvangelder
Copy link
Member

Keep in mind, Ignite doesn't always use the latest RN version, so that could easily be the source of discrepancies between vanilla and Ignite, particularly when there are tooling changes and the fixes are only included in the bleeding-edge versions.

@cassmtnr
Copy link

cassmtnr commented Apr 8, 2019

Should we open a new issue for the error after resolving simulator one?

@jamonholmgren
Copy link
Member

I'm working on this (as well as the other errors reported). Thanks everyone for helping out!

@jamonholmgren
Copy link
Member

The problem with ignite doctor when yarn is not installed is fixed in #1404, which has been deployed as 2.2.4. Upgrade with npm upgrade -g ignite-cli.

@jamonholmgren
Copy link
Member

The latest version of Bowser (3.2.0) seems to fix this issue. Please re-try:

yarn global add ignite-cli
ignite new MyApp -b bowser --no-detox

Note that the feature generating Detox tests is currently broken; that's next on my list to work on.

@cassmtnr
Copy link

cassmtnr commented Apr 10, 2019

With bowser it worked fine but with andross it still having the issue, should I open a new issue?

@budda
Copy link
Contributor Author

budda commented Apr 10, 2019

I thought the CLI tool would be where the simulator issue would have been. Strange.
What was the actual fix? I couldn't find it from looking at the commits to either repo.

@budda
Copy link
Contributor Author

budda commented Apr 10, 2019

With bowser it worked fine but with andross it still having the issue, should I open a new issue?

New issue opened on the boilerplate project - infinitered/ignite-andross#263

@jamonholmgren
Copy link
Member

The fix appears to be upgrading to 0.59.0.

@budda
Copy link
Contributor Author

budda commented Apr 12, 2019

@jamonholmgren just upgrading the RN version doesn't resolve the build fail that @cassianomon mentions earlier in comment #1401 (comment)

@jamonholmgren
Copy link
Member

@budda FYI the Detox issue should be fixed on the latest Ignite CLI, 4.0.0-beta.3. Since that's tagged latest for dist-tags, it's easy to upgrade to:

yarn global add ignite-cli

I believe all outstanding major issues are fixed for Bowser. Andross still has an issue with its plugins and I'll work on that when I have time.

@budda
Copy link
Contributor Author

budda commented Apr 22, 2019

@budda FYI the Detox issue should be fixed on the latest Ignite CLI, 4.0.0-beta.3. Since that's tagged latest for dist-tags, it's easy to upgrade to:

yarn global add ignite-cli

I believe all outstanding major issues are fixed for Bowser. Andross still has an issue with its plugins and I'll work on that when I have time.

Assume you mean [email protected] which i got via npm. Is yarn still faster these days?

@jamonholmgren
Copy link
Member

jamonholmgren commented May 5, 2019

@budda Yarn is still faster for most things, yeah. I use it almost exclusively, but we do try to support both (albeit not for Ignite's source code itself). (And good catch, I did mean 3.0.0-beta.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants