Some of my beta testers are getting a black window in place of the game when playing in Chrome 66 and 67. It shows the loading bar and finishes loading, but at the moment it starts running, it goes to a blank black rectangle. Here's the dev console from one of the users, but I'm not sure how to interpret it. Does anyone have suggestions on how to debug this? Thanks in advance.
- Can you ask them if they can run other Unity WebGL content? (for example this) - In the log you we print the list of webgl extension, maybe compare black canvas vs correct rendering list.
That tank game ran, but only for a few seconds before crashing. He's running the current version of Chrome on Windows 7 Professional. Here's the log:
Hey, tried this on our Win7 test machines with latest Chrome but can not repro this with the tanks example. Can you provide us with a bug report that contains your project or a repro project so we can repro the error from your forst post? That'd be very nice.
Hi all. I'm an end user, not a Unity developer, but I've been looking for a solution to this problem for months now. It's not just one Unity game, it's pretty much all of them. Any Unity game on Kongregate seems to give me a blank black box with little else when using Chrome. I'm currently using Chrome 67.0.3396.87, but as I've said this has been going on for months (at least 3 months) so it may have began with an earlier version of Chrome. Firefox does not give me any troubles with Unity content. The Tanks thing linked above displays seemingly ok, but it is incredibly unresponsive and choppy. After closing the tab I tried going back to it only to get the message that my browser does not support WebGL. I can't get the Tanks thing to load again. I would love for you all to find a solution to this issue and I'll help in any way I can. I do have a background as an amateur coder. I can read code for languages that I don't know and I understand debug messages, etc. Feel free to use me if you have need. Edit: Here's an example of what one game looks like in Chrome: And this is what it looks like in Firefox:
Hey everyone, We've had some success debugging the troubled Windows 7 machine. Although the solution isn't perfect, it's a solution and I'm hoping we can work towards pinpointing the issue since I've seen it among other users as well. We discovered that if someone else logged in to the PC on a different account, both my game, and the tanks game, worked. We then later discovered that if we logged in as the user having trouble and renamed the directory containing the Chrome settings at c:/Users/[username]/AppData/Local/Google/Chrome (in essence deleting it), both games worked for him! Chrome would automatically create all new settings of course, and that is what fixed it. So, somewhere within the settings, there was some flag or setting that was causing all the WebGL issues. I should mention for posterity, we initially tried "Settings > Restore settings to their original defaults" for the troubled user, and that did not fix the problem. We had to rename that Chrome settings folder. The downside to this solution, of course, is that the user is losing all their Chrome data (cookies, passwords, other save games, etc). Ideally, we can figure out what in the Chrome settings is causing this issue so we can flip the problem setting/flag. (CC @Schubkraft , @Marco-Trivellato , @Darxide23 )
That is unfortunate. I think I can hold out and see if you find the cause so that maybe I can just clear out the offending files and let them be rebuilt instead of nuking my entire profile, which is definitely less than ideal.
We're also seeing black screen issues in Chrome, but there seems to be a very specific reason to do with multi sampling. INVALID_OPERATION: renderbufferStorageMultiSample: samples out of range Setting anti aliasing to off causes the blackness to go away and the rendering to show up. reported as Bug Case 1053885
Can play game if turn hardware acceleration on. But need the user to turn it on manually... Also can reproduce by turning it off. Chrome only. Unity 2018.2.6f1
I also have this. It was fixed by going to Chrome -> Settings -> Advanced Settings -> Enable Hardware Acceleration , then Relaunch.
im seeing the same thing with Unity 2018.1 WebGL build running in CHROME. The black screen is not there all the time, it comes randomly and appears to happen when i change scenes, maybe not the first time i change scenes, but the second or third, or fourth time ( seems random), the whole screen becomes pitch black. Only way out is to close the browser and start over. Maybe its something to do with the post processing i have connected to the camera???
We're seeing this more and more now with the latest version of Chrome. At least one person has had success with renaming this directory c:/Users/[username]/AppData/Local/Google/Chrome as Jinxology suggested
To let you know my black screen turned out to be a null pointer in my code that caused a crash, so it wasn't unity engine causing it.
private bool IsHardwareAccelerationOn { get { return !SystemInfo.graphicsDeviceName.Contains("SwiftShader"); } } if(IsHardwareAccelerationOn == false) { AspectUtility.MainCamera.allowMSAA = false; QualitySettings.antiAliasing = 0; }
I am getting the same issue. "Disabling Antialiasing if Hardware Acceleration is false" make it work, but it works with ONLY 2-5 FPS. On the other hand in Firefox it works 60fps@60hz flawlessly. I get this on Radeon mobile graphic card. Is there any correlation with this? Can you confirm that? More important than that, we need a solution. Hardware Acceleration is on in Chrome's settings. Still get this error. How to make that WebGL build work with Hardware Acceleration?
So it seems to be a problem with safari as well as chrome now (I tried both since my project has the same issue). I’ll try firefox later but I’m guessing it’s the browser’s fault. What confuses me is my previous game (built with same version of unity) worked. However this newer game doesn’t work. It is a much larger project so maybe do I need to allow more space or something in project settings? Oh, and it doesn’t work on mobile browsers either.
I have same problem with Opera. Chrome can run the game but Opera can't. Also loading screen doesn't shown up, yet chrome loads the game. That's really strange. Unity version is 2020.2.1f1
I still had the black screen issue and got this error message: Access to XMLHttpRequest at 'file:///C:/Users/path/file.data.gz' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. It might be silghtly different from those above though my search for a solution brought me here and nothing from aboive worked for me. Though emulating a webserver in your directory of desire (or uploading the file somewhere i guess) did for me. You can find multiple solutions over here https://stackoverflow.com/questions...supported-for-http-error-when-loading-a-local However, of the named solutions works Twisted works best for me. More discussion on that you find over here https://stackoverflow.com/questions...ve-to-pythons-http-server-or-simplehttpserver
I had the same problem on a iPhone with iOS 14.4.4 and unity WebGL build with Unity 2020.2.5f1. Android and PC was working fine with their browsers. But not one browser worked on the iPhones. Just a black screen after the loading bar and Made with Unity message. I previously disabled Enable Exceptions in the Player -> Publish Settings. The fix was to turn it back on with: Full without Stacktrace. After enabling and building the iPhones loaded the game properly again. Maybe this will help someone
I had the same problem with Unity 2022.2.0b1.2674. My simple webgl game works on Chrome both in windowed and in fullscreen mode and it works fine in firefox windowed mode but doesn't work in FireFox Fullscreen mode (black screen). Seems these problems with a black screen last forever.