You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Widget Inspector values overlap label text in Brave browser #367
After a short investigation it seems to be caused by the browser's built in ad-blocker. It prevents third party fingerprinting on the canvas element used, which seems to break the UI. After disabling this, everything looks good.
This issue can be closed I guess, thanks for the fast reaction 👍
Is this enabled by default? Which browser/version is it on which OS? It may be worth keeping this open to see if there's a way we can fix it, or at least warn users if they're using that browser.
To keep our velocity high writing the devtools app we only have time to support Chrome. We should make that clearer when you start the app to avoid confusion.
We should make that clearer when you start the app to avoid confusion.
Do you mean in the web app? Should we open an issue for this?
I had a quick look to see if there might be a quick fix for this, but it seems like Brave's anti-fingerprinting breaks quite a lot of stuff that uses canvas:
@lookfirst Brave deliberately makes itself look like Chrome (it used to identify itself, but stopped because it was another variable that could be used for fingerprinting), so I don't think it's possible to show a warning for Brace without all Chrome users seeing it.
I don’t think the warning should be based on browser detection, rather than if canvas is available. There are plugins from chrome that prevents fingerprinting as well, which then will result broken UI again.
Oh sorry, I may have misunderstood. I thought Brave was just messing with the rendering on the canvas. If it's just not available, then that might be easy to warn for.
Can you run this code in the JS console and confirm if it outputs false?
Because the way it works, the only way to prevent it is to disable toDataUrl method of the canvas, so the data can not be read, and thus no "fingerprint" can be obtained.
I think you can tweak the check like this:
var elm = document.createElement('canvas'); (elm.toDataURL() === '')
If fingerprinting is disabled, this will output true.
Ok, though we don't use toDataURL in DevTools so it might not be the best check. I wonder if it's measureText that's being blocked (looks like we use that to align the value, and the screenshot shows the value written over the label).
Does this return 0 for you?
document.createElement('canvas').getContext('2d').measureText('Text that is quite long')
I've just ran observatory with the latest version of Brave, as I wasn't using it for a while and found out a bunch of new problems:
It seems like the CSS and JS assets are not served with correct mime type from the observatory thus white screen appears as those files are not loaded at all.
@Sh1d0w ok, then I think we can probably easily show a warning at the top of the Inspector page when measureString returns 0. I've opened #777.
As for the Observatory issue - I think that's best raised at dart-lang/sdk since it's a different app to the Dart DevTools (though I'm not sure what the support is intended to be for that).
Activity
Sh1d0w commentedon Feb 27, 2019
After a short investigation it seems to be caused by the browser's built in ad-blocker. It prevents third party fingerprinting on the canvas element used, which seems to break the UI. After disabling this, everything looks good.
This issue can be closed I guess, thanks for the fast reaction 👍
DanTup commentedon Feb 27, 2019
Is this enabled by default? Which browser/version is it on which OS? It may be worth keeping this open to see if there's a way we can fix it, or at least warn users if they're using that browser.
Sh1d0w commentedon Feb 27, 2019
@DanTup I am on the latest version of MacOS using Brave Browser. Yes this is enabled by default.
[-]Widget Inspector values overlap label text[/-][+]Widget Inspector values overlap label text in Brave browser[/+]jacob314 commentedon Feb 28, 2019
To keep our velocity high writing the devtools app we only have time to support Chrome. We should make that clearer when you start the app to avoid confusion.
DanTup commentedon Mar 4, 2019
Do you mean in the web app? Should we open an issue for this?
I had a quick look to see if there might be a quick fix for this, but it seems like Brave's anti-fingerprinting breaks quite a lot of stuff that uses canvas:
brave/brave-browser#1025
So I doubt there's something simple we could tweak to avoid it. I guess a lot of legit use looks like fingerprinting.
kenzieschmoll commentedon Mar 19, 2019
Open issue for warning users is here: #66.
lookfirst commentedon Jun 28, 2019
Super new Flutter user. Just ran into this myself. Having a warning for missing canvas would be nice.
DanTup commentedon Jul 8, 2019
@lookfirst Brave deliberately makes itself look like Chrome (it used to identify itself, but stopped because it was another variable that could be used for fingerprinting), so I don't think it's possible to show a warning for Brace without all Chrome users seeing it.
Sh1d0w commentedon Jul 8, 2019
I don’t think the warning should be based on browser detection, rather than if canvas is available. There are plugins from chrome that prevents fingerprinting as well, which then will result broken UI again.
DanTup commentedon Jul 9, 2019
Oh sorry, I may have misunderstood. I thought Brave was just messing with the rendering on the canvas. If it's just not available, then that might be easy to warn for.
Can you run this code in the JS console and confirm if it outputs
false?Sh1d0w commentedon Jul 9, 2019
@DanTup That's close.
Canvas fingerprinting is well described here https://browserleaks.com/canvas#how-does-it-work
Because the way it works, the only way to prevent it is to disable
toDataUrlmethod of the canvas, so the data can not be read, and thus no "fingerprint" can be obtained.I think you can tweak the check like this:
If fingerprinting is disabled, this will output true.
DanTup commentedon Jul 9, 2019
Ok, though we don't use
toDataURLin DevTools so it might not be the best check. I wonder if it'smeasureTextthat's being blocked (looks like we use that to align the value, and the screenshot shows the value written over the label).Does this return 0 for you?
Sh1d0w commentedon Jul 9, 2019
@DanTup Yep, the output is
Good point.
I've just ran observatory with the latest version of Brave, as I wasn't using it for a while and found out a bunch of new problems:
It seems like the CSS and JS assets are not served with correct mime type from the observatory thus white screen appears as those files are not loaded at all.
DanTup commentedon Jul 9, 2019
@Sh1d0w ok, then I think we can probably easily show a warning at the top of the Inspector page when
measureStringreturns 0. I've opened #777.As for the Observatory issue - I think that's best raised at dart-lang/sdk since it's a different app to the Dart DevTools (though I'm not sure what the support is intended to be for that).
alexis-andino commentedon Jun 24, 2020
I turned off the shields for the website and the overlap issue was gone.