Skip to content

tns test ios --emulator is failing with "JS ERROR Error: Could not find module './'. Computed" #2016

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
hypery2k opened this issue Aug 28, 2016 · 5 comments

Comments

@hypery2k
Copy link

When trying to run with latest native script-cli on a web pack setup I'm getting the following error for ios:

28 08 2016 15:17:02.822:INFO [karma]: Karma v1.2.0 server started at http://localhost:9883/
28 08 2016 15:17:02.822:INFO [launcher]: Launching browser ios with unlimited concurrency
28 08 2016 15:17:02.830:INFO [launcher]: Starting browser NativeScript Unit Test Runner
Transferring project files...
Successfully transferred all files.
Applying changes...
Successfully synced application de.app on device DB77DE32-F440-4B2B-A693-567993AF244B.
Aug 28 15:17:59 Mare-MBP myapp[34344]: 1   0x104e21c67 -[TNSRuntime executeModule:]
Aug 28 15:17:59 Mare-MBP myapp[34344]: 2   0x104a55702 main
Aug 28 15:17:59 Mare-MBP myapp[34344]: 3   0x107ed4145 start
Aug 28 15:17:59 Mare-MBP myapp[34344]: undefined: JS ERROR Error: Could not find module './'. Computed path '/Users/mreinhardt/Library/Developer/CoreSimulator/Devices/DB77DE32-F440-4B2B-A693-567993AF244B/data/Containers/Bundle/Application/FE6E2BED-65A8-41D5-9C36-25C5DBAA2036/de.app/app'.
Aug 28 15:17:59 Mare-MBP com.apple.CoreSimulator.SimDevice.DB77DE32-F440-4B2B-A693-567993AF244B.launchd_sim[34279] (UIKitApplication:de.app[0xfeb6][34344]): Service exited due to signal: Segmentation fault: 11
@enchev
Copy link
Contributor

enchev commented Aug 29, 2016

Hey @hdeshev do you know what can cause this?

@rosen-vladimirov
Copy link
Contributor

Hi @hypery2k ,
I believe you have faced this issue #1636
In order to verify that's the same problem, can you try running your command once again (without changing anything in your project dir, just run the command two consecutive times) and see if the tests will start on the device?

rosen-vladimirov added a commit that referenced this issue Aug 30, 2016
First call to `tns test <platform>` always fails as the file with Karma configuration is not sent to device. The reason is that it's craeted in `node_modules/unit-test-runner` after the project is prepared.
The second execution of the command will include the file, but it may not be correct. It's regenerated, but again after the project is prepared.
Fix the `test-execution-service` to prepare the project after the configuration file is created.
Fixes #1636 and possibly #2016
Fixes the problem in Travis builds that console hangs and travis builds never end.
@hypery2k
Copy link
Author

with the second run it seems to work, but just clean all and removed all git ignored files and afterwards I run the test command with --bundle option and it's working. Maybe it's more related to the web pack setup of nativescript

@enchev
Copy link
Contributor

enchev commented Aug 31, 2016

Hey @hypery2k,

Please use --bundle when you app is already done and you want to release it. At the moment our webpack build is not designed to work with tests.

@hypery2k
Copy link
Author

ok. Got it

@enchev enchev closed this as completed Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants