tns test android no reachable hosts
See original GitHub issueEnvironment
- CLI: 6.2.2
- Cross-platform modules: 6.2.1
- Android Runtime: 6.2.0
- iOS Runtime: n/a
- Plugin(s):
Describe the bug && Reproduction I’m experiencing the same issue outlined in #4119.
Run tns test android
with usesCleartextTraffic=false
, the test app shows “no reachable hosts”. Setting usesCleartextTraffic=true
allows the tests to execute.
I don’t want to set usesCleartextTraffic
to true with my production application, so I’m wondering how I get around this.
Expected behavior I expect the tests to run 😄
Additional context This was supposed to be resolved with this pull request. I see that there is an AndroidManifest.xml file in those changes, and I’m wondering if that is supposed to override the settings in my application’s manifest https://github.com/NativeScript/nativescript-unit-test-runner/pull/30
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
tns test android test harness reports "no reachable hosts" #4182
Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or ...
Read more >Nativescript unit testing shows no reachable hosts
I'm trying to follow this tutorial to do unit testing in Nativescript with Jasmine/Karma. When I do tns test android, my phone flashes...
Read more >Unit Testing - NativeScript Docs
Write and execute unit tests to ensure that newly added features are working correctly and no regressions are introduced in the mobile app....
Read more >Capturing and Inspecting Android Traffic - Fiddler Everywhere
Check the emulator documentation for the IP address used as a loopback address. In most cases, the loopback alias of the Android emulator...
Read more >NativeScript i - Tutorialspoint
NativeScript Playground application will be helpful for testing your apps in Android or iOS device without deploying the application in the real ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jevenson , the idea is to include a script on your side that sets
usesCleartextTraffic
to true and then runs the tests, for example in Node.js script you can do something like:Currently it is not possible to run the test on API level 28 or above without this setting and we do not have plans to research other ways to achieve this.
I made a pul request, to display an error message when this error happen
https://github.com/NativeScript/nativescript-unit-test-runner/pull/51