00:00
00:00
Newgrounds Background Image Theme

Etwig just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Unity3d WebGL Support

60,538 Views | 123 Replies
New Topic Respond to this Topic

Response to Unity3d WebGL Support 2018-11-16 04:48:24 (edited 2018-11-16 05:01:46)


I've been trying for days to get a build working on newgrounds, my builds work perfectly fine when run locally but don't work at all when uploaded to newgrounds...

https://image.ibb.co/i69y0L/image.png

https://image.ibb.co/iT63H0/image.png

https://image.ibb.co/b1Y320/image.png

i've gotten just all manner of console errors I have no idea what to do anymore, just feels like i've tried everything and i've never had this issue before.

Is this some issue with newer version of unity? Does newgrounds server need some manner of configuration?

At 11/14/18 11:24 PM, darkrchaos wrote: When I build my unity game for WebGL I get files that are different then the instructions. I get:

- ShooterGame.asm.code.unityweb
- ShooterGame.asm.framework.unityweb
- ShooterGame.asm.memory.unityweb
- ShooterGame.data.unityweb
- ShooterGame.json
- UnityLoader

When I try to run it on newgrounds I get this error.
"An error occured running the Unity content on this page. See your browser JavaScript console for more info. The error was: SyntaxError: missing ) in parenthetical"
SyntaxError: missing ) in parenthetical

What am I suppose to do?

I think my error is the same as yours...

My build deffinitely works on other platforms like itch.io so this must be some issue with newgrounds?

Response to Unity3d WebGL Support 2018-11-16 15:28:22 (edited 2018-11-16 15:28:37)


Based off the little I actually know, I think this has to do with newgrounds. Unity is compressing everything and newgrounds wants the uncompressed version. But I have no idea how to turn these files into the compressed versions that it wants.

Response to Unity3d WebGL Support 2018-11-16 16:36:05 (edited 2018-11-16 16:36:32)


At 11/16/18 03:28 PM, darkrchaos wrote: Based off the little I actually know, I think this has to do with newgrounds. Unity is compressing everything and newgrounds wants the uncompressed version. But I have no idea how to turn these files into the compressed versions that it wants.

Disabling compression didn't work for me at all, I tried literally every setting I can think of and different builds broke in different ways. I've been through like 20 builds so far.

I think there's a fundamental issue with how the site handles these builds thats probably incompatible with newer versions of unity specifically 2018.2 I think.

Response to Unity3d WebGL Support 2018-11-16 16:53:01


Yea that didn't work for me either. I feel like there has to be some way to do this though. I mean I still see people uploading unity games on newgrounds, and I doubt there all just using an old version.

Response to Unity3d WebGL Support 2018-11-16 17:17:22 (edited 2018-11-16 17:18:10)


At 11/16/18 04:53 PM, darkrchaos wrote: Yea that didn't work for me either. I feel like there has to be some way to do this though. I mean I still see people uploading unity games on newgrounds, and I doubt there all just using an old version.

Nah I'm sure a lot of people use older versions I know many still on 5.6

I at least don't expect most people to be on the latest. Not for a full project.

Regardless I've messaged the op and I hope they can do something about it.

Response to Unity3d WebGL Support 2018-11-16 17:45:01


Post when you find out how to do it.

Response to Unity3d WebGL Support 2018-11-24 06:41:39


Hi,
I'm getting a following error when I try to preview my game:

An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
RuntimeError: index out of bounds

Game link: https://www.newgrounds.com/projects/games/1274823/preview

For some reason sometimes it throws error and sometimes not

Response to Unity3d WebGL Support 2018-11-24 10:36:39


At 11/24/18 06:41 AM, darkwoodtales wrote: Hi,
I'm getting a following error when I try to preview my game:

An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
RuntimeError: index out of bounds

Game link: https://www.newgrounds.com/projects/games/1274823/preview

For some reason sometimes it throws error and sometimes not

I messaged them on twitter and it seems they're aware of the issue, i need to check in soon...

Response to Unity3d WebGL Support 2018-11-24 19:43:54 (edited 2018-11-24 19:45:05)


hey peeps do me a favor and tell me if you're getting "shaderassets0.assets is corrupted" kind of errors in the console (ctrl+shift+i usually).

And also "failed to load level0" errors too.

Response to Unity3d WebGL Support 2018-11-27 22:00:52


At 11/24/18 07:43 PM, momoirosoft wrote: hey peeps do me a favor and tell me if you're getting "shaderassets0.assets is corrupted" kind of errors in the console (ctrl+shift+i usually).

And also "failed to load level0" errors too.

Hmm... No I don't see any of that. But at the same time I don't know what build I have running. Since I tried a few things before giving up.

Response to Unity3d WebGL Support 2018-12-08 03:17:17 (edited 2018-12-08 03:18:41)


Hello everyone.
I'm using unity version 5.6.6f2 WebGL build.
I can't load my game with following error "Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH".
I loaded 3 games in the past and everything was ok.
But right now I keep getting the error with new and old builds.
I'm pretty sure, that the problem not from my side.
Because old games, which I loaded earlier with no errors, now keep getting me the error, when I try to preview my games.
Any help with it?
Thanks!

Response to Unity3d WebGL Support 2018-12-08 18:24:30


At 12/8/18 03:17 AM, Uber-Pie wrote: Hello everyone.
I'm using unity version 5.6.6f2 WebGL build.
I can't load my game with following error "Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH".
I loaded 3 games in the past and everything was ok.
But right now I keep getting the error with new and old builds.
I'm pretty sure, that the problem not from my side.
Because old games, which I loaded earlier with no errors, now keep getting me the error, when I try to preview my games.
Any help with it?
Thanks!

I was having similar issues... I think something is happening where NG is keeping old versions of your files even when you upload new ones and thus causing the mismatch. One thing to try that I've had some success with is to delete the .zip from the project's publication details page before uploading a new one. Another thing worth trying is clearing your cache or using incognito/private mode.

Response to Unity3d WebGL Support 2018-12-09 03:57:34


Thank you for the tips, BryceSummer. But it doesn't help. :(

Response to Unity3d WebGL Support 2018-12-09 09:31:36


At 12/9/18 03:57 AM, Uber-Pie wrote: Thank you for the tips, BryceSummer. But it doesn't help. :(

It is my personal opinion the issue is file size related. How large is your unity game? Whats the largest singular file?

Response to Unity3d WebGL Support 2018-12-09 13:51:31


Hello everyone, this is Skauron from Witch Nighto Studio, Oppaimon developer! Since we started to develop the game we have been thinking about it for as many platforms as we can, and one of those is WebGL, we had some problems with the versions we have published here in NG but with the new update we have had more problems, we are a bit lost because we do not know how to fix it and we want to know if any other developer has had the same problem and could solve it, the strangest thing is that if it works on platforms other than NG but we love this community so we support it, please any help would be grateful, I leave link of the trial version the password is "prueba" and Itch link.io where we also publish Oppaimon and it works perfectly

https://witch-nighto-studio.itch.io/oppaimonv020

Unity3d WebGL Support

Response to Unity3d WebGL Support 2018-12-09 13:53:29


This is very much the same kind of errors i'm getting. What is the download size of your game?

Response to Unity3d WebGL Support 2018-12-09 18:10:58


At 12/9/18 09:31 AM, momoirosoft wrote:
At 12/9/18 03:57 AM, Uber-Pie wrote: Thank you for the tips, BryceSummer. But it doesn't help. :(
It is my personal opinion the issue is file size related. How large is your unity game? Whats the largest singular file?

It doesn't matter. I tried to remove all images from my game and I got the same error.
It's pretty weird, because in the last month everything was ok.

Response to Unity3d WebGL Support 2018-12-19 06:58:36


Ok. Im done.

I'm trying several unity versions, old builds(which somehow worked earlier), clean build only with images and music and etc.

I keep getting the error on the screen. I don't know, what to do, but loading webgl builds from unity is totally broken on the newgrounds.

Same build is working on itch.io and other same sites.

Now I am absolutely sure, that the problem not from my side.

Newgrounds are one of the most amazing sites for sharing web games, but right now it is totally unavailable for me and my new projects.

iu_85_6784428.png

Response to Unity3d WebGL Support 2018-12-24 18:52:42


Hey guys,


A lot of these errors you can ignore. The most important ones are the memory leak and the index out of bounds. Or any which sends out an alert.


The way to get rid of the majority of these issues are going to your publish settings - other settings - preload assets and adding all your sound, newgrounds api folders into here. Then under logging, check the box none for all of them apart from exceptions - leave that on Script Only. Finally, if you're happy with your build, go to the publish settings and chose Brotli under Compression format. This takes longer, but it compresses the package more.

Response to Unity3d WebGL Support 2018-12-25 01:02:02


At 12/19/18 06:58 AM, Uber-Pie wrote: Ok. Im done.
I'm trying several unity versions, old builds(which somehow worked earlier), clean build only with images and music and etc.
I keep getting the error on the screen. I don't know, what to do, but loading webgl builds from unity is totally broken on the newgrounds.
Same build is working on itch.io and other same sites.
Now I am absolutely sure, that the problem not from my side.
Newgrounds are one of the most amazing sites for sharing web games, but right now it is totally unavailable for me and my new projects.


I guess the real question is, "Is Newgrounds aware of this problem, and if so, are they planning on doing something about it?" Because otherwise I won't be posting games here either.

Response to Unity3d WebGL Support 2018-12-26 06:51:18


At 12/24/18 06:52 PM, Aprime wrote: Hey guys,

A lot of these errors you can ignore. The most important ones are the memory leak and the index out of bounds. Or any which sends out an alert.

The way to get rid of the majority of these issues are going to your publish settings - other settings - preload assets and adding all your sound, newgrounds api folders into here. Then under logging, check the box none for all of them apart from exceptions - leave that on Script Only. Finally, if you're happy with your build, go to the publish settings and chose Brotli under Compression format. This takes longer, but it compresses the package more.


I will try this and post if it worked for me.


At 12/25/18 01:02 AM, NewgDane wrote:
At 12/19/18 06:58 AM, Uber-Pie wrote: Ok. Im done.
I'm trying several unity versions, old builds(which somehow worked earlier), clean build only with images and music and etc.
I keep getting the error on the screen. I don't know, what to do, but loading webgl builds from unity is totally broken on the newgrounds.
Same build is working on itch.io and other same sites.
Now I am absolutely sure, that the problem not from my side.
Newgrounds are one of the most amazing sites for sharing web games, but right now it is totally unavailable for me and my new projects.
I guess the real question is, "Is Newgrounds aware of this problem, and if so, are they planning on doing something about it?" Because otherwise I won't be posting games here either.


I've emailed newgrounds many times about this problem, i'm not sure if they're aware it's a large scale problem but they are aware that this is happening to some people.

Response to Unity3d WebGL Support 2019-01-02 18:15:10


Hi everybody!

I've stumbled upon this thread while lurking the game dev forum, and I'm interested because I'm having some issues with Unity, too.

Every time I made a WebGL build, different errors would show up in the browser's console. I'm not an expert of Unity, so I had to lurk around for a bit in various forums. In my ignorance, I've discovered that Unity implemented the possibility to build in WebGL using WebAssembly since this summer. Before then, WebGL builds were made in "asm.js". So, the WebAssembly option in Unity is quite recent. Other users have said that they started to have these kind of issues only with the latest Unity versions. My best guess is that, as of now, WebAssembly might be a part of the problem. I've tried to set the Linker Target to "asm.js", and some errors disappeared. But there's more.

After a little brain-storming with @RainbowCemetery, he advised me to turn off the "Data caching" option in the Build Settings. I've tried to do it, and now my game seems to work fine. I need to make some more tests before declaring my issues "solved", but in the meantime I wanted to drop here the few things I've learned, in hope that they could help other users with similar issues.


I don't remember all the errors that popped up in the browser's console, but here are some of them:


1) Could not create PersistentEngine - make sure PersistentEngine, prefab is present in a Resources folder. (Note: PersistentEngine was already in a "Resources" folder).


2) CompileError: wasm validation error: at offset 4568687: function body length too big


After I did the aforementioned actions, these errors seems to have gone for good. I'll let you guys know if I discover something else.

Response to Unity3d WebGL Support 2019-01-07 08:22:05 (edited 2019-01-07 08:28:21)


At 12/26/18 06:51 AM, momoirosoft wrote:
At 12/24/18 06:52 PM, Aprime wrote: Hey guys,

A lot of these errors you can ignore. The most important ones are the memory leak and the index out of bounds. Or any which sends out an alert.

The way to get rid of the majority of these issues are going to your publish settings - other settings - preload assets and adding all your sound, newgrounds api folders into here. Then under logging, check the box none for all of them apart from exceptions - leave that on Script Only. Finally, if you're happy with your build, go to the publish settings and chose Brotli under Compression format. This takes longer, but it compresses the package more.
I will try this and post if it worked for me.

At 12/25/18 01:02 AM, NewgDane wrote:
At 12/19/18 06:58 AM, Uber-Pie wrote: Ok. Im done.
I'm trying several unity versions, old builds(which somehow worked earlier), clean build only with images and music and etc.
I keep getting the error on the screen. I don't know, what to do, but loading webgl builds from unity is totally broken on the newgrounds.
Same build is working on itch.io and other same sites.
Now I am absolutely sure, that the problem not from my side.
Newgrounds are one of the most amazing sites for sharing web games, but right now it is totally unavailable for me and my new projects.
I guess the real question is, "Is Newgrounds aware of this problem, and if so, are they planning on doing something about it?" Because otherwise I won't be posting games here either.
I've emailed newgrounds many times about this problem, i'm not sure if they're aware it's a large scale problem but they are aware that this is happening to some people.


Thank you for the report. I don't know what, but something happened with newgrounds and my game was loaded without any errors.


I published it and everything was fine. But today I have checked it again and my game don't work.

I don't know what devs did, but I didn't replace my game. It is a same build all time.

Now I pretty sure, that the problem in the newgrounds and not from my side.

Response to Unity3d WebGL Support 2019-01-07 17:59:06


At 1/7/19 08:22 AM, Uber-Pie wrote: I published it and everything was fine. But today I have checked it again and my game don't work.
I don't know what devs did, but I didn't replace my game. It is a same build all time.
Now I pretty sure, that the problem in the newgrounds and not from my side.


Go to your webgl settings and add the sounds and newgrounds api folders to the preload array

Response to Unity3d WebGL Support 2019-01-12 01:52:23 (edited 2019-01-12 01:57:26)


At 12/24/18 06:52 PM, Aprime wrote: Hey guys,

A lot of these errors you can ignore. The most important ones are the memory leak and the index out of bounds. Or any which sends out an alert.

The way to get rid of the majority of these issues are going to your publish settings - other settings - preload assets and adding all your sound, newgrounds api folders into here. Then under logging, check the box none for all of them apart from exceptions - leave that on Script Only. Finally, if you're happy with your build, go to the publish settings and chose Brotli under Compression format. This takes longer, but it compresses the package more.


i tried this, now it actually starts to download but i'm getting this error that i can't access the database?


it did load after a refresh, but this still worries me.


edit:it did not work after a refresh again


iu_1830_6436966.png

Response to Unity3d WebGL Support 2019-01-12 12:47:41


Upon further testing letting a bunch of people try the preview link, no one has told me it doesn't work, i assume the issues i have are just me somehow...

Response to Unity3d WebGL Support 2019-01-20 07:16:58


Hi. Why is our game not working ? https://www.newgrounds.com/portal/view/722207

Response to Unity3d WebGL Support 2019-01-20 15:43:03


At 1/20/19 07:16 AM, Laraxking wrote: Hi. Why is our game not working ? https://www.newgrounds.com/portal/view/722207


You game worked for me on chrome, but maybe try what Aprime suggested! His solution worked for me!

Response to Unity3d WebGL Support 2019-01-22 15:43:27


At 1/20/19 07:16 AM, Laraxking wrote: Hi. Why is our game not working ? https://www.newgrounds.com/portal/view/722207


Check the dev console. Right away I see that this file could not be loaded:

GET https://uploads.ungrounded.net/alternate/1282000/1282908_alternate_69326_r1.zip/Release/Dark%20Revenge%20WebGL_0.2.6.js 404

Response to Unity3d WebGL Support 2019-01-22 15:46:22


At 12/19/18 06:58 AM, Uber-Pie wrote: Same build is working on itch.io and other same sites.


Can you please post links to your game on Itch and the submission URL here on NG?