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 2021/07/28 16:05:46 UTC

[GitHub] [cordova-android] AdriVanHoudt opened a new issue #1299: Order of hostname preference and content in config.xml matters and breaks things

AdriVanHoudt opened a new issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   Setting hostname 'just works' with the content option.
   ```xml
   <content src="index.html" />
   <preference name="hostname" value="mydomain.com" />
   ```
   
   
   ### What does actually happen?
   
   The app doesn't load.
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   The config xml parser sees the content node first and sets the launch url to the default https://github.com/apache/cordova-android/blob/e69ab6a6879071262cd82e527fba8bf141ec7240/framework/src/org/apache/cordova/ConfigXmlParser.java#L133
   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. https://github.com/apache/cordova-android/blob/e69ab6a6879071262cd82e527fba8bf141ec7240/framework/src/org/apache/cordova/ConfigXmlParser.java#L48
   
   I think just not doing https://github.com/apache/cordova-android/blob/e69ab6a6879071262cd82e527fba8bf141ec7240/framework/src/org/apache/cordova/ConfigXmlParser.java#L159-L163 would make getLaunchUrl reutrn the correct result in all cases.
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   Config.xml
   ```xml
   <content src="index.html" />
   <preference name="hostname" value="mydomain.com" />
   ```
   
   
   ### Environment, Platform, Device
   cordova-android 10.x
   
   
   
   ### Version information
   <!--
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to 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

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 commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
erisu commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-888466938


   This issues was already fixed in the PR that @breautek mentioned.


-- 
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] trinitiwowka commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
trinitiwowka commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-906257748


   решение уже в мастере?


-- 
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] AdriVanHoudt commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
AdriVanHoudt commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-893279526


   Thanks @erisu for merging the fix 🙏 
   Do you have an ETA on a release that will contain this fix?


-- 
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] AdriVanHoudt commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
AdriVanHoudt commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-893279526


   Thanks @erisu for merging the fix 🙏 
   Do you have an ETA on a release that will contain this fix?


-- 
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] erisu closed issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
erisu closed issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299


   


-- 
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] AdriVanHoudt commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
AdriVanHoudt commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-906343101


   @trinitiwowka not sure what wizard you mean (could also be Google translate 😅 ) but a fix for this is in `10.1.0`.


-- 
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] AdriVanHoudt commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
AdriVanHoudt commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-889148100


   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 :/
   Do you have an ETA on 10.0.2 with the referenced patch in it?


-- 
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 #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-888457571


   We have an open PR that is making changes to this stuff and I think will probably resolve this issue as well: https://github.com/apache/cordova-android/pull/1298
   
   Can you give that a PR a test to see if it does address your issue?


-- 
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] AdriVanHoudt commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
AdriVanHoudt commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-888932736


   Jup that seems like it would fix this issue, thanks! 🎉 


-- 
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] erisu edited a comment on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
erisu edited a comment on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-888466938


   This issues was already fixed in the PR that @breautek linked.


-- 
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] trinitiwowka commented on issue #1299: Order of hostname preference and content in config.xml matters and breaks things

Posted by GitBox <gi...@apache.org>.
trinitiwowka commented on issue #1299:
URL: https://github.com/apache/cordova-android/issues/1299#issuecomment-906359918


   I upgraded from android 8 to 10.1 and for the third day I can't get the app to work.
   I get an error: "System UI isn't responding"
   
   Google chrome remote debugger :
   "deviceready has not fired after 5 seconds.
   Channel not fired: onPluginsReady
   Channel not fired: onCordovaReady"
   
   Added a delay. the error does not appear immediately, but appears after 60 seconds.
   <img width="791" alt="Снимок экрана 2021-08-26 в 15 19 24" src="https://user-images.githubusercontent.com/8225740/130961820-93ab7e17-3e88-43f5-aad0-b965da74bd44.png">
   
   What are the options for solving the problem? Thanks.


-- 
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