NativeScript / NativeScript/nativescript-cli

tns test android no reachable hosts

Open
#5,167 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

Environment

  • 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

package.json

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with tns test android and usesCleartextTraffic=false, then inspect the AndroidManifest.xml changes referenced in pull request #30 and compare them with the application's manifest behavior. Done means the Android tests run without requiring usesCleartextTraffic=true in the production application.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
cli, mobile-dev, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.