[Resolved] c2runtime.js errors with minify script checked

Get help using Construct 3!

Post » Tue Aug 29, 2017 9:05 am

Dears,

I recently released my first game thanks to Construct 2 (and I'm very grateful to Scirra for that ;) ).

I now plan to release upcoming updates & features with Construct 3.
Yesterday I gave C3 a serious try, and imported my whole C2 project into C3.
Everything works fine in preview except some AJAX calls on local (which I understand because I'm currently not serving those files over https).

Anyway, when I export it to "Web (HTML5)" with "Minify script" checked, game is not starting.
I checked the browser console, and it mentions 2 following errors:
  • Uncaught SyntaxError: Illegal break statement at c2runtime.js:2
  • Uncaught TypeError: g_a.g_jx is not a function at g.g_iC (c2runtime.js:2) at XMLHttpRequest.g_gf.e.onload (c2runtime.js:2)

You can see/test it live here:

Do you have any ideas what is wrong?
Is this an issue due to some of my code? What should I do? Is it just a compilation issue?

Thanks for your answer, folks.
Last edited by antoineguedes on Wed Sep 27, 2017 9:45 pm, edited 1 time in total.
Image
Version 1.1.2 - Available for: Web - iOS - Android
B
16
S
3
Posts: 50
Reputation: 1,046

Post » Tue Aug 29, 2017 1:42 pm

If you use the Physics behavior, it's probably this bug. Otherwise please file a new bug following all the guidelines.
Scirra Founder
B
397
S
236
G
88
Posts: 24,420
Reputation: 194,549

Post » Wed Aug 30, 2017 6:02 pm

Thank you Ashley for your quick answer.

I don't use Physics behavior in my game, only the following:
  • Fade;
  • Flash;
  • Platform;
  • Timer;

Ok, I'll create the bug tomorrow.
I don't mind sharing my capx with Scirra, but not open to the public since I released the game few days ago.

Edit: I also use Timer behavior. I don't use Pin behavior anymore, so I removed it from the list.
Last edited by antoineguedes on Fri Sep 01, 2017 9:16 pm, edited 2 times in total.
Image
Version 1.1.2 - Available for: Web - iOS - Android
B
16
S
3
Posts: 50
Reputation: 1,046

Post » Wed Aug 30, 2017 6:14 pm

I have a similar issue as well. Game exports however it shows up as a blank page. I just minifiy the runtime with a 3rd party app.
B
14
S
2
Posts: 67
Reputation: 2,044

Post » Fri Sep 01, 2017 9:18 pm

DrathVader wrote:I have a similar issue as well. Game exports however it shows up as a blank page. I just minifiy the runtime with a 3rd party app.


If you open the browser console, what errors do you have?
This may also come from your 3rd party app. Which one do you use?
Image
Version 1.1.2 - Available for: Web - iOS - Android
B
16
S
3
Posts: 50
Reputation: 1,046

Post » Sat Sep 02, 2017 7:59 pm

Not using any 3rd party addon's/plugins/behaviors. Also don't have access to the minified version at the moment. As well, not using any physics...
B
14
S
2
Posts: 67
Reputation: 2,044

Post » Wed Sep 06, 2017 9:43 am

Ashley wrote:If you use the Physics behavior, it's probably this bug. Otherwise please file a new bug following all the guidelines.


Hey, Ashley!
S'ry for the delay. I really wanted to give you a proper answer before filing a new bug.

So, I started a new C3 project from scratch with following behaviors: Fade, Flash, Platform, Timer.
I put some simple events with a Hero and Boss to get a basic Bossfight, and I exported the project.
Game is running fine even with Minify script checked on export options.

Game example: c3-test-export
Capx: c3-test-export.c3p

I guess the issue is coming from the code of my game Bikosaur (initially made with C2).
Due to the amount of events (around 500 lines) and complexity, I don't think it has sense to find out what is exactly wrong since the game is already live.
I plan to use directly C3 for future updates and projects so that's fine to me.
Image
Version 1.1.2 - Available for: Web - iOS - Android
B
16
S
3
Posts: 50
Reputation: 1,046

Post » Wed Sep 06, 2017 9:48 am

DrathVader wrote:Not using any 3rd party addon's/plugins/behaviors. Also don't have access to the minified version at the moment. As well, not using any physics...


You said you minify the runtime.js file with a 3rd party app.
Which 3rd party app is it? This may be the issue. Btw, I don't think it has sense to manually minify it.
Image
Version 1.1.2 - Available for: Web - iOS - Android
B
16
S
3
Posts: 50
Reputation: 1,046

Post » Wed Sep 06, 2017 11:47 am

Please check you're using r54, we just fixed a minify bug. If you still have issues please post to the issue tracker following all the guidelines.
Scirra Founder
B
397
S
236
G
88
Posts: 24,420
Reputation: 194,549

Post » Sun Sep 24, 2017 8:54 pm

Well, it looks like r54 resolves the issue.
The game is now working well, even with minify script checked at export.

Good job, guys! 8-)
Image
Version 1.1.2 - Available for: Web - iOS - Android
B
16
S
3
Posts: 50
Reputation: 1,046


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 0 guests