jneilliii / OctoPrint-BedLevelVisualizer

MIT License
372 stars 82 forks source link

Support for Brave Browser. #215

Closed DotNetRob closed 4 years ago

DotNetRob commented 4 years ago

When opening the Bed Visualizer in Brave I get a "WebGL is not supported by your browser - visit https://get.webgl.org for more info" message. But if I go to the url https://get.webgl.org, it works just fine.

Runs just fine in chrome.

jneilliii commented 4 years ago

What about if you go to the plotly examples page linked below, does it load for you?

https://plotly.com/javascript/3d-surface-plots/

DotNetRob commented 4 years ago

Yep works fine in brave.

image

jneilliii commented 4 years ago

Looks like the version of plotly library I have in the plugin is one version before better Brave browser detection based on the release notes here. I'll see about updating plotly library in a test branch and get you to verify for me.

DotNetRob commented 4 years ago

sounds good.

jneilliii commented 4 years ago

Ok, I've updated the library and pushed to a new branch. You can test by using the URL below in plugin manager. Make sure to force a refresh in the browser (I assume it's similar to chrome shift+f5) once installed.

https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/archive/0.1.14.zip

DotNetRob commented 4 years ago

Installed over the existing plugin then restarted octo and didn't work, so did a uninstall and clean up data. Then installed it fresh, restarted octo but still isn't displaying.
image

jneilliii commented 4 years ago

Did you force a refresh of your browser to bypass local cache?

DotNetRob commented 4 years ago

I did, even went into debug/dev mode(F12) and did a Empty cache and hard reload, but still no luck. Was going to try in private mode to ensure of no caching but can't login to octoprint when in private mode in brave.

jneilliii commented 4 years ago

Ok thanks. Not sure why this is not working then in the plugin but does on the examples page. They are in theory using the same version of the library, and I don't do anything weird to not allow it to work in Brave. I'll dig deeper into the plotly issue tracker and see if there is any additional information.

jneilliii commented 4 years ago

Not super familiar with Brave, except that it's "more secure", but found a post that disabling shields with webgl may help?

I use Brave as my main browser and I often encounter issues with WebGL plots. I usually solve them by turning off the Brave Shields

DotNetRob commented 4 years ago

Will have to look thru the brave shield settings and see when I can find, I am still pretty new to brave myself. But confirmed it not the plugin, its a brave issue. I went to the codepen link on https://plotly.com/javascript/3d-surface-plots/ and it doesn't work on codepen either.

https://codepen.io/pen/?&editable=true

image

jneilliii commented 4 years ago

It's actually an issue with plotly being able to detect the Brave browser properly I think. Saw two posts on it's issue tracker for Brave. One was closed and one was still open, which is where I got that quote from. You may want to chime in on that issue posted here.

DotNetRob commented 4 years ago

Found it. In brave shields there is a setting for "Device recognition" defaults to "Only block cross-site device recognition attempts", if set it to "Allow all" it works.

jneilliii commented 4 years ago

Great, glad you were able to find it. Not sure if there is an option to "trust" a specific address to allow it only on the octoprint site or not, but if that is an option you might want to set it that way to keep it blocking other sites. That is the whole point of Brave, more secure/anonymous browser.