Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82388

Mobile app: message "Cannot initialize app" sometimes.. how to debug?

$
0
0

Sometimes endusers see a little white pop-up with this message. In the javascript of the mobile phonegap package it occures somewher in this try:


 

window.mxapp = {
	    initialize: function(url, enableOffline, requirePin) {

	        try {
	            enableOffline = !!enableOffline;

	            // Make sure the url always ends with a /
	            appUrl = url.replace(/\/?$/, "/");

	            replaceWindowOpenFn();

	            document.addEventListener("backbutton", handleBackButton);

	            setupDirectoryLocations();

	            var shouldDownloadFn = function(config) {
	                return config.downloadResources || enableOffline;
	            };

	            if (requirePin) {
	                pin.verify(syncAndStartup);
	            } else {
	                syncAndStartup();
	            }
	        } catch (e) {
	            handleError(e);
	            return;
	        }

	        function syncAndStartup() {
	            synchronizeResources(appUrl, shouldDownloadFn)
	                .spread(function(config, resourcesUrl) {
	                    return startup(config, resourcesUrl, appUrl, enableOffline, requirePin);
	                })
	                .catch(handleError);
	        }

	        function handleError(e) {
	            console.error(e);
	            showError(makeVisibleError(e));
	        }
	    }

 

How can we see the console message of the error? 

 


Viewing all articles
Browse latest Browse all 82388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>