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

Can't run ios app on case-sensitive filesystem on macOS #2946

Closed
ivanbuhov opened this issue Jul 4, 2017 · 10 comments
Closed

Can't run ios app on case-sensitive filesystem on macOS #2946

ivanbuhov opened this issue Jul 4, 2017 · 10 comments
Assignees
Milestone

Comments

@ivanbuhov
Copy link
Contributor

From @NickIliev on July 3, 2017 14:31

From @gbonline on June 30, 2017 13:30

Hi, I tried to update nativescript this morning, to the 3.1.1 version, and my angular app didn't run anymore, also a new project don't work with the error of missing entitlements file

I tried with the simply commands

tns create new2 --ng
cd new2
tns run ios

then It can't run with a trace like this:

Create product structure
/bin/mkdir -p /Users/nemesix/Sviluppo/NativeScript3/new2/platforms/ios/build/emulator/new2.app

ProcessProductPackaging "" build/new2.build/Debug-iphonesimulator/new2.build/new2.app.xcent
    cd /Users/nemesix/Sviluppo/NativeScript3/new2/platforms/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lib/share/oracle/instantclient_12_1"
    builtin-productPackagingUtility -entitlements -format xml -o /Users/nemesix/Sviluppo/NativeScript3/new2/platforms/ios/build/new2.build/Debug-iphonesimulator/new2.build/new2.app.xcent
warning: Falling back to contents of entitlements file "new2.entitlements" because it was modified during the build process. Modifying the entitlements file during the build is unsupported.error: The file “new2.entitlements” couldn’t be opened because there is no such file.

** BUILD FAILED **


The following build commands failed:
	ProcessProductPackaging "" build/new2.build/Debug-iphonesimulator/new2.build/new2.app.xcent
(1 failure)
Unable to apply changes on device: D7FEB5F0-06BB-4EF8-B9E8-61ED4FAEA138. Error is: Command xcodebuild failed with exit code 65.

What can I do?

Copied from original issue: NativeScript/NativeScript#4484

Copied from original issue: NativeScript/ios-jsc#776

@ivanbuhov
Copy link
Contributor Author

From @yavin5 on July 3, 2017 14:37

I have this problem now as well, and I don't know how to fix it.

@ivanbuhov
Copy link
Contributor Author

From @yavin5 on July 3, 2017 17:8

Why is this issue closed without any solution?

@ivanbuhov
Copy link
Contributor Author

From @NickIliev on July 4, 2017 7:20

@yavin5 the issue was never closed but moved to this repository - however, we can not reproduce the issue on our side so any additional information available would be of great help.
DO you have all the prerequisites for working with nativeScript on your MAC (XCode, xcodeproj, CocoaPods y as listed here)

@ivanbuhov
Copy link
Contributor Author

@gbonline @yavin5 I can't reproduce the issue. I tried with the following steps:

tns create new2 --ng
cd new2
tns run ios

Can you think of something that may help reproducing the issue e.g. using the latest beta of Xcode or some other tool.
I found similar issue in the Firebase plugin repo -> EddyVerbruggen/nativescript-plugin-firebase#333 but it seems that it is not the same because it requires using the Firebase plugin.

I guess that the CLI build step cleans the new2.entitlements file and the build fails later because it can't find it. I assume that it is related to this one #2753 so I am moving the issue to the nativescript-cli repo.

@charalamposc
Copy link

I have also the same error. With version 3.0.x is was ok. The dependencies I use are:

"dependencies": {
    "@angular/animations": "~4.1.0",
    "@angular/common": "~4.1.0",
    "@angular/compiler": "~4.1.0",
    "@angular/core": "~4.1.0",
    "@angular/forms": "~4.1.0",
    "@angular/http": "~4.1.0",
    "@angular/platform-browser": "~4.1.0",
    "@angular/router": "~4.1.0",
    "base-64": "^0.1.0",
    "nativescript-advanced-webview": "^1.1.3",
    "nativescript-angular": "~3.0.0",
    "nativescript-pdf-view": "^2.0.1",
    "nativescript-push-notifications": "^0.1.3",
    "nativescript-telerik-ui": "^2.0.1",
    "nativescript-theme-core": "~1.0.2",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.3.0",
    "tns-core-modules": "^3.1.0",
    "utf8": "^2.1.2",
    "zone.js": "~0.8.2"
  }

@simonox
Copy link

simonox commented Jul 18, 2017

On a case sensitive file system it does not work. The project is built into a platforms/iosfolder. The entitlement file is copied to a platforms/iOSfolder.

screen shot 2017-07-18 at 10 43 07

@charalamposc
Copy link

A case for reproduction:

Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
node: v6.9.1
cocoapods: /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods.rb
tns info:

┌──────────────────┬─────────────────┬────────────────┬─────────────┐
│ Component        │ Current version │ Latest version │ Information │
│ nativescript     │ 3.1.2           │ 3.1.2          │ Up to date  │
│ tns-core-modules │ 3.1.0           │ 3.1.0          │ Up to date  │
│ tns-android      │ 3.1.1           │ 3.1.1          │ Up to date  │
│ tns-ios          │ 3.1.0           │ 3.1.0          │ Up to date  │
└──────────────────┴─────────────────┴────────────────┴─────────────┘

I create a new project:

$ tns create iostest
Installing  tns-template-hello-world
/somewhere/iostest
└─┬ tns-template-hello-world@3.1.0
  └── nativescript-theme-core@1.0.4

Installing  tns-core-modules
/somewhere/iostest
└─┬ tns-core-modules@3.1.0
  └── tns-core-modules-widgets@3.1.0

Project iostest was successfully created.

then

$ cd iostest

and

$ tns run ios
Searching for devices...
Copying template files...
  ◜ Installing tns-iosInstalling  tns-ios
/somewhere/iostest
└── tns-ios@3.1.0

Project successfully created.
Preparing project...
Successfully prepared plugin nativescript-theme-core for ios.
Successfully prepared plugin tns-core-modules for ios.
Successfully prepared plugin tns-core-modules-widgets for ios.
Project successfully prepared (iOS)
Building project...

...

warning: Falling back to contents of entitlements file "iostest.entitlements" because it was modified during the build process. Modifying the entitlements file during the build is unsupported.error: The file “iostest.entitlements” couldn’t be opened because there is no such file.

** BUILD FAILED **


The following build commands failed:
	ProcessProductPackaging "" build/iostest.build/Debug-iphonesimulator/iostest.build/iostest.app.xcent
(1 failure)
Unable to apply changes on device: A176F414-7050-4742-8B35-1B2DDAB865FE. Error is: Command xcodebuild failed with exit code 65.

so the problem is still there.

I tried the workaround described in this issue, so I created the file iostest.entitlements in App/App_Resources/iOS and pasted the content as described.

I removed the ios platform, recreated it, and run the app in the emulator again.

The error is still the same.

In the platforms directory, I can see:
28413773-7895d5a6-6d51-11e7-965b-2e79a5d68b16

So, something is working the wrong way.

In another project, before the upgrade to 3.1.2, the workaround worked fine...

@spike1292
Copy link

I think the following line is the root cause: https://github.com/NativeScript/nativescript-cli/blob/master/lib/services/ios-entitlements-service.ts#L25 where this.$devicePlatformsConstants.iOS resolves to iOS while it should be ios

@charalamposc
Copy link

I can confirm that the problem occurs on case sensitive file systems

@rosen-vladimirov
Copy link
Contributor

Hey all,
Thanks for the information and special thanks to @spike1292 who had found the root cause of the issue. We've already fixed it in master branch, so you can give it a try by installing CLI's next version: npm i -g nativescript@next

@dtopuzov dtopuzov changed the title Can't run ios app after update to 3.1.1 Can't run ios app on case-sensitive filesystem on macOS Aug 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants