Community
cancel
Showing results for 
Search instead for 
Did you mean: 
One__EternaL
New Contributor I
94 Views

Why is my app now failing to start up on mobile?

Jump to solution

*UPDATE: After days of work and probably around 20hrs of total work, I finally figured out it was Spriter's fault the entire time. It took me so long because I didn't suspect it as the cause. When I delete all SCML objects, it works, both in simulate and build. No runtime error, no black screen. Spriter just recently released version 10, an update I accepted, after which I also immediately looked for and installed the latest Spriter plugin for C2 as well, something I always do after every Spriter update, since it doesn't appear to be done automatically. So there's needless to say a high chance that there's a major bug either in Spriter version 10 or its C2 plugin. I'll look into it further tomorrow and then alert Spriter to it. ...Finally!

Thank you Paul and others for your efforts. I appreciate it.

 

-----Original post:-----

Every build of my Construct 2 app thru XDK was doing fine on mobile, both with APK tests as well as when downloaded from the Play store, until, for some unknown reason, with no special change or edit to the project that I know of that would have any effect on the app's ability to simply start up in the first place, it never starts up anymore on mobile, simply showing the splashscreen set up in XDK, then a quick white flash and just black from then on. I don't know what to do or try anymore to be able to run the app on mobile. I get the same results on 2 different Android devices. The good news should be that there's probably one simple setting that I can toggle someplace in the process, either when exporting in Construct 2, or in the XDK settings, to get it past startup. What is a likely culprit in this sort of situation? https://play.google.com/store/apps/details?id=eternal.psychomachia

Tags (2)
0 Kudos
1 Solution
One__EternaL
New Contributor I
94 Views

UPDATE: After days of work and probably around 20hrs of total work, I finally figured out it was Spriter's fault the entire time. It took me so long because I didn't suspect it as the cause. When I delete all SCML objects, it works, both in simulate and build. No runtime error, no black screen. Spriter just recently released version 10, an update I accepted, after which I also immediately looked for and installed the latest Spriter plugin for C2 as well, something I always do after every Spriter update, since it doesn't appear to be done automatically. So there's needless to say a high chance that there's a major bug either in Spriter version 10 or its C2 plugin. I'll look into it further tomorrow and then alert Spriter to it. ...Finally!

Thank you Paul and others for your efforts. I appreciate it.

View solution in original post

10 Replies
Giselle_G_Intel
Employee
94 Views

Check out this link > https://software.intel.com/en-us/forums/intel-xdk/topic/676044 < it seems that you are having a very similar problem and may have added a plugin that is not being read correctly. Make sure you've imported it in the correct way. If you've imported as an html5 project, this may be your problem. The forum thread walks through the problem this person had and this link was the solution that was found follow the process in this link >  https://software.intel.com/en-us/forums/intel-xdk/topic/607195 < Let me know if you continue to have problems.

PaulF_IntelCorp
Employee
94 Views

Do you see any error messages in the Simulate tab when you try to run your app there? What do you see in the console if you build for debug and run it directly on device. See > https://software.intel.com/en-us/xdk/docs/using-remote-chrome-devtools-to-debug-android-cordova-apps < for help debugging directly on-device.

One__EternaL
New Contributor I
94 Views

Paul F. (Intel) wrote:

Do you see any error messages in the Simulate tab when you try to run your app there? What do you see in the console if you build for debug and run it directly on device. See > https://software.intel.com/en-us/xdk/docs/using-remote-chrome-devtools-t... < for help debugging directly on-device.

Yes, I see 166 errors from the Simulate tab! :) > https://www.dropbox.com/s/fynzlqvzbfj8e4t/errors0.jpg <> https://www.dropbox.com/s/danrlqdydoxz3he/errors.jpg < Does that show what the solution might be?

By the way, this was from a fresh clean new Construct 2 export/project file directory with a new name, so there are no problems with incorrect project updates/re-exports.

Edit: These screenshots may not help, but just in case: These are 2 errors I get when I first open the project after a C2 export: > https://www.dropbox.com/s/t25jahen3lp5kxw/error1.jpg <> https://www.dropbox.com/s/z80bqkwvx1oq7sh/error2.jpg < The build will fail with this error: > https://www.dropbox.com/s/7c7sz6sckl4fmtr/error3.jpg < Until I manually add XDK's 'Media' plugin. (Maybe C2 needs to fix its 'File' plugin?) And these are all the plugins I use: > https://www.dropbox.com/s/gc4920ni7bqgvlq/plugins.jpg < Including this one for IAPs: > https://github.com/maxmoore14/AndroidInAppBilling.git <

Also, I just built it using the "old method" of C2 export and XDK import, to see if it helps, but still the black screen. I deleted 3 plugins from the additions file (cc.fovea.cordova.purchase, https://github.com/maxmoore14/AndroidInAppBilling.git, and cordova-plugin-inappbrowser) and added them thru the plugin manager, but the build failed because cc.fovea.cordova.purchase failed to install. Unsure if it's because of the Billing Key I pasted (I used the 'License Key' from Play Store), but so I removed that plugin, which passed the Build, but still resulted in the black screen.

One__EternaL
New Contributor I
94 Views

Giselle G. (Intel) wrote:

Check out this link > https://software.intel.com/en-us/forums/intel-xdk/topic/676044 < it seems that you are having a very similar problem and may have added a plugin that is not being read correctly. Make sure you've imported it in the correct way. If you've imported as an html5 project, this may be your problem. The forum thread walks through the problem this person had and this link was the solution that was found follow the process in this link >  https://software.intel.com/en-us/forums/intel-xdk/topic/607195 < Let me know if you continue to have problems.

Yes I'm still having problems. I'd appreciate it if you could look at the console errors I got from yesterday's Simulate test or the other errors and let me know what you think?

Any help would be appreciated, as I'm stuck and desperate, since my work has been stalled for a few days now and I was hoping to be done by New Years. Even older backup versions of the project, that ran successfully on device before, don't anymore, which seems especially strange.

P.S. I always found it strange that XDK seems to find that my C2 project uses "https://github.com/maxmoore14/AndroidInAppBilling.git" right from the moment I open the project for the first time in XDK after a fresh export from C2, as that doesn't look to me like something that would be an officially-supported C2 plugin, and I can't/don't know how to add custom plugins into C2 myself, to have added it myself.

One__EternaL
New Contributor I
94 Views

Is this a useful shortcut to finding out what's wrong?: The Simulate tab gives me this as the last error:
Uncaught ReferenceError: cr_createRuntime is not defined      index.html:86
And line 86 in index.html is "cr_createRuntime("c2canvas");" seen below:
 

    <script>
        document.addEventListener("deviceready", function ()
        {
            window["c2iscordova"] = true;
            
            // Create new runtime using the c2canvas
            cr_createRuntime("c2canvas");
            
            document.addEventListener("pause", function() {
                cr_setSuspended(true);
            }, false);

 

PaulF_IntelCorp
Employee
94 Views

You can safely ignore the "uncaught module cordova-plugin-*" error messages, those are a known issue in the Simulate tab (documented in the readme file).

There are several errors generated by the c2runtime.js file, which is the Construct2 runtime. We do not have any control over what that file does, it is created by Scirra.

This error > https://www.dropbox.com/s/7c7sz6sckl4fmtr/error3.jpg < is an indication that you are using the "old" method for exporting your Construct2 app. You need to use the "new" method for your project to be properly imported by the XDK. There are several posts on the Scirra site and this post on our forum regarding this "new" import method > https://software.intel.com/en-us/forums/intel-xdk/topic/607195 < please try that method for exporting from C2 and importing into the XDK to see if that helps.

You have other images that indicate you did not provide variables needed by some third-party plugins. You'll have to supply those, you may have to remove and then re-add those plugins after importing from the C2 export, sometimes plugins that need variables get "goofed up" during an import like that, thus the reason you may have to remove them and re-add them, manually, using the plugin manager.

One__EternaL
New Contributor I
94 Views

Paul F. (Intel) wrote:

Thank you for your response. Unfortunately there's still nothing new for me to do or try yet, as I already use the 'new' method all the time, which still gives the black screen, and I also just now I removed all 10 plugins in XDK and re-added them in the plugin manager, but still got the same "Uncaught ReferenceError: cr_createRuntime is not defined  index.html:##  cr_createRuntime("c2canvas");" error in Simulator, as well as the black screen on device after building it for the sake of a thorough test. So that's: the 'new' method, followed by a manual removal and re-adding of all 10 plugins used.

It looks like the cr_createRuntime/c2canvas error is the real issue? Please let me know if any information I provided can help me describe the issue in more technical terms to Scirra.

One__EternaL
New Contributor I
94 Views

I'm unsure if or when Scirra will reply to my e-mails or forum posts on the cr_createRuntime/c2canvas error. Is there anything more I can do in the meantime to find out more about the issue myself? I probably shouldn't, I just feel so antsy. There's also the chance I need to somehow delve into it more myself. What can I do to explore this error further?

Would setting up that complicated-looking test directly on device scenario help me to give you more information that uncovers the cause of the runtime error/black screen?

One__EternaL
New Contributor I
95 Views

UPDATE: After days of work and probably around 20hrs of total work, I finally figured out it was Spriter's fault the entire time. It took me so long because I didn't suspect it as the cause. When I delete all SCML objects, it works, both in simulate and build. No runtime error, no black screen. Spriter just recently released version 10, an update I accepted, after which I also immediately looked for and installed the latest Spriter plugin for C2 as well, something I always do after every Spriter update, since it doesn't appear to be done automatically. So there's needless to say a high chance that there's a major bug either in Spriter version 10 or its C2 plugin. I'll look into it further tomorrow and then alert Spriter to it. ...Finally!

Thank you Paul and others for your efforts. I appreciate it.

View solution in original post

Giselle_G_Intel
Employee
94 Views

Thank you for posting the solution that worked best for you, as it will help us better address issues like yours in the future.

Reply