NativeScript: Unable to get application path on device. For tns run ios --emulator
Please, provide the details below:
When running tns run IOS --emulator, the project builds successfully, however, it presents the error Unable to apply changes on device: EC3591F5-20AE-495D-93A2-E8347F03D15D. Error is: Unable to get application path on device.
Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?
Yes, this is a real problem.
Tell us about the problem
When running tns run IOS --emulator, the project builds successfully, however, it presents the error Unable to apply changes on device: EC3591F5-20AE-495D-93A2-E8347F03D15D. Error is: Unable to get application path on device.
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
- CLI: (run
tns --versionto fetch it):3.4.3 - Cross-platform modules: (check the ‘version’ attribute in the
node_modules/tns-core-modules/package.jsonfile in your project):4.0.0 - Runtime(s): (look for the
"tns-android"and"tns-ios"properties in thepackage.jsonfile of your project)3.4.1 - Plugin(s): (look for the version number in the
package.jsonfile of your project)Unknown
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 30 (11 by maintainers)
In the iOS Simulator, try: Hardware > Erase All Content And Settings…
Hi @mcaustin1, Can you check if this error is reproducible with the latest CLI and iOS runtime? To do that you can follow the below-attached steps:
npm uninstall nativescript --gnpm install nativescript --gtns platform remove iostns platform add iosthen delete thenode_modulesfolder. Restart the simulator and build the project againtns run ios.@gordonboyle Thanks a lot that was really really helpful…
What I’ve found is when I get into this situation, just delete
platformsdir and run again.Deleting “platforms” folder worked for me too. Thanks!
Thanks Mahmood. Yes, this is a good fix to keep developing, but it adds about an extra minute to the dev cycle per change. That’s totally unacceptable and needs to be actually fixed.
I’m able to consistently reproduce this on MacOS high sierra. When I’m running a project in a simulator and live syncing, if I go out to Finder and copy the project folder to another location (just copying using the UI, not moving), the app immediately crashes in the sim and restart attempts lead to this error. Maybe this will help troubleshoot