-
1. Re: config.xml break my app
VectorP Dec 30, 2016 12:11 AM (in response to aloxord)I assume that you are testing on Android, only (given your config).
Here is some feedback on your config:
1. <icon src="res/android/icon.jpg" />
The default icon should be a .png file, be located in the root and be called 'icon.png'
See Icons and Splash | PhoneGap Docs
2. <plugin name="underscore" source="npm" />
I am not quite sure whether or not this is a plugin at all. AFAIK, it's a javascript library called 'underscore.js'
3. Whitelist rules
Your whitelist rules will not be obeyed, since the whitelist plugin is missing.
4. Splashes
You have no splashscreen images and no splashscreen plugin. I recommend adding them.
-
2. Re: config.xml break my app
aloxord Jan 6, 2017 10:16 AM (in response to VectorP)hi! thanks VectorP! i fix that you are pointing, but the problem is there yet, sorry for the english... my actual config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget xmlns ="http://www.w3.org/ns/widgets"
xmlns:gap ="http://phonegap.com/ns/1.0"
id ="com.XXX.XXX"
version ="0.0.1">
<name>XXX</name>
<description>App</description>
<author email="XXX" href="XXXhttp://phanta-soft.com/">
XXX
</author>
<content src="index.html" />
<preference name="orientation" value="portrait" />
<preference name="SplashScreen" value="screen" />
<preference name="cordova-plugin-splashscreen" source="npm"/>
<preference name="cordova-plugin-whitelist" source="npm"/>
<splash src="splash.png"/>
<icon src="icon.png" />
</widget>
Mod note: edited to remove identifying information
-
3. Re: config.xml break my app
kerrishottsDec 30, 2016 9:14 AM (in response to aloxord)
- That is not how you include the Whitelist or Splash Screen plugins. Use the <plugin> tag instead.
- You've not included any access, allow-navigation, or allow-intent tags. See the white listing documentation: Whitelist - Apache Cordova
- Be more specific about how your app "malfunctions" when config.xml is supplied.
- Your code might be breaking due to a newer PGB CLI release. See https://build.phonegap.com/current-support
- But without more information about how your app is broken, we're just guessing here, and will be of little help.
- See Asking Better Questions (PhoneGap Forum) for information that is useful to us in helping you (such as devices you're testing on, platforms you're using [and versions], etc.)
-
4. Re: config.xml break my app
aloxord Jan 6, 2017 10:17 AM (in response to kerrishotts)sorry! the error happens when i start the app, in the hydration screen says: "Whoops, looks like an error occured", this had happened to me before with javascript errors, but this time works great if i delete the config.xml, nothing works with my config.xml, new version and still not working:
<?xml version='1.0' encoding='utf-8'?>
<widget xmlns ="http://www.w3.org/ns/widgets"
xmlns:gap ="http://phonegap.com/ns/1.0"
id ="com.XXX.XXX"
version ="0.0.1">
<name>XXX</name>
<description>XXX</description>
<author email="XXX" href="XXX">
XXX
</author>
<content src="index.html" />
<preference name="orientation" value="portrait" />
<preference name="SplashScreen" value="screen" />
<plugin name="cordova-plugin-splashscreen" source="npm"/>
<plugin name="cordova-plugin-whitelist" source="npm"/>
<splash src="splash.png"/>
<icon src="icon.png" />
</widget>
Mod note: edited to remove identifying information
-
5. Re: config.xml break my app
aloxord Dec 30, 2016 9:52 AM (in response to aloxord)oh! i remove the plugin "whitelist"
-
6. Re: config.xml break my app
kerrishottsDec 30, 2016 1:11 PM (in response to aloxord)
1 person found this helpfulIf you make changes in your config.xml file for a hydrated app, you need to uninstall the app from your device and reinstall it. Hydration applies only to web content (JS, HTML, CSS), not to plugins, config.xml configuration settings, etc.
-
7. Re: config.xml break my app
aloxord Jan 2, 2017 9:13 AM (in response to kerrishotts)And that I always do, until the cache is clean ...
-
8. Re: config.xml break my app
kerrishottsJan 2, 2017 9:26 AM (in response to aloxord)
1 person found this helpfulTry disabling hydration (rebuild, uninstall and reinstall) and see if your app works. If it does, then try reenabling hydration and see if the problem persists.
-
9. Re: config.xml break my app
aloxord Jan 2, 2017 10:03 AM (in response to kerrishotts)its ok without the hydration... but i need that! omg...
-
10. Re: config.xml break my app
aloxord Jan 6, 2017 10:19 AM (in response to kerrishotts)"whoops, looks like an error occured",
logs:
12-28 16:21:01.725 11481 11481 I chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token L", source: file:///data/user/0/XXX/files/downloads/app_dir/index.html (1)
[15:21:34] gnualmafuerte: 12-28 16:21:01.439 11481 11518 D AppLoader: Loading /data/user/0/XXX/files/downloads/app_dir/index.html
12-28 16:21:01.455 11481 11481 D JsMessageQueue: Set native->JS mode to null
12-28 16:21:01.491 11481 11481 W BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 11481
12-28 16:21:01.535 11481 11481 D JsMessageQueue: Set native->JS mode to OnlineEventsBridgeMode
12-28 16:21:01.560 11481 11481 I chromium: [INFO:CONSOLE(1)] "loading require.js", source: file:///data/user/0/XXX/files/downloads/app_dir/require-1.0.8.js (1)
12-28 16:21:01.565 11481 11481 I chromium: [INFO:CONSOLE(1960)] "load = main", source: file:///data/user/0/XXX/files/downloads/app_dir/require-1.0.8.js (1960)
12-28 16:21:01.641 11481 11518 D CordovaNetworkManager: Connection Type: wifi
12-28 16:21:01.641 11481 11481 D CordovaNetworkManager: Connection Type: wifi
12-28 16:21:01.641 11481 11481 D CordovaNetworkManager: Connection Extra Info: "DiosNoExiste"
12-28 16:21:01.641 11481 11518 D CordovaNetworkManager: Connection Extra Info: "DiosNoExiste"
12-28 16:21:01.661 11481 11481 I chromium: [INFO:CONSOLE(1)] "loading zepto.js", source: file:///data/user/0/XXX/files/downloads/app_dir/zepto.js (1)
12-28 16:21:01.670 11481 11481 I chromium: [INFO:CONSOLE(1)] "loading lawnchair.js", source: file:///data/user/0/XXXX/files/downloads/app_dir/lawnchair.js (1)
12-28 16:21:01.719 11481 11481 I chromium: [INFO:CONSOLE(1634)] "Uncaught Error: Module name 'underscore' has not been loaded yet for context: _
12-28 16:21:01.719 11481 11481 I chromium: http://requirejs.org/docs/errors.html#notloaded", source: file:///data/user/0/XXX/files/downloads/app_dir/require-1.0.8.js (1634)
12-28 16:21:01.721 11481 11481 I chromium: [INFO:CONSOLE(4)] "Uncaught ReferenceError: _ is not defined", source: file:///data/user/0/XXX/files/downloads/app_dir/backbone.js (4)
12-28 16:21:01.723 11599 11691 I GlobalDismissManager: no sender configured
12-28 16:21:01.724 11599 11691 D AlertService: Beginning updateAlertNotification
12-28 16:21:01.725 11481 11481 I chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token L", source: file:///data/user/0/XXX/files/downloads/app_dir/index.html (1)
12-28 16:21:01.737 11599 11691 D AlertService: No fired or scheduled alerts
12-28 16:21:01.747 11599 11691 D AlertService: Scheduling next alarm with AlarmScheduler. sEventReminderReceived: null
12-28 16:21:01.772 11599 11691 D AlarmScheduler: No events found starting within 1 week.
12-28 16:21:01.781 11481 11481 I chromium: [INFO:CONSOLE(1)] "adding homepage.js", source: (1)
Mod note: edited to remove identifying information
-
11. Re: config.xml break my app
aloxord Jan 2, 2017 10:18 AM (in response to aloxord)logs are courtesy of logcat
-
12. Re: config.xml break my app
VectorP Jan 2, 2017 10:43 AM (in response to aloxord)its ok without the hydration... but i need that! omg...
You need Hydration, even when changing your config?
Can't you ask your testers to install the latest test version of the app manually, only for those few times you change your config.xml?
-
13. Re: config.xml break my app
aloxord Jan 2, 2017 12:56 PM (in response to VectorP)the app needs to change the information when it have some new... that i do with the hydration, to reload the html with the new things
-
14. Re: config.xml break my app
kerrishottsJan 2, 2017 1:02 PM (in response to aloxord)
OK -- let me get this straight -- the app works without hydration now. If you re-enable hydration, it breaks with the error log you posted?
-
-
16. Re: config.xml break my app
kerrishottsJan 3, 2017 1:18 PM (in response to aloxord)
1 person found this helpfulIt's possible there's an issue with hydration in this case. BUT, double check all your files and make sure they are in the expected encoding and that there aren't any spurious BOMs around. I don't know why I'm thinking about encodings here, but who knows.
Also, hydration isn't the only option here. There are lots of similar utilities out there. I've heard lots of good things about Microsoft Code Push: https://microsoft.github.io/code-push/
-
17. Re: config.xml break my app
aloxord Jan 4, 2017 5:42 AM (in response to aloxord)yeah... i think that the hydration is the problem! Oh! thats that i need! alternatives to this service
-
18. Re: config.xml break my app
aloxord Jan 5, 2017 8:29 AM (in response to aloxord)i need to delete this post! please help.
-
19. Re: config.xml break my app
kerrishottsJan 5, 2017 2:23 PM (in response to aloxord)
What, specifically, do you need to delete? why?
-
20. Re: config.xml break my app
aloxord Jan 6, 2017 10:20 AM (in response to kerrishotts)The best would be to edit the original question and remove the clients' names, which is where it says "XXX ..." and "XXX ...", but I think I can not do it, so I'd like to delete the whole post, Before I happen to be a problem in my work, by the way, the error of hydration is by a require 1.xy bug and replace it
Mod note: edited to remove identifying information
-
21. Re: config.xml break my app
kerrishottsJan 6, 2017 10:20 AM (in response to aloxord)
I've removed the identifying information. Let me know if I missed anything.