-
-
Notifications
You must be signed in to change notification settings - Fork 197
Cant build since Xcode 10 #3909
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
Comments
Seems to be related to the new build system in Xcode 10. A temporary workaround seems to be switching to the legacy build system by going to (in Xcode) |
Hi @larssn, looking at this error I can see that there are multiple
Probably this is due to the fact that you have different major versions for ListView and SideDrawer:
I suppose that upgrading ListView will fix the error. |
It seems that I spoke too fast -- ListView is already the latest but SideDrawer is not. I suggest you upgrade it as well. |
Yes, that fixes it. I managed to reproduce the error with your versions, and it got fixed after upgrading. It seems that the old build system has tolerated this inconsistency and has silently selected one of the 2 frameworks, while the new one is stricter and treats this as an error. |
Thanks for the snappy response. While you are correct that the dependency was behind, even bringing it up to v4.3.0 (using I suspected
Will continue investigating... |
I would suggest that you wipe the The failure continues to occur because you still have two occurrences of the frameworks. Another alternative is to try and run npm dedupe |
Same issue The resulting node_modules folder always seem to have a slightly wrong structure.
So far so good, only one version of nativescript-ui-core.
So Any ideas as to why this happens? |
Do you have a |
As you can see from the above, it's still copying data from two places. Or so it thinks! So I figure it was cached somehow with some kind of Second idea was that even though the files doesn't exist, Xcode will deny any attempt to copy the same framework file? Not sure how to solve that one, if that is the case. I'm new with NativeScript, and I don't know that much yet. |
Hey @larssn , |
@rosen-vladimirov It was my impression that |
No wait, I was thinking about App_Resources. I'll try deleting the platforms. |
😂 It works! Deleting the platforms folder did the trick. Out of curiosity, is there any recommendation on how to manage your dependencies in NS, so stuff like this doesn't happen again? |
I'm having the same problem described here. I did execute the following commands: rm -rf node_modules
rm -rf platforms
rm package-lock.json
npm i
pod repo update
tns run ios
Here's the (anonymized) build system log: Xcode build...
error: unexpected duplicate task: CodeSign /path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework (in target 'MyApp')
error: unexpected duplicate task: CodeSign /path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework (in target 'MyApp')
error: Multiple commands produce '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework':
1) Target 'MyApp' has copy command from '/path/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework'
2) Target 'MyApp' has copy command from '/path/node_modules/nativescript-ui-listview/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework'
error: Multiple commands produce '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework/TNSCore':
1) Target 'MyApp' has copy command from '/path/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework'
2) Target 'MyApp' has copy command from '/path/node_modules/nativescript-ui-listview/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework'
warning: duplicate output file '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework' on task: PBXCp /path/node_modules/nativescript-ui-listview/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework /path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework (in target 'MyApp')
warning: duplicate output file '/path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework/TNSCore' on task: PBXCp /path/node_modules/nativescript-ui-listview/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework /path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework (in target 'MyApp')
warning: duplicate output file '' on task: PBXCp /path/node_modules/nativescript-ui-listview/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework /path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework (in target 'MyApp')
note: Using new build systemnote: Planning buildnote: Constructing build description
** BUILD FAILED ** Dependencies: "dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"@ngrx/effects": "^6.1.0",
"@ngrx/store": "^6.1.0",
"nativescript-angular": "^6.1.0",
"nativescript-feedback": "^1.2.0",
"nativescript-imagepicker": "~5.0.0",
"nativescript-loading-indicator": "^2.4.0",
"nativescript-localize": "^3.0.5",
"nativescript-localstorage": "^1.1.5",
"nativescript-plugin-firebase": "^6.4.1",
"nativescript-theme-core": "~1.0.4",
"nativescript-tslib": "^1.9.1-r1",
"nativescript-ui-listview": "^3.7.0",
"ngrx-store-localstorage": "^5.0.1",
"ngrx-store-logger": "^0.2.2",
"reflect-metadata": "~0.1.10",
"rxjs": "^6.0.0",
"tns-core-modules": "^4.2.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/compiler-cli": "~6.1.0",
"@ngtools/webpack": "~6.2.0",
"codelyzer": "~4.3.0",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "^0.7.4",
"nativescript-dev-webpack": "^0.16.1",
"tns-platform-declarations": "^4.2.0",
"tslint": "~5.10.0",
"typescript": "~2.7.2"
} EDIT After switching to the Legacy Build System I was not able to build successfully. Now I'm able to build using Xcode directly. Xcode build...
=== BUILD TARGET MyApp OF PROJECT MyApp WITH CONFIGURATION Debug ===
Warning: Multiple build commands for output file /path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework
=== BUILD TARGET MyApp OF PROJECT MyApp WITH CONFIGURATION Debug ===
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/UIKit-1V5UHAPTOD24G.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/UIKit-1V5UHAPTOD24G.pcm
note: Linking a static library that was built with -gmodules, but the module cache was not found. Redistributable static libraries should never be built with module debugging enabled. The debug experience will be degraded due to incomplete debug information.
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Darwin-38I6DLZ5IH61J.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Darwin-38I6DLZ5IH61J.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Foundation-3DFYNEBRQSXST.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Dispatch-2LX9MWM6UEPQW.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Dispatch-2LX9MWM6UEPQW.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/ObjectiveC-1R06XOY9T4FIM.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/ObjectiveC-1R06XOY9T4FIM.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/UIKit-1V5UHAPTOD24G.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/UIKit-1V5UHAPTOD24G.pcm
note: Linking a static library that was built with -gmodules, but the module cache was not found. Redistributable static libraries should never be built with module debugging enabled. The debug experience will be degraded due to incomplete debug information.
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Darwin-38I6DLZ5IH61J.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Darwin-38I6DLZ5IH61J.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Foundation-3DFYNEBRQSXST.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Dispatch-2LX9MWM6UEPQW.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Dispatch-2LX9MWM6UEPQW.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/ObjectiveC-1R06XOY9T4FIM.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/ObjectiveC-1R06XOY9T4FIM.pcm
error: make directory /path/platforms/ios/build/emulator/MyApp.app/Frameworks/TNSCore.framework: File exists
2018-09-23 06:05:27.628 xcodebuild[7528:129524] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-14306.16/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:757
Details: unexpected successful exit code from cancelled command <C0029:'PBXCp TNSListView.framework':P16>
Object: <PBXTargetBuildContext: 0x7fa3974e7b50>
Method: -createCommandInvocationRecordFromInvocation:
Thread: <NSThread: 0x7fa397b9f330>{number = 10, name = (null)}
Please file a bug at https://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED ** Here's my ✔ Getting environment information
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 4.2.4 version and is up to date.
✔ Component tns-core-modules has 4.2.1 version and is up to date.
✖ Component tns-android is not installed.
✔ Component tns-ios has 4.2.0 version and is up to date. Solution: I've managed to find the root of all evil: npm list nativescript-ui-core
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
└── [email protected] Fix: tns plugin update nativescript-imagepicker
npm dedupe Now everything's working like a charm. Even with the new build system. |
Not sure if this is going to be a general problem in the ecosystem, so I've reopened it. |
I have the same issue here. |
@xnramx, did you try to deduplicate any plugins that might have appeared more than once under Can you send us the output of |
hello, i have the same issue, with these errors:what i could try to solve it?
thank you |
@peppeg85, can you send us the output of |
@peppeg85 I found out the problem. The |
hi, thanks for your answer, but it donesn't work:
|
You'll have to upgrade
|
hello, i've updated everything and now the build is ok...but the app crashes after the splashscreen... |
in the build i have this error:
|
I am having a similar issue with Xcode 10. As soon as I add the google maps plugin the app fails to build. Please see: |
@peppeg85 Can you send us more information about the crash? Some device logs for example and what kind of crash it is (e.g. Unhandled exception, signal, Access violation). You can refer to this docs section for guidelines how to obtain diagnostic logs from the device if @ignaciofuentes We couldn't reproduce the error that you see. Can you tell us the exact version strings of CocoaPods and Xcode on your machine? You can send us the outputs of |
Have you tried:
Basically that sequence fixed my issues. |
hello i have this error:
is it a problem of permissions? Edit: during nativescript running i have these warnings, maybe someone of them could be useful:
|
If you have a running debugging session in CLI ( These warnings are normal for all tns ios builds and we've already fixed them -- in the next release of NativeScript they won't show up. |
here there are xcode errors:
|
@peppeg85 Thanks! This is far more meaningful now. I think that the problem is with the |
It seems that version 0.5.0 is rebuilt with Xcode 10 and should have this problem fixed. Refs Added official support for Swift 4.2. |
yes, i've upgraded all the dependencies to the latest, but i still crashes, now i have this alert from xcode:
this is the error in the console:
|
This is related to another issue that we found with Xcode 10. The fix has already been published in NPM as Refs: #3920 |
i'm trying to update nativescript but i have the eaccess error, i tried the guide:
i've followed all the guide, if i type "command -v nvm" it answer nvm, but when i run " npm install -g nativescript@next " i have the eaccess error |
Hey @peppeg85 ,
Which should fix the problem. |
@rosen-vladimirov thanks, it worked...with sudo, but installed the 4.2.4, is it right? |
sorry but...i've updated nativescript, but when i run it uses always tns-ios 4.2.0. I tried the global installation and also a local update, in the package lock file i have nativescript version 5.0.0-10-02, but when i run ios it uses tns-ios version 4.2.0
EDIT: it seems to be this error, but if i delete and reinstall node_modules and reinstall
|
Hey @peppeg85, did you try running |
no, i didn't, now it works, i had to reinstall cocoapods too edit:
on this i still dont update xcode, here is tns doctor:
|
@peppeg85 removing
|
i tried but it doesnt work,
i've upgraded xcode, nativescript, cocoapods, run tns update...can i open another issue or can i paste here the tns debug ios --log trace report? --SOLVED: |
I'm glad you've fixed it! It seems that the issue was triggered by having npm installed locally: |
maybe, yes i ran npm i npm, if i update it now i should run
right? |
Yes. |
thanks for all the support |
UPDATED every Plugin. i can able to build app now. my package.json looks like this |
In my situation, it is different. I just run command line |
This comment has been minimized.
This comment has been minimized.
Hey all,
In case the build still fails, please open a new issue and provide all the required information in the issue template. You can also add the |
Did you verify this is a real problem by searching the [NativeScript Forum]
Found a related issue: https://stackoverflow.com/questions/52340033/xcodebuild-failed-exit-code-65-ios
Tell us about the problem
After updating to Xcode 10 (today), my
tns run ios --log trace
fails on thexcode build
step with:(I've anonymized the output)
I have the entire trace log output if anyone needs it.
Not sure if the error could be related to having the xcode update run in the background, while xcodebuild being used from the commandline. I've tried doing a
tns update
, but it didn't fix the issue.Which platform(s) does your issue occur on?
MacOS 10.13.6 (High Sierra)
Please provide the following version numbers that your issue occurs with:
Please tell us how to recreate the issue in as much detail as possible.
Not sure how to recreate if it doesn't fail on a fresh upgrade of xcode 10 in your end.
The text was updated successfully, but these errors were encountered: