ionic-team / ionic-team/cordova-plugin-ionic-webview

Android - hostname converted to IP

Open
#625 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
493
Forks
410
PR merge metrics
No merged PRs in 30d

Description

**Problem**

On Android using a number in `HostName` makes a weird behaviour where the domain name is converted to an IP address and crash the application.

**What is expected to happen?**

It should keep using the domain name (It is part of the http standard to be able to use numbers)

**What does actually happen?**

The number is converted to an ip e.g. 90000 -> `http://0.1.95.144/`

Using https://www.browserling.com/tools/dec-to-ip you can see that 90000 converts to 0.1.95.144

**Reproduce**

Set the Hostname to a number in config.xml-> 90000

```

```

Add a breakpoint in `src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java` -> `onPageStarted()` Method.

First breakpoint hit will be ok, second will show an IP instead of the correct hostname.

First hit:
Screen Shot 2020-11-10 at 6 20 04 pm

Second hit:
Screen Shot 2020-11-10 at 6 20 17 pm

**Help wanted**

I do not expect to have the problem fix instantly but if someone has an idea where it could come from (even if it is vague), that would be great 👍

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.