Unity-WebGL showing grey window instead of interactive website - unity3d

I have a Unity project, where you can navigate around in a 3D space environment. I'm using Unity version 2020.3.4f1 Personal. I went to 'Build settings', chose WebGL, and then clicked 'Build And Run.
The project seems to launch on a Chrome browser in localhost, without any issues:
However, when I zip the build files & folders (index.html file along with the 'Build' and 'StreamingAssets'), then host as a website, all I get is a grey screen, instead of an interactive website!
As mentioned the build created is - index.html file, 'Build' folder, and 'StreamingAssets' folder:
Clearly, there's something wrong with the build as the project seems to run fine directly in localhost.
Any help would be really appreciated.
Many thanks
Edit
Looking at the logs in the Chrome browser console (running on localhost), these are the logs:
For the 404 error, I found some Unity forum thread: https://forum.unity.com/threads/webgl-builds-only-partially-working.357591/ , where I then thought the solution was to enable Data Caching & Decompression Fallback, and set Compression Format Gzip.
But this didn't solve the issue, as I still get the 404 in the console log, running on localhost (although as mentioned before, in localhost it runs). Also, when hosting it on a server using Netlify it still shows just a Grey window.
Note: strangely when I refresh the browser running localhost, the 404 disappears, but still the main thing is that when hosted on a remote server (Netlify), I just get a Grey window.

Localhost will be case-insensitive on Windows, while Linux is usually case sensitive on the Host. Check URLs and file names, and try looking at the Web server logs for 404 errors.

Related

getting error message "Failed to load resource: the server responded with a status of 404 (Not Found)"

I have a simple MVC web application, which was running locally without problems 3 weeks ago.
When I now open the application in Netbeans and run it, everything seems to work fine as well. However, when I go to the browser (in my case google chrome) to look at the app's frontend (at http://localhost:8080/optimizer), I get the following error message:
HTTP Status 404 - Not Found
In Chrome's javascript console the following error message is given:
optimizer:1 Failed to load resource: the server responded with a status of 404 (Not Found)
"optimizer" is the name of the app. (What's the point of the "1" in "optimizer:1"? ... I don't get this either.)
The server (payara) is running:
I can also reach the server's admin page:
However, somehow the server cannot seem to find the application, although 3 weeks ago everything worked fine ... I just don't get it.
What's wrong? How can I fix this?
UPDATE:
Clicking on "List Deployed Applications" in Payara's Admin Console reveals that my app is not(!) deployed.
I tried to deploy it by clicking on "Deploy an Application" -> "Choose file".
I selected the jar-file "optimizer-1.0-SNAPSHOT.jar", selected Type "EJB Jar", then clicked on OK.
I got this error message:
Archive type of /private/var/folders/hh/hgq7wrjn5d51gy2tkbxkkbwh0000gn/T/optimizer-15075570634779987058.0-SNAPSHOT.jar was not recognized
How can I deploy my app? And why did it work automatically before and now it doesn't work any more?
UPDATE 2:
A difference I realise compared to before (3 weeks ago) is that the browser doesn't open automatically any more when I run the app.
Furthermore, Google Chrome used to be the IDE'S default browser ... now there is just a grey globe and I can no longer choose Chrome as my browser:
UPDATE 3:
I just noticed there is an error message that appears when the server is started (it's in the middle of hundred of rows of log output so I didn't notice it at first):
UPDATE 4:
-> NetBeans IDE 11.2
-> Payara Server 5.193
Error clearly shows, server is not able to recognize archive type of jar,
Archive type of
/private/var/folders/hh/hgq7wrjn5d51gy2tkbxkkbwh0000gn/T/optimizer-15075570634779987058.0-SNAPSHOT.jar
was not recognized
From payara blog,
If you set “Location” by “Packaged File to Be Uploaded to the Server”,
the suitable type would be selected.
So, the suitable type would be selected automatically.
Also, optimizer-15075570634779987058.0-SNAPSHOT.jar is not an original jar optimizer-1.0-SNAPSHOT.jar
It seems that issue is with the path of an archive, from thread
Code in uploadFrame.jsf:
<sun:form id="form">
I probe to change it to:
<sun:form id="form" enctype="multipart/form-data">
in uploadFrame.jsf into console-common.jar file. And it works.
You can try with changing uploadFrame.jsf into console-common.jar file.
(Not sure if chrome takes care of this, as it was working for you with chrome).
You may also want to try manual deployment,
install-directory/bin/asadmin deploy PATH_TO_ARCHIEVE/optimizer-1.0-SNAPSHOT.jar
Ok, I now found out how to run the app locally without problems: by creating a .war file instead of a .jar file - now I can run the app again without problems.

What can cause a display bug on different devices in a meteor web app and only once bundled

My problem is that my content does not show at all on particular device/browser and only once bundled. The wep app display correctly in debug (running it from meteor) whatever the device or browser are.
EDIT : I can see the navbar and the footer but not the yield on affected devices/browsers
Affected devices/browser known to date are Chrome on Nexus 4 (not on Note3) and Dolphin on Note 3.
Dev environment is Windows and prod is Linux.
I've also tried to run the app through meteor directly on server and the problem is not here but is back even when I bundle the app from the server.
Any idea about what can cause that and/or how to troubleshoot that?
EDIT 2
I can finally confirm that it's a client side bug.
Here is the error from chrome console on the device
Exception from Deps recompute function: ReferenceError: Lists is not defined
at Object.Template.layout.helpers.lists (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:31:25567)
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:10:5624
at Object.e.call (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:27:20793)
at HTML.DIV.HTML.UL.UI.Each.UI.block.e [as __sequence] (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:27:28178)
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:10:4102
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:9:3419
at a (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:4791)
at n.extend._compute (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:5846)
at new e.Computation (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:5183)
at Object.n.extend.autorun (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:7042)
But the Lists collection is defined, published and subscribed. And the weirdest part is that everything works well when debugging through Meteor
In my specific case, Collections definitions were located in a /collections folder at the root of the app. That caused the app to load them after the /client folder but only once deployed and on some devices/browsers only!
To fix that, I've just move the /collections folder into /lib, bundled it again, push it to the server and everything now works flawlessly whatever the device/browser is.

Cannot load anything on Tomcat 7 : configuration issue

I'm currently developing a web project running on Tomcat 7 and I cannot see anything who's suppose to be on Tomcat (blank page when I do a HTTP request in my browser).
My Modus Operandi:
I launch a new instance of server in locahost (apache-tomcat-7.0.34) within Eclipse (I work with Indigo and tried with Juno as well)
Tomcat's ROOT folder has been pasted in the 'wtpwebapps' folder of all my servers in my Workspace
I add a simple web project on this server instance and try to access it from a HTTP request and I get a blank page. If I try to run a .html file of this web project on this server, I get a 'HTTP 404 Not Found' Error.
What I tried:
I tried to build the whole configuration from scratch (new Eclipse, new Apache-Tomcat) and I still get the same result. But when I do that from my personal computer at home, everything's working fine!!
I tried to put an old version of my code or a tutorial project, but nothing can be launched (therefore, it must be a configuration issue).
I checked the server.xml and web.xml files and nothing looks suspicious (I can paste them if you want but those are the same than those who worked at home)
The only thing I can think of is that I changed the internet connection (and the IP address) of the computer I'm working on, but I don't think it could make any difference when trying to reach localhost, right?
When I follow the steps of the very good tutorial, I do get a blank page on the 'Run Tomcat' topic, but I don't get the Tomcat welcome page once I copied the ROOT folder into "wtpwebapps".
Does someone have any idea where it could come from?
Ok guys, finally got the solution.
I was about to format my computer when i realize that the port 8009 was actually used by another process.
I thought that's the kind of things who are checked when you launch a Tomcat server within Eclipse but it didn't show any error.
The HTTP request went through the port 80, but as the default AJP port is already in use, Apache could not forward this request to Tomcat, therefore a blank page was returned.
At least that's my understanding of this situation...
Hopefully this may help someone who'd run into a similar situation.
Thanks for your help.

Need help setting up a (Tomcat) web app in Eclipse for debugging

I've been using both eclipse and tomcat for years but have always deployed my web apps externally and never had a problem. Now I'd like to use eclipse to debug my web app and I can't figure out how to make it work. I started by trying to get my existing web app to deploy through eclipse but after hours of trying different things I decided to start fresh. Unfortunately, I didn't get much further. I'm hoping if I can figure out how things work with a fresh webapp I can get things to work on my existing. Sorry, this will be long, but here are the steps I tried on the latest eclipse (Juno):
Installed new version of tomcat 7.0.34 at /usr/java.
In eclipse, used "servers" view to add server, pointing to the new install (I didn't add any resources because there weren't any available yet). Starting the server worked and got a 404 as expected at http://localhost:8080/ ... then I stopped it.
Created a new "dynamic web project", named it TomcatDebug, set the location to ~/tomcat-debug, chose the server just created above (the only one), chose default config, tomcat-debug is empty so chose defaults for build paths, defaults for module settings and had it generate web.xml.
In the "tomcat-debug" folder it creates WebContent, build, and src. I throw a sample "hello, world" index.html into WebContent.
Now the project TomcatDebug is created so I try to run it, tell it to "run on server", and it goes to http://localhost:8080/TomcatDebug/ but gives a 404. I even try to add index.html but it still gives a 404.
This is about as basic as it can possibly get so what did I do wrong?
Continuing to try and figure this out I stop the server, change the server setting to "use tomcat installation", but still get a 404 in the same way when I restart. I tried changing my module context path and still 404.
I'm completely stumped. I believe I followed all the wizards as basically as possible. Where did I go wrong?
Thanks for taking a look.
I haven't run tomcat through eclipse in a while, so can't answer that aspect of the question. But, to get at the heart of what you're trying to do (debug a webapp in eclipse through tomcat), you shouldn't necessarily need to. This may serve you instead:
EDIT: Eh, look here for instructions ("Debugging" section). The below is how I did it (JUNO and TC 7) and has an annoying quirk in point #1.
edit the startup.sh (assuming *NIX/OS X) - the last line will probably be
exec "$PRGDIR"/"$EXECUTABLE" start "$#"
change this to
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$#"
to activate debugging. (there are other ways to do this that may be better - i think tomcat/the VM may pause for listeners before proceeding, so when you aren't debugging this is not ideal)
Create a Debug Configuration in eclipse, under the "Remote Java Application" set. Default port should be fine, and presumably host. Choose your project.
Add sources of relevance to your debugging in the Source tab.
Start server and run your new debug configuration. App should stop at breakpoints you've set.
Right Click your index.html Run As -> Run On Server you will see Tomcat will automatically run the page.

ColdFusion debugging problem in Eclipse (Break points not hit)

I am trying to get the debugger (CF extension for Eclipse) working for last few hours. And struck in strange situation.
My settings are listed below
ColdFusion 8
Eclipse 3.4
I set up the RDS & modified the JVM.config settings and verified the connection & debugger, both returns successful in test run. But When i attach a debugger to the site, breakpoints are not hit.
My Eclipse workbench & site virtual directory pointing to the same path. It is in a remote server.
I left Eclipse-CF mapping blank since both pointing the same remote path.
And i am using WYSE thin client emulator.. does it anything to do with this..?
Can someone help me to resolve this problem?
Cheers
If your eclipse configuration is ok, could be that something is not confgured right on server side. Check if Line Debugger Settings > Allow Line Debugging feature is enabled and that Debugger Port (5005) is opened and accessible form client machine.
Articles that should walk you through proper setup:
http://eclipse.sys-con.com/node/382427
http://www.adobe.com/devnet/coldfusion/articles/debugger.html
Also you could try using CF Builder and/or FusionDebug http://www.fusion-debug.com/fd/ .
You do need to specify at least one mapping. Eclipse needs to know what folder in your project maps to the http root. Even if the mapping is / -> /, you need to specify that. The only time you can leave mapping blank is when the CF server is on the same machine as Eclipse.