AllPoland / ArcViewer

Open source, overengineered 3D Beat Saber map previewer and replay viewer
https://allpoland.github.io/ArcViewer/
GNU General Public License v3.0
60 stars 15 forks source link

Firefox does not work if width is large #61

Closed 9021007 closed 5 months ago

9021007 commented 5 months ago

Describe the bug:

The screen goes black if the width is too wide on Firefox

How to Reproduce:

Steps to reproduce the behavior:

Use a screen with a high resolution Have your zoom set to 100% Have the window take up the whole width of your screen. Try to use the website, it will be black. Can be fixed by zooming in or narrowing the window.

Expected behavior:

You can see things

Build Info:

Additional context:

Video: https://github.com/AllPoland/ArcViewer/assets/24487638/7aeadfdf-ae7b-4458-8d44-0e0af83fc01c

AllPoland commented 5 months ago

I'm not able to recreate this issue, could be either my screens not being high enough resolution or OS differences. If you open the inspector, you should be able to see a line labeled "unity-canvas", could you possibly send what the "width" and "height" numbers are when the window is black? image

9021007 commented 5 months ago

Ah. The window is visible up until 2048. Once it hits 2049, it goes black. Let me know if you need a video. Also, I just tested and it turns out that height is affected too. It looks like it functions up to 2048x2048, and no more.

AllPoland commented 5 months ago

After some research, it seems like this is a hardware issue (and potentially browser issue). Unfortunately I'm still not able to recreate it on my machine, and I'm not sure there's anything I could do about it anyway. Have you tried a different browser or computer?

9021007 commented 5 months ago

Ah ha! I've found something. The issue only seems to happen when I have Firefox's Resist Fingerprinting feature enabled.

Try having the browser prompt the user to allow for canvas access if they are wider or taller than 2048px.

9021007 commented 5 months ago

You can find Resist Fingerprinting under Advanced Preferences > privacy.resistFingerprinting

AllPoland commented 5 months ago

Ah, yep, I'm able to recreate the issue that way. Seems like the Resist Fingerprinting reduces the maximum size for a canvas as a means/side effect to blocking a common fingerprinting method. To my knowledge (a few searches and forum scouring), there isn't a way for a site to explicitly request to bypass this.

That, on top of this being a fairly corner case scenario where I'd hope most people using the setting would understand the limitations, I don't plan on fixing this on my end. You could either resize the window when using ArcViewer, or possibly whitelist the site on your end.

9021007 commented 5 months ago

Ah, that makes sense. Perhaps add a popup or something to warn people.

AllPoland commented 5 months ago

At best I could detect when the canvas isn't working, but I'm that'd be much more information than seeing the canvas not working lmao

9021007 commented 5 months ago

I sat at the black webpage for a solid minute waiting for it to load, so an error is better than nothing.