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

Unable to install Detox 8.2.3 using Xcode 10 beta 6 #913

Closed
taylesworth opened this issue Aug 30, 2018 · 12 comments · Fixed by #940
Closed

Unable to install Detox 8.2.3 using Xcode 10 beta 6 #913

taylesworth opened this issue Aug 30, 2018 · 12 comments · Fixed by #940

Comments

@taylesworth
Copy link

Description

Unable to install Detox 8.2.3 using Xcode 10 beta 6.

Steps to Reproduce

With Xcode 10 beta 6 installed, run yarn add detox.

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 8.2.3
  • React Native: 0.55.2
  • Node: 9.8.0
  • Device: n/a
  • Xcode: Xcode 10 beta 6
  • macOS: 10.13.6

Device and verbose Detox logs

[1/1] ⡀ detox: Building Detox.framework from /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src...
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
error /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments: 
Directory: /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox
Output:
+ xcodebuild -version
+++ dirname /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/scripts/build_framework.ios.sh
++ dirname /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/scripts
+ detoxRootPath=/Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox
++ node -p 'require('\''/Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/package.json'\'').version'
+ detoxVersion=8.2.3
++ echo 8.2.3
++ xcodebuild -version
++ shasum
++ awk '{print $1}'
+ sha1=ace2b19975268f18996ba8eabadf6e067c17c782
+ detoxFrameworkDirPath=/Users/tom.aylesworth/Library/Detox/ios/ace2b19975268f18996ba8eabadf6e067c17c782
+ detoxFrameworkPath=/Users/tom.aylesworth/Library/Detox/ios/ace2b19975268f18996ba8eabadf6e067c17c782/Detox.framework
+ main
+ '[' -d /Users/tom.aylesworth/Library/Detox/ios/ace2b19975268f18996ba8eabadf6e067c17c782 ']'
+ prepareAndBuildFramework
+ '[' -d /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios ']'
+ detoxSourcePath=/Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src
+ extractSources /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src
+ detoxSourcePath=/Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src
+ echo 'Extracting Detox sources...'
Extracting Detox sources...
+ mkdir -p /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src
+ tar -xjf /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/Detox-ios-src.tbz -C /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src
+ buildFramework /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src
+ detoxSourcePath=/Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src
+ echo 'Building Detox.framework from /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src...'
+ mkdir -p /Users/tom.aylesworth/Library/Detox/ios/ace2b19975268f18996ba8eabadf6e067c17c782
Building Detox.framework from /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src...
+ /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/scripts/build_universal_framework.sh /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/ios_src/Detox.xcodeproj /Users/tom.aylesworth/Library/Detox/ios/ace2b19975268f18996ba8eabadf6e067c17c782
child_process.js:596
    throw err;
    ^

Error: Command failed: /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/scripts/build_framework.ios.sh
    at checkExecSyncError (child_process.js:575:11)
    at Object.execFileSync (child_process.js:593:13)
    at Object.<anonymous> (/Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox/scripts/postinstall.js:2:27)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)

@LeoNatan
Copy link
Contributor

LeoNatan commented Sep 2, 2018

Please describe your environment; is it just Xcode 10, or do you have Xcode 9 as well?
What does xcodeselect -p print?

@LeoNatan
Copy link
Contributor

LeoNatan commented Sep 2, 2018

Also, delete all folders inside ~/Library/Detox and retry the Detox install. There should now be one folder in there and inside should be a detox_ios.log file. Paste the contents of that file here. Thanks

@taylesworth
Copy link
Author

I do have both Xcode 10 beta 6 and Xcode 9 installed.

xcode-select -p points to the Xcode 10 beta 6 directory as you can see in the terminal output below.

c02rq0q1g8wl:Appian tom.aylesworth$ xcode-select -p
/Applications/Xcode-beta6.app/Contents/Developer
c02rq0q1g8wl:Appian tom.aylesworth$ rm -rf ~/Library/Detox/*
c02rq0q1g8wl:Appian tom.aylesworth$ ls ~/Library/Detox/
c02rq0q1g8wl:Appian tom.aylesworth$ rm -rf node_modules/
c02rq0q1g8wl:Appian tom.aylesworth$ yarn install
yarn install v1.3.2
$ bash ./bin/preinstall.sh
Regenerating Registry.native.js
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "react-native > metro > @babel/plugin-transform-exponentiation-operator@7.0.0-beta.44" has incorrect peer dependency "@babel/core@7.0.0-beta.44".
warning "react-native > metro > @babel/register@7.0.0-beta.44" has incorrect peer dependency "@babel/core@7.0.0-beta.44".
warning " > babel-loader@6.4.1" has unmet peer dependency "babel-core@^6.0.0".
[4/4] 📃  Building fresh packages...
[1/2] ⢀ fsevents: [fsevents] Success: "/Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node" is installed via remote
[2/2] ⢀ detox: Building Detox.framework from ./ios_src...
[-/2] ⢀ waiting...
[-/2] ⢀ waiting...
error /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox: Command failed.
Exit code: 65
Command: scripts/postinstall.sh
Arguments: 
Directory: /Users/tom.aylesworth/repo/ae/appian-libraries/sail-client-native/Appian/node_modules/detox

@taylesworth
Copy link
Author

detox_ios.log

@LeoNatan
Copy link
Contributor

LeoNatan commented Sep 5, 2018

Thanks
I’m currently on vacation. Will look at this when I’m back.

@oieduardorabelo
Copy link

oieduardorabelo commented Sep 6, 2018

adding more information here,

trying to run examples/demo-react-native-jest:

Detox: ^9.0.0
React Native: 0.51.1
Node: 8.11.4
Device: n/a
Xcode: Version 9.2 (9C40b)
macOS: Sierra 10.12.6

receiving same errors as @taylesworth

✔ ~/Desktop/demo-react-native-jest [master L|✔] 
16:13 $ yr
yarn install v1.9.4
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning react-native > connect@2.30.2: connect 2.x series is deprecated
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > babel-jest@21.2.0" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0".
[4/4] 📃  Building fresh packages...
[-/3] ⠠ waiting...
[3/3] ⠠ detox
error /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments: 
Directory: /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox
Output:
+ xcodebuild -version
+++ dirname /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/scripts/build_framework.ios.sh
++ dirname /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/scripts
+ detoxRootPath=/Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox
++ node -p 'require('\''/Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/package.json'\'').version'
+ detoxVersion=9.0.1
++ echo 9.0.1
++ shasum
++ xcodebuild -version
++ awk '{print $1}'
+ sha1=4a0b5935f33eb33d6388b74fc11443701cf00f53
+ detoxFrameworkDirPath=/Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53
+ detoxFrameworkPath=/Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53/Detox.framework
+ main
+ '[' -d /Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53 ']'
+ '[' '!' -d /Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53/Detox.framework ']'
+ echo '/Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
         deleting /Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53 and trying to rebuild.'
+ rm -rf /Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53
/Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
         deleting /Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53 and trying to rebuild.
+ prepareAndBuildFramework
+ '[' -d /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios ']'
+ detoxSourcePath=/Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src
+ extractSources /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src
+ detoxSourcePath=/Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src
+ echo 'Extracting Detox sources...'
Extracting Detox sources...
+ mkdir -p /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src
+ tar -xjf /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/Detox-ios-src.tbz -C /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src
+ buildFramework /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src
+ detoxSourcePath=/Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src
+ echo 'Building Detox.framework from /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src...'
+ mkdir -p /Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53
Building Detox.framework from /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src...
+ /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/scripts/build_universal_framework.sh /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/ios_src/Detox.xcodeproj /Users/eduardorabelo/Library/Detox/ios/4a0b5935f33eb33d6388b74fc11443701cf00f53
child_process.js:624
    throw err;
    ^

Error: Command failed: /Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/scripts/build_framework.ios.sh
    at checkExecSyncError (child_process.js:601:13)
    at Object.execFileSync (child_process.js:621:13)
    at Object.<anonymous> (/Users/eduardorabelo/Desktop/demo-react-native-jest/node_modules/detox/scripts/postinstall.js:2:27)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)

@Brad19
Copy link

Brad19 commented Sep 14, 2018

@LeoNatan
I'm facing the same issue with 10.0 (10A254a). Can you pls let us know if we have fix anytime soon. Thanks,
Brad

@LeoNatan
Copy link
Contributor

I’m back on 20th but there are holidays. I’ll look at it as soon as possible.

@rszalski
Copy link

Same thing happens on:

Node v8.12.0
React Native v0.57.0
XCode v9.4.1
macOS: 10.13.6
Detox: 9.0.1

$ xcode-select -p                                                                                                                                                                                                                    
/Applications/Xcode.app/Contents/Developer
$ yarn add -D detox@9.0.1                                                                                                                                                                                                            
yarn add v1.9.4
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
[2/2] ⠁ detox
error /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments:
Directory: /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox
Output:
+ xcodebuild -version
+++ dirname /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/scripts/build_framework.ios.sh
++ dirname /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/scripts
+ detoxRootPath=/Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox
++ node -p 'require('\''/Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/package.json'\'').version'
+ detoxVersion=9.0.1
++ echo 9.0.1
++ xcodebuild -version
++ shasum
++ awk '{print $1}'
+ sha1=f3f578247b96002b5b1ed85a9bda6176252d7352
+ detoxFrameworkDirPath=/Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352
+ detoxFrameworkPath=/Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352/Detox.framework
+ main
+ '[' -d /Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352 ']'
+ '[' '!' -d /Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352/Detox.framework ']'
+ echo '/Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
         deleting /Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352 and trying to rebuild.'
/Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
         deleting /Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352 and trying to rebuild.
+ rm -rf /Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352
+ prepareAndBuildFramework
+ '[' -d /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios ']'
+ detoxSourcePath=/Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src
+ extractSources /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src
+ detoxSourcePath=/Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src
+ echo 'Extracting Detox sources...'
+ mkdir -p /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src
Extracting Detox sources...
+ tar -xjf /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/Detox-ios-src.tbz -C /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src
+ buildFramework /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src
+ detoxSourcePath=/Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src
+ echo 'Building Detox.framework from /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src...'
+ mkdir -p /Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352
Building Detox.framework from /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src...
+ /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/scripts/build_universal_framework.sh /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/ios_src/Detox.xcodeproj /Users/rszalski/Library/Detox/ios/f3f578247b96002b5b1ed85a9bda6176252d7352
child_process.js:625
    throw err;
    ^

Error: Command failed: /Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/scripts/build_framework.ios.sh
    at checkExecSyncError (child_process.js:602:13)
    at Object.execFileSync (child_process.js:622:13)
    at Object.<anonymous> (/Users/rszalski/Dropbox/Settings/google_play/coinego/node_modules/detox/scripts/postinstall.js:2:27)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)

@LeoNatan
Copy link
Contributor

I don't see a problem in those logs. I will try to reproduce the issue on my computer when I get back.

@jamespearson
Copy link

Quick update: This persists in the final release of XCode 10. Avoid upgrading Xcode (for now).

@karanjthakkar
Copy link
Contributor

Anyone who's interested can checkout #940 which is a potential fix for this issue. 🙂

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

Successfully merging a pull request may close this issue.

8 participants