-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of hostname preference and content in config.xml matters and breaks things #1299
Comments
We have an open PR that is making changes to this stuff and I think will probably resolve this issue as well: #1298 Can you give that a PR a test to see if it does address your issue? |
This issues was already fixed in the PR that @breautek linked. |
Jup that seems like it would fix this issue, thanks! 🎉 |
I thought I could get around this by putting the hostname pref before the content but it seems that the config.xml it generates in the android project has a fixed order where the content is always first. Which means that this issue now totally prevents me from having a working build :/ |
Thanks @erisu for merging the fix 🙏 |
решение уже в мастере? |
@trinitiwowka not sure what wizard you mean (could also be Google translate 😅 ) but a fix for this is in |
Bug Report
Problem
What is expected to happen?
Setting hostname 'just works' with the content option.
What does actually happen?
The app doesn't load.
Information
The config xml parser sees the content node first and sets the launch url to the default
cordova-android/framework/src/org/apache/cordova/ConfigXmlParser.java
Line 133 in e69ab6a
it then sees the hostname pref and sets it in the prefs.
Afterwards getLaunchUrl is called which then returns the localhost one and not the prefs one.
cordova-android/framework/src/org/apache/cordova/ConfigXmlParser.java
Line 48 in e69ab6a
I think just not doing
cordova-android/framework/src/org/apache/cordova/ConfigXmlParser.java
Lines 159 to 163 in e69ab6a
Command or Code
Config.xml
Environment, Platform, Device
cordova-android 10.x
Version information
Checklist
The text was updated successfully, but these errors were encountered: