You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/04/27 21:20:24 UTC
[GitHub] [cordova-android] DarrenPBrown opened a new issue, #1426: Setting preference hostname causes ERR_NAME_NOT_RESOLVED
DarrenPBrown opened a new issue, #1426:
URL: https://github.com/apache/cordova-android/issues/1426
### Issue Type
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ x] Bug Report
- [ ] Feature Request
- [ ] Support Question
## Description
I have created a new cordova project and have added android 10.1.2, I have amended the config.xml to include <preference name="hostname" value="ABCDEFG"/> in the hope that I could then change the backend to trust this host and avoid any CORS errors.
## Information
When I launch the app I get an error stating...
Web Page not available
The web page at https://abcdefg/index.html could not be loaded because:
net:ERR_NAME_NOT_RESOLVED
### Command or Code
create a new project using: cordova create testapp3
add the android platform using: cordova platform add android@10.1.2
amend the config.xml to include: <preference name="hostname" value="ABCDEFG"/>
build the project using: cordova build android
### Environment, Platform, Device
Samsung Galaxy J6, Android 10
### Version information
Cordova CLI 11.0.0
cordova android 10.1.2
## Checklist
<!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
- [ x] I searched for already existing GitHub issues about this
- [ ] I updated all Cordova tooling to their most recent version
- [ x] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] erisu closed issue #1426: Setting preference hostname causes ERR_NAME_NOT_RESOLVED
Posted by GitBox <gi...@apache.org>.
erisu closed issue #1426: Setting preference hostname causes ERR_NAME_NOT_RESOLVED
URL: https://github.com/apache/cordova-android/issues/1426
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] DarrenPBrown commented on issue #1426: Setting preference hostname causes ERR_NAME_NOT_RESOLVED
Posted by GitBox <gi...@apache.org>.
DarrenPBrown commented on issue #1426:
URL: https://github.com/apache/cordova-android/issues/1426#issuecomment-1111498983
The config.xml entry that I added to the project and included in the issue has been removed when I submitted the issue so here it is again, this time without the less than and greater than symbols:
preference name="hostname" value="ABCDEFG"/
hope that makes sense.
regards,
Darren.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] DarrenPBrown commented on issue #1426: Setting preference hostname causes ERR_NAME_NOT_RESOLVED
Posted by GitBox <gi...@apache.org>.
DarrenPBrown commented on issue #1426:
URL: https://github.com/apache/cordova-android/issues/1426#issuecomment-1111889653
Thank you, if it works fine in lower case then that is fine, I will change the config file.
Thank you for your help.
regards,
Darren.
Darren Brown | Technician | Finance and ICT | Commissioning, Communities and Policy | Derbyshire County Council | County Hall, Matlock, Derbyshire DE4 3AG | Direct dial: 01629 538957
Visit us at www.derbyshire.gov.uk<http://www.derbyshire.gov.uk/> | Follow us on Twitter<http://www.twitter.com/derbyshirecc> | Find us on Facebook<http://www.facebook.com/derbyshirecc> |
From: Norman Breau ***@***.***>
Sent: 28 April 2022 03:08
To: apache/cordova-android ***@***.***>
Cc: Darren Brown (Corporate Services and Transformation) ***@***.***>; Author ***@***.***>
Subject: Re: [apache/cordova-android] Setting preference hostname causes ERR_NAME_NOT_RESOLVED (Issue #1426)
I spent some time on this and I'm not sure if this is solvable by Cordova.
This is because Cordova doesn't lowercase the hostname at all. In fact I traced the code all the way to the point where it passes the URL to the webview to load, which gets passed in as proper casing as authored by the config.
[Screenshot from 2022-04-27 22-56-21]<https://user-images.githubusercontent.com/11200662/165661125-112d9f48-9d1e-43c7-beea-28acb0ebfa42.png>
I'm not well knowledgable with domain specs, but RFC 1035<https://datatracker.ietf.org/doc/html/rfc1035> seems to suggest that domains should be compared case insensitive, and case should be preserved whenever possible. So this may be a bug in the underlying android webview.
—
Reply to this email directly, view it on GitHub<https://github.com/apache/cordova-android/issues/1426#issuecomment-1111661474>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOMYUBEVAUPMKACGOJCIGYDVHHXH3ANCNFSM5UQM3FFQ>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
________________________________
Join thousands of local residents who receive regular county council news direct to their inbox. Go to our website<https://www.derbyshire.gov.uk/council/news-events/derbyshire-now/derbyshire-now.aspx> and click on the Sign Up button.
________________________________
Think before you print! Save energy and paper. Do you really need to print this email?
Derbyshire County Council works to improve the lives of local people by delivering high quality services. You can find out more about us by visiting www.derbyshire.gov.uk<http://www.derbyshire.gov.uk/>.
If you want to work for us go to our job pages on www.derbyshire.gov.uk/jobs<http://www.derbyshire.gov.uk/jobs>. You can register for e-mail alerts, download job packs and apply on-line.
________________________________
Please Note
This email is confidential, may be legally privileged and may contain personal views that are not the views of Derbyshire County Council. It is intended solely for the addressee. If this email was sent to you in error please notify us by replying to the email. Once you have done this please delete the email and do not disclose, copy, distribute, or rely on it.
Under the Data Protection Act 2018 and the Freedom of Information Act 2000 the contents of this email may be disclosed.
Any personal information you have given us will be processed in accordance with our privacy notices, available at www.derbyshire.gov.uk/privacynotices<http://www.derbyshire.gov.uk/privacynotices>.
Derbyshire County Council reserves the right to monitor both sent and received emails.
________________________________
CONTROLLED
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] breautek commented on issue #1426: Setting preference hostname causes ERR_NAME_NOT_RESOLVED
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1426:
URL: https://github.com/apache/cordova-android/issues/1426#issuecomment-1111661474
I spent some time on this and I'm not sure if this is solvable by Cordova.
This is because Cordova doesn't lowercase the hostname at all. In fact I traced the code all the way to the point where it passes the URL to the webview to load, which gets passed in as proper casing as authored by the config.

I'm not well knowledgable with domain specs, but [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035) seems to suggest that domains should be compared case insensitive, and case should be preserved whenever possible. So this _may_ be a bug in the underlying android webview.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] breautek commented on issue #1426: Setting preference hostname causes ERR_NAME_NOT_RESOLVED
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1426:
URL: https://github.com/apache/cordova-android/issues/1426#issuecomment-1111599819
Reproduced and confirmed.
The config:
```
<preference name="hostname" value="ABCDEFG" />
```
will produce the `ERR_NAME_NOT_RESOLVED` error.
The config:
```
<preference name="hostname" value="abcdefg" />
```
On the other hand does work as intended.
It seems something lowercases the hostname as this is the full error:

As you can see, even when using upper case, it attempts to load the url in lowercase format.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org