Skip to content

Command xcode build failed with exit code 65 #4163

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

Closed
PythonDevOp opened this issue Nov 21, 2018 · 22 comments
Closed

Command xcode build failed with exit code 65 #4163

PythonDevOp opened this issue Nov 21, 2018 · 22 comments

Comments

@PythonDevOp
Copy link

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.0.0
  • Cross-platform modules: 5.0.3
  • Android Runtime: 5.0.0
  • iOS Runtime: 5.0.0
  • Plugin(s):
    • nativescript-angular: ~7.0.0
      
    • nativescript-camera: ^4.1.1,
      
    • nativescript-theme-core: ~1.0.4,
      
    • nativescript-ui-listview: ^3.8.0,
      

MAC High Sierra 10.13.3
XCode: 9.0.1

Describe the bug
Error log:

Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Executing before-liveSync hook from /Users/user/Documents/ngNative/hooks/before-liveSync/nativescript-angular-sync.js
Executing before-watchPatterns hook from /Users/user/Documents/ngNative/hooks/before-watchPatterns/nativescript-dev-typescript.js
Executing before-watchPatterns hook from /Users/user/Documents/ngNative/hooks/before-watchPatterns/nativescript-dev-webpack.js
Executing before-watch hook from /Users/user/Documents/ngNative/hooks/before-watch/nativescript-dev-typescript.js
Found peer TypeScript 3.1.6
Executing before-watch hook from /Users/user/Documents/ngNative/hooks/before-watch/nativescript-dev-webpack.js
Copying template files...
Platform ios successfully added. v5.0.0
Executing before-shouldPrepare hook from /Users/user/Documents/ngNative/hooks/before-shouldPrepare/nativescript-dev-webpack.js
Executing before-prepare hook from /Users/user/Documents/ngNative/hooks/before-prepare/nativescript-dev-typescript.js
Hook skipped because either bundling or livesync is in progress.
Preparing project...
Executing before-prepareJSApp hook from /Users/user/Documents/ngNative/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Successfully prepared plugin nativescript-angular for ios.
Successfully prepared plugin nativescript-camera for ios.
Successfully prepared plugin nativescript-theme-core for ios.
Successfully prepared plugin nativescript-ui-listview for ios.
Successfully prepared plugin tns-core-modules for ios.
Successfully prepared plugin nativescript-intl for ios.
nativescript-permissions is not supported for ios.
Successfully prepared plugin nativescript-permissions for ios.
Successfully prepared plugin nativescript-ui-core for ios.
Successfully prepared plugin tns-core-modules-widgets for ios.
Project successfully prepared (iOS)
Executing after-prepare hook from /Users/user/Documents/ngNative/hooks/after-prepare/nativescript-dev-webpack.js
Building project...
Xcode build...
=== BUILD TARGET ngNative OF PROJECT ngNative WITH CONFIGURATION Debug ===
ld: framework not found CoreServices for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/user/Documents/ngNative/platforms/ios/internal/NativeScript.framework/NativeScript) was compiled for MacOSX
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/user/Documents/ngNative/node_modules/nativescript-ui-listview/platforms/ios/TNSListView.framework/TNSListView) was compiled for MacOSX
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/user/Documents/ngNative/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework/TNSCore) was compiled for MacOSX
ld: warning: ObjC dylib (/Users/user/Documents/ngNative/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework/TNSWidgets) was compiled for iOS Simulator, but dylibs others were compiled for MacOSX
ld: framework not found CoreServices for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
=== BUILD TARGET ngNative OF PROJECT ngNative WITH CONFIGURATION Debug ===
error: the following command failed with exit code 1 but produced no further output
Ld build/ngNative.build/Debug-iphonesimulator/ngNative.build/Objects-normal/x86_64/ngNative normal x86_64
** BUILD FAILED **

Unable to apply changes on device: BF6E776F-C30A-4908-9746-EB3DFF0A9317. Error is: Command xcodebuild failed with exit code 65.
Executing after-watch hook from /Users/user/Documents/ngNative/hooks/after-watch/nativescript-dev-typescript.js
Stopping tsc watch
Executing after-watch hook from /Users/user/Documents/ngNative/hooks/after-watch/nativescript-dev-webpack.js
Stopping webpack watch

To Reproduce

I created a new app via tns create newApp --ng and added the plugins above.

Expected behavior

Sample project

Additional context

App runs on Genymotion Android emulation, but does not run on IOS emulator.

@NickIliev
Copy link
Contributor

@PythonDevOp the issue is most likely related to your XCode version. Try updating to XCode 10.

@Fatme
Copy link
Contributor

Fatme commented Nov 22, 2018

@PythonDevOp,

Your problem might be related to this #3909

@PythonDevOp
Copy link
Author

@NickIliev In order for me to upgrade to XCode 10, I'd have to update my Mac OS too. Not sure if I'd want to do that just for the sake of getting this working. Is there anything else I can try?

@Fatme I tried the steps mentioned here but that did not work.

One thing I find interesting is the issue I am having (error code 65) seems to be present in issue #3909 as well, and one suggested solution to that is to downgrade the XCode run version. I am slightly confused as to what the problem really is and what the best way to solve it is, but this problem appears to be a known one that more than 1 person has faced.

Any thoughts on the culprit? MY guess is that it has something to do with this, but I dont know what it means:

ld: warning: ObjC dylib (/Users/user/Documents/ngNative/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework/TNSWidgets) was compiled for iOS Simulator, but dylibs others were compiled for MacOSX

@dtopuzov
Copy link
Contributor

Hi @PythonDevOp,

Can you reproduce the problem on brand new hello world project without any plugins?

@alereisan
Copy link

I have Updated XCode from version 9.4 to 10.1
Still does not work.

Command xcodebuild failed with exit code 65

@dtopuzov
Copy link
Contributor

Hi @alereisan,

Can you reproduce the issue in hello world app without plugins?

@alereisan
Copy link

@dtopuzov yes, i just made a new project in sidekick -> Angular & Typescript -> Blank

Tried running it on iPhone 6 (real device):

[18-12-11 16:53:37.973] Error detected during LiveSync on a967568f06ab317c825eb0315604abe2cb9b4f3a for /Users/iamacpro2018/Documents/nativescript/CleanIOSBUildTest. Error: Command xcodebuild failed with exit code 65 Error output:
** ARCHIVE FAILED **

@alereisan
Copy link

@dtopuzov I just tried to run it in debug on iPhone XR Simulator.
On Simulator it runs without problem.

@PythonDevOp
Copy link
Author

@dtopuzov - sorry, I haven't tried. Will try again today and let you know

@alereisan
Copy link

alereisan commented Dec 18, 2018

I have opened the project in xcode.
Let xcode auto-fix warnings.
Ran directly from xcode on iPhone 6 successfully.

xcode: 10.1
macos: mojave

@iguissouma
Copy link

Hello,
I'm having same issue with latest nativescript version(5.1.1-2018-12-14-12739) and xcode(9.2) with blank ng project.
I can't update xcode version.
any suggestion?
Thanks.

@miroslavaivanova
Copy link
Contributor

Hello,
I wasn't able to reproduce this issue. Please provide us more information.

  1. Steps to reproduce.
  2. Version of node, npm, ios version of device/simulator
  3. post your package.json

Please, build the project with tns run ios --log trace > log.txt and send us log.txt

@PythonDevOp
Copy link
Author

@miroslavaivanova How would you like for me to send the log?

@miroslavaivanova
Copy link
Contributor

@PythonDevOp you can drag and drop the file into the comment box.

@theRaffe
Copy link

theRaffe commented Feb 7, 2019

hello do you know if nativescript 5.1.1 will work with Xcode 9.4 ??

I have the same problem

@ppico22
Copy link

ppico22 commented Feb 7, 2019

log.txt
Hello @miroslavaivanova im running into the same problem, i ran the project on the ios simulator with success, but this error comes up when i try to do it on my phone.

i ran the command to generate the .txt file and i´m attaching it.

@PythonDevOp
Copy link
Author

@miroslavaivanova Please see the attached log:
log.txt

@ppico22
Copy link

ppico22 commented Feb 8, 2019

@miroslavaivanova i ran the tns debug command and i saw that the conflict was a dependecy on my package json file that was depracated i erased and i works.

@KristianDD
Copy link
Contributor

Hi @PythonDevOp,
It seems that the version of your Xcode is very old. Please try upgrading Xcode to a newer version (10.1) and your NativeScript v5.x.x. project should build and run without any issues.

@PythonDevOp
Copy link
Author

@KristianDD - Ok. I will try to update my OS to accommodate for the new XCode 10.1 version. Previously I was unable to due to security policy locally, but will try again.

@mgpepe
Copy link

mgpepe commented May 4, 2019

I opened up XCode, there you can find details on what the error is. in my case some library was missing.

@rosen-vladimirov
Copy link
Contributor

Thanks guys, as this issue is quite old and contains different problems and solutions, I'm closing it. In case you have similar problem, please open a new issue.

@NativeScript NativeScript locked as resolved and limited conversation to collaborators May 13, 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