Title: Unable to run `tns test
Open Graph Title: Unable to run `tns test
X Title: Unable to run `tns test
Description: 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-2018-10-25-12514 Cross-platform modul...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/NativeScript/nativescript-cli/issues/4071
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to run `tns test \u003cplatform>`","articleBody":"**Environment**\r\nProvide 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):\r\n - CLI: 5.0.0-2018-10-25-12514\r\n - Cross-platform modules: 4.2.1\r\n - Android Runtime: 4.2.0\r\n - iOS Runtime: 4.2.0\r\n - Plugin(s):\r\n```\r\n\"dependencies\": {\r\n \"@angular/animations\": \"~6.1.0\",\r\n \"@angular/common\": \"~6.1.0\",\r\n \"@angular/compiler\": \"~6.1.0\",\r\n \"@angular/core\": \"~6.1.0\",\r\n \"@angular/forms\": \"~6.1.0\",\r\n \"@angular/http\": \"~6.1.0\",\r\n \"@angular/platform-browser\": \"~6.1.0\",\r\n \"@angular/platform-browser-dynamic\": \"~6.1.0\",\r\n \"@angular/router\": \"~6.1.0\",\r\n \"nativescript-angular\": \"~6.1.0\",\r\n \"nativescript-theme-core\": \"~1.0.4\",\r\n \"nativescript-unit-test-runner\": \"^0.3.4\",\r\n \"reflect-metadata\": \"~0.1.8\",\r\n \"rxjs\": \"~6.2.0\",\r\n \"tns-core-modules\": \"~4.2.0\",\r\n \"zone.js\": \"^0.8.26\"\r\n },\r\n \"devDependencies\": {\r\n \"@nativescript/schematics\": \"~0.3.0\",\r\n \"chai\": \"4.2.0\",\r\n \"karma\": \"3.1.1\",\r\n \"karma-chai\": \"0.1.0\",\r\n \"karma-mocha\": \"1.3.0\",\r\n \"karma-nativescript-launcher\": \"0.4.0\",\r\n \"mocha\": \"5.2.0\",\r\n \"nativescript-dev-typescript\": \"~0.7.0\",\r\n \"typescript\": \"~2.7.2\"\r\n }\r\n```\r\n\r\n\r\n**Describe the bug**\r\n`tns test android` and `tns test ios` fails to complete due to socket timeout and transport error, respectively.\r\n\r\nOn iOS:\r\n```\r\n $ tns test ios\r\nSearching for devices...\r\n26 10 2018 09:02:40.485:WARN [watcher]: Pattern \"/Users/ddiaz/workspace/tns-test-plat/app/**/*.js\" does not match any file.\r\n26 10 2018 09:02:40.496:WARN [karma]: No captured browser, open http://localhost:9876/\r\n26 10 2018 09:02:40.499:INFO [karma-server]: Karma v3.1.1 server started at http://0.0.0.0:9876/\r\n26 10 2018 09:02:40.499:INFO [launcher]: Launching browsers ios with concurrency unlimited\r\n26 10 2018 09:02:40.509:INFO [launcher]: Starting browser NativeScript Unit Test Runner\r\nExecuting before-prepare hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-prepare/nativescript-dev-typescript.js\r\nFound peer TypeScript 2.7.2\r\nPreparing project...\r\nProject successfully prepared (ios)\r\nExecuting after-prepare hook from /Users/ddiaz/workspace/tns-test-plat/hooks/after-prepare/nativescript-unit-test-runner.js\r\nExecuting before-liveSync hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-liveSync/nativescript-angular-sync.js\r\nExecuting before-watchPatterns hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-watchPatterns/nativescript-dev-typescript.js\r\nExecuting before-watch hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-watch/nativescript-dev-typescript.js\r\nFound peer TypeScript 2.7.2\r\nSkipping prepare.\r\nSuccessfully transferred all files on device 980CDF63-0DE2-4904-B01D-D92EAAE03791.\r\nRefreshing application on device 980CDF63-0DE2-4904-B01D-D92EAAE03791...\r\nSuccessfully synced application org.nativescript.tnstestplat on device 980CDF63-0DE2-4904-B01D-D92EAAE03791.\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:54:28: NSUTR: fetching http://127.0.0.1:9876/context.json\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:54:28: NSUTR: fetching http://10.27.38.116:9876/context.json\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:60:32: NSUTR: found karma at 127.0.0.1\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:97:20: NSUTR: connecting to karma at http://127.0.0.1:9876\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:60:32: NSUTR: found karma at 10.27.38.116\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:116:24: NSUTR: successfully connected to karma\r\n26 10 2018 09:03:00.171:INFO [NativeScript / 12.0 (12.0; iPhone)]: Connected on socket mFoKgG3ZXp0X-KXFAAAA with id NativeScriptUnit-8860\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:159:20: NSUTR: downloading http://127.0.0.1:9876/context.json\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:200:32: NSUTR: eval script /base/node_modules/chai/chai.js?db92883971379fbea71a12c25b271c26a3afc3f6\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:200:32: NSUTR: eval script /base/node_modules/karma-chai/adapter.js?bab484a2111791847997ed88414622bccfbd2749\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:200:32: NSUTR: eval script /base/node_modules/mocha/mocha.js?840d4fbbcc65a16cec39f9e25af2ea6d2cff68ea\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:200:32: NSUTR: eval script /base/node_modules/karma-mocha/lib/adapter.js?e8826109cf50b958ee4bd667517729ffdd4de363\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:212:24: NSUTR: beginning test run\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:254:20: NSUTR: completed test run.\r\nNativeScript / 12.0 (12.0; iPhone): Executed 0 of 0 ERROR (0.003 secs / 0 secs)\r\nCONSOLE LOG file:///app/tns_modules/nativescript-unit-test-runner/main-view-model.js:258:24: NSUTR: completeAck\r\nNativeScript / 12.0 (12.0; iPhone) ERROR\r\n DisconnectedClient disconnected from CONNECTED state (transport error)\r\nNativeScript / 12.0 (12.0; iPhone): Executed 0 of 0 ERROR (0.003 secs / 0 secs)\r\n```\r\n\r\nOn Android:\r\n\r\n```\r\n $ tns test android\r\nSearching for devices...\r\nStarting Android emulator with image Pixel_API_28\r\nWaiting for emulator device initialization...\r\n26 10 2018 09:31:46.069:WARN [watcher]: Pattern \"/Users/ddiaz/workspace/tns-test-plat/app/**/*.js\" does not match any file.\r\n26 10 2018 09:31:46.080:WARN [karma]: No captured browser, open http://localhost:9876/\r\n26 10 2018 09:31:46.083:INFO [karma-server]: Karma v3.1.1 server started at http://0.0.0.0:9876/\r\n26 10 2018 09:31:46.083:INFO [launcher]: Launching browsers android with concurrency unlimited\r\n26 10 2018 09:31:46.091:INFO [launcher]: Starting browser NativeScript Unit Test Runner\r\nExecuting before-prepare hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-prepare/nativescript-dev-typescript.js\r\nFound peer TypeScript 2.7.2\r\nPreparing project...\r\nSuccessfully prepared plugin nativescript-angular for android.\r\nSuccessfully prepared plugin nativescript-theme-core for android.\r\nSuccessfully prepared plugin nativescript-unit-test-runner for android.\r\nSuccessfully prepared plugin tns-core-modules for android.\r\nSuccessfully prepared plugin nativescript-intl for android.\r\nSuccessfully prepared plugin tns-core-modules-widgets for android.\r\nProject successfully prepared (android)\r\nExecuting after-prepare hook from /Users/ddiaz/workspace/tns-test-plat/hooks/after-prepare/nativescript-unit-test-runner.js\r\nExecuting before-liveSync hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-liveSync/nativescript-angular-sync.js\r\nExecuting before-watchPatterns hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-watchPatterns/nativescript-dev-typescript.js\r\nExecuting before-watch hook from /Users/ddiaz/workspace/tns-test-plat/hooks/before-watch/nativescript-dev-typescript.js\r\nFound peer TypeScript 2.7.2\r\nSkipping prepare.\r\nBuilding project...\r\nGradle build...\r\n + setting applicationId\r\n + applying user-defined configuration from /Users/ddiaz/workspace/tns-test-plat/App_Resources/Android/app.gradle\r\n + adding nativescript runtime package dependency: nativescript-optimized-with-inspector\r\n + adding aar plugin dependency: /Users/ddiaz/workspace/tns-test-plat/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar\r\nNote: Some input files use or override a deprecated API.\r\nNote: Recompile with -Xlint:deprecation for details.\r\nProject successfully built.\r\nInstalling on device emulator-5554...\r\nSuccessfully installed on device with identifier 'emulator-5554'.\r\nUnable to apply changes on device: emulator-5554. Error is: Socket connection timed out..\r\nExecuting after-watch hook from /Users/ddiaz/workspace/tns-test-plat/hooks/after-watch/nativescript-dev-typescript.js\r\n```\r\n\r\n**To Reproduce**\r\n\u003c!-- Add commands used or steps taken to reproduce the behaviour. -->\r\nReproducible by creating a new project from template, and bootstrapping testing features.\r\n```\r\nnpm un -g nativescript; npm i -g nativescript@rc\r\ntns create test-proj --ng\r\ntns test init\r\nselect Mocha\r\ntns test ios --emulator\r\n```\r\n\r\n**Expected behavior**\r\nShould run sample test successfully.\r\n\r\n**Sample project**\r\nNot attaching since it's reproducible from a newly created project--happy to do so if needed.\r\n\r\n**Additional context**\r\n\u003c!-- Add any other context about the problem here. -->\r\n","author":{"url":"https://github.com/dcarrot2","@type":"Person","name":"dcarrot2"},"datePublished":"2018-10-26T16:52:03Z","url":"https://github.com/NativeScript/nativescript-cli/issues/4071"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a190e30f-d810-144a-d707-c396bff5359b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9196:1F927B:A96A15:DF8875:6B01BADA |
| html-safe-nonce | 1a306209fb15810628c88434a4a94edf4a4ff5bab22eedcc7392665a5d24130e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTk2OjFGOTI3QjpBOTZBMTU6REY4ODc1OjZCMDFCQURBIiwidmlzaXRvcl9pZCI6IjQwNDc2OTY0Njk5NjczNTQ1ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ca1506b73a176a411107d7996e7d840d30a59b83194510ae3bdf60147f7e4bc3 |
| hovercard-subject-tag | issue:374465748 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-cli/4071/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68ef86319f20d755bd40bd8371784b7df50d483a289d91eabc456608b381810f/NativeScript/nativescript-cli/issues/4071 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68ef86319f20d755bd40bd8371784b7df50d483a289d91eabc456608b381810f/NativeScript/nativescript-cli/issues/4071 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dcarrot2 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 21347346 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21347346 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width