kkapsner / CanvasBlocker

A Firefox extension to protect from being fingerprinted.
https://canvasblocker.kkapsner.de
Mozilla Public License 2.0
1.17k stars 87 forks source link

twitch.tv canvasblocker v0.4.0 #133

Closed ghost closed 7 years ago

ghost commented 7 years ago

updated canvasblocker to the latest ver and now twitch.tv wont work. it was fine on v0.3.8. i tried disabled all my other add-ons except canvasblocker and it's still the same. embed twitch.tv player had no problem.

canvasblocker setting is the default setting and i'm using waterfox v55.2.0

2017-10-07 18_13_06-twitch_-_waterfox

kkapsner commented 7 years ago

I just installed waterfox v55.2.0 and twitch.tv is working fine. Can you be a bit more specific what's not working?

ghost commented 7 years ago

the blank black page. if i disabled canvasblocker with all other add-ons enabled, i can browse twitch but when i enabled canvasblocker, reload the page then the blank black page happened. apparently this only happen to non-beta twitch. i'm still using the non-beta site since some add-ons that i use, doesnt work with the beta site. non-beta is twitch.tv and beta is go.twitch.tv

Osahashi commented 7 years ago

I can confirm that issue on FF56 too

I post on NoScript a error report, because maybe its related with that, please look the data kkapsner https://forums.informaction.com/viewtopic.php?f=7&t=23369&p=90007#p90007

kkapsner commented 7 years ago

OK - this is a weird problem. But I can reproduce it and will work on it.

kkapsner commented 7 years ago

Hotfix 0.4.0.1 is out and should solve the problem.

Please confirm.

ghost commented 7 years ago

it works. thank you 😄

Osahashi commented 7 years ago

The fix does not work on FF56, twitch.tv is still not working with 0.4.0.1 :(

AAK: This domain is excluded from Ads JS V2.  directory%20line%203%20%3E%20Function:960:21
JQMIGRATE: Migrate is installed with logging active, version 1.4.1  global.js:4:3371
Loading failed for the <script> with source “https://www.googletagservices.com/tag/js/gpt.js”.  directory:1
Loading failed for the <script> with source “https://d2lv4zbk7v5f93.cloudfront.net/esf.js”.  directory:1
Loading failed for the <script> with source “https://cdn.mxpnl.com/libs/mixpanel-2.2.min.js”.  directory:1
Loading failed for the <script> with source “https://d37gvrvc0wt4s1.cloudfront.net/js/v1.9/rollbar.min.js”.  directory:1
Loading failed for the <script> with source “https://c.amazon-adsystem.com/aax2/apstag.js”.  directory:1
Loading failed for the <script> with source “https://imasdk.googleapis.com/js/sdkloader/ima3.js”.  directory:1
Error: Permission denied to access property Symbol.toPrimitive[Learn More]  global.js:3:22684
Loading failed for the <script> with source “https://ssl.google-analytics.com/ga.js”.  directory:1
Loading failed for the <script> with source “https://sb.scorecardresearch.com/beacon.js?_=1507446010365”.  directory:1
Loading failed for the <script> with source “https://edge.quantserve.com/quant.js”.  directory:237
"Service Worker registration succeeded. Scope is https://www.twitch.tv/"  global.js:15:15338
Loading failed for the <script> with source “resource://support-at-lastpass-dot-com/data/pageWebRequestEvents.js”.  directory:1
Error: WebExtension context not found! ExtensionParent.jsm:778:13
edge.quantserve.com:443 uses an invalid security certificate.

The certificate is only valid for the following names:
  *.akamaized.net, *.akamaihd-staging.net, *.akamaized-staging.net, *.akamaihd.net, a248.e.akamai.net  

Error code: <a id="errorCode" title="SSL_ERROR_BAD_CERT_DOMAIN">SSL_ERROR_BAD_CERT_DOMAIN</a>
  (unknown)
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/styles/application.css”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/global.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/benchmark.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/emberapp.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/translations/en-us.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/sw.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/sw-registration.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/styles/application-0fa6ef9268e043c023dfea86aeff7a02.css”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/global-1c4b4a2dabf5ebae26362392dc9f882c.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/benchmark-97693933205947e781cf762e7da19f64.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/emberapp-4db132dba91f0830fdf4766a7c51409e.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://web-cdn.ttvnw.net/translations/en-us-ec4e9c9d3e720f24b34f1f1d73952de5.js”  main.js:143
AAK: This domain is excluded from Ads JS V2.  directory%20line%203%20%3E%20Function:960
JQMIGRATE: Migrate is installed with logging active, version 1.4.1  global.js:4
Loading failed for the <script> with source “https://www.googletagservices.com/tag/js/gpt.js”.  directory:1
Loading failed for the <script> with source “https://d2lv4zbk7v5f93.cloudfront.net/esf.js”.  directory:1
Loading failed for the <script> with source “https://cdn.mxpnl.com/libs/mixpanel-2.2.min.js”.  directory:1
Error: WebExtension context not found! ExtensionParent.jsm:778:13
Error: Permission denied to access property Symbol.toPrimitive  global.js:3:22684
Loading failed for the <script> with source “https://d37gvrvc0wt4s1.cloudfront.net/js/v1.9/rollbar.min.js”.  directory:1
window.scope is undefined  require.js:10
rea is not defined  content.js:12
Loading failed for the <script> with source “https://c.amazon-adsystem.com/aax2/apstag.js”.  directory:1
Loading failed for the <script> with source “https://imasdk.googleapis.com/js/sdkloader/ima3.js”.  directory:1
Loading failed for the <script> with source “https://ssl.google-analytics.com/ga.js”.  directory:1
Loading failed for the <script> with source “https://sb.scorecardresearch.com/beacon.js?_=1507446252766”.  directory:1
Loading failed for the <script> with source “https://edge.quantserve.com/quant.js”.  directory:237
"Service Worker registration succeeded. Scope is https://www.twitch.tv/"  global.js:15
Loading failed for the <script> with source “resource://support-at-lastpass-dot-com/data/pageWebRequestEvents.js”.  directory:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist.  ExtensionCommon.jsm:304
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/betterttv.js”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://api.betterttv.net/2/twitch_emotes/ids”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://api.betterttv.net/2/emotes”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://api.betterttv.net/2/badges”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/css/betterttv.css?v=7.0.29”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/assets/logos/logo_icon.png”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/css/betterttv-dark.css?v=7.0.29”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/css/betterttv-hide-bits.css?v=7.0.29”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/css/betterttv-hide-friends.css?v=7.0.29”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/css/betterttv-hide-group-chat.css?v=7.0.29”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/assets/logos/settings_logo.png”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/assets/logos/mascot.png”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/privacy.html”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://api.betterttv.net/2/changelog”  main.js:143
Rejecting HTTP Referer “https://www.twitch.tv/directory” for “https://cdn.betterttv.net/css/betterttv-hide-recommended-channels.css?v=7.0.29”  main.js:143
crssi commented 7 years ago

I have FF 56, 64bit on Win 10, CB 0.4.0.1 and twitch.tv works just fine. Block mode: fake readout API RNG: persistent

Maybe you have a collision with some other extension?

Osahashi commented 7 years ago

I'm using block everything. (non persistant)

Version 0.3.8 works without problems on twitch.tv, but 0.4.0.0 and 0.4.0.1 blocks twitch.tv complete with a black site, it's the same like you see on the screenshot from astondi. When I downgrade back to 0.3.8 twitch.tv works again.

crssi commented 7 years ago

Hmmm, I have switched to your settings and twitch works for me.

Osahashi commented 7 years ago
twitch tv addons cb
Osahashi commented 7 years ago

Ok, changing to Allow only whitelist = https://www.twitch.tv and twitch.tv works again with 0.4.0.1

addons twitch tv
kkapsner commented 7 years ago

@Daisenki: this is strange. The "Error: Permission denied to access property Symbol.toPrimitive" is the one that is fixed with the hotfix. But if you can deal with whitelisting I asume it's OK.

Osahashi commented 7 years ago

Not only twitch.tv seams to have problems, also twitter... with block everything tweets doesn't show correct, the links inside tweets are not showing:

Whitelisted:

addons

Block everything:

cb
Osahashi commented 7 years ago

Block readout API works without problems on twitch.tv and twitter web without any whitelist, only the setting block everything breaks it. But why does 0.3.8. work without any problems on block everything and the new versions not? Is it a webExtension issue?

kkapsner commented 7 years ago

Could be a WebExtension issue, the changes I had to make for the transition to a WE or just a bug I introduced. The problem is that when I'm not able to reproduce the issue I'm not able to fix it...

Can you please create a new Firefox profile, only install CB and see if the problem still occures?

Osahashi commented 7 years ago

On a new profile only with CB it works without any problems on block everything.

So ok, it's no a conflict with any addon, it works with a clean profile, it must be anything at about:config. Any ideas?

accessibility.typeaheadfind.flashBar 0 browser.cache.disk_cache_ssl false browser.cache.disk.capacity 0 browser.cache.disk.enable false browser.cache.disk.filesystem_reported 1 browser.cache.disk.smart_size.enabled false browser.cache.disk.smart_size.first_run false browser.cache.disk.smart_size.use_old_max false browser.cache.frecency_experiment -1 browser.cache.memory.capacity 294912 browser.cache.memory.max_entry_size 10240 browser.cache.offline.capacity 0 browser.cache.offline.enable false browser.cache.use_new_backend 1 browser.places.smartBookmarksVersion 8 browser.search.suggest.enabled false browser.sessionstore.interval 300000 browser.sessionstore.upgradeBackup.latestBuildID 20170926190823 browser.startup.homepage https://browserleaks.com/ip browser.startup.homepage_override.buildID 20170926190823 browser.startup.homepage_override.mstone 56.0 browser.tabs.crashReporting.sendReport false browser.tabs.loadDivertedInBackground true browser.tabs.remote.autostart.2 true browser.tabs.warnOnClose false browser.urlbar.autocomplete.enabled false browser.urlbar.lastSuggestionsPromptDate 20171001 browser.urlbar.searchSuggestionsChoice false browser.urlbar.suggest.bookmark false browser.urlbar.suggest.history false browser.urlbar.suggest.openpage false browser.urlbar.suggest.searches false browser.urlbar.timesBeforeHidingSuggestionsHint 2 browser.urlbar.userMadeSearchSuggestionsChoice true dom.battery.enabled false dom.enable_performance false dom.enable_resource_timing false dom.gamepad.enabled false dom.gamepad.extensions.enabled false dom.gamepad.haptic_feedback.enabled false dom.idle-observers-api.enabled false dom.ipc.processCount 4 dom.popup_maximum 1 dom.vibrator.enabled false dom.vr.enabled false dom.vr.oculus.enabled false dom.vr.openvr.enabled false dom.vr.poseprediction.enabled false dom.webaudio.enabled false dom.webnotifications.enabled false dom.webnotifications.serviceworker.enabled false extensions.lastAppVersion 56.0 font.name.monospace.x-western Segoe UI font.name.sans-serif.x-western Segoe UI font.name.serif.x-western Segoe UI gfx.webrender.enabled true keyword.enabled false layers.mlgpu.sanity-test-failed false media.benchmark.vp9.fps 324 media.benchmark.vp9.versioncheck 2 media.cache_size 0 media.eme.enabled false media.getusermedia.screensharing.enabled false media.gmp-gmpopenh264.abi x86_64-msvc-x64 media.gmp-gmpopenh264.enabled false media.gmp-gmpopenh264.lastUpdate 1506857651 media.gmp-gmpopenh264.version 1.6 media.gmp-manager.buildID 20170926190823 media.gmp-manager.lastCheck 1507479726 media.gmp-manager.url media.gmp-provider.enabled false media.gmp-widevinecdm.enabled false media.gmp.storage.version.observed 1 media.hardware-video-decoding.failed false media.navigator.enabled false media.peerconnection.default_iceservers media.peerconnection.dtmf.enabled false media.peerconnection.enabled false media.peerconnection.identity.enabled false media.peerconnection.identity.timeout 1 media.peerconnection.turn.disable true media.peerconnection.use_document_iceservers false media.peerconnection.video.enabled false media.video_stats.enabled false network.allow-experiments false network.captive-portal-service.enabled false network.cookie.cookieBehavior 1 network.cookie.prefsMigrated true network.dns.disablePrefetch true network.http.max-connections 256 network.http.max-persistent-connections-per-proxy 256 network.http.pipelining true network.http.pipelining.abtest false network.http.pipelining.aggressive true network.http.pipelining.max-optimistic-requests 4 network.http.pipelining.maxrequests 32 network.http.pipelining.maxsize 300000 network.http.pipelining.read-timeout 60000 network.http.pipelining.reschedule-on-timeout true network.http.pipelining.reschedule-timeout 15000 network.http.pipelining.ssl true network.http.proxy.pipelining true network.http.speculative-parallel-limit 0 network.predictor.cleaned-up true network.prefetch-next false places.database.lastMaintenance 1506865031 places.history.enabled false places.history.expiration.transient_current_max_pages 104858 plugin.disable_full_page_plugin_for_types application/pdf plugins.ctprollout.cohort test plugins.ctprollout.cohortSample 0.486073 privacy.clearOnShutdown.cookies false privacy.clearOnShutdown.sessions false privacy.donottrackheader.enabled true privacy.history.custom true privacy.popups.disable_from_plugins 3 privacy.popups.showBrowserMessage false privacy.sanitize.sanitizeOnShutdown true privacy.trackingprotection.annotate_channels false privacy.trackingprotection.introURL privacy.trackingprotection.pbmode.enabled false security.disable_button.openCertManager false security.disable_button.openDeviceManager false security.family_safety.mode 0 security.mixed_content.block_active_content false security.OCSP.GET.enabled true security.OCSP.require true security.sandbox.content.tempDirSuffix {f607b484-93ab-4179-88b7-80fcdb7a4fcc} security.ssl.errorReporting.url services.sync.declinedEngines storage.vacuum.last.index 1 storage.vacuum.last.places.sqlite 1506865031 ui.osk.debug.keyboardDisplayReason IKPOS: Touch screen not found. ui.osk.enabled false webgl.enable-debug-renderer-info false

EchoDev commented 7 years ago

I seem to be having the same problem Switching media.peerconnection.enabled to true makes Twitch work again. So a combination of Canvasblocker, disableing WebRTC makes the site not load.

Osahashi commented 7 years ago

Ah cool thank you! Can you work with that info @kkapsner and fix the problem? :/

I really don't want to activate WebRTC...

crssi commented 7 years ago

I have WebRTC disabled and also media.peerconnection.enabled = false, and twitch.tv works as it should.

Osahashi commented 7 years ago

It's weird that you don't have that problem crssi, but now with EchoDev I'm at least not the only one with it. :D

EchoDev commented 7 years ago

@Daisenki did you test Twitch with WebRTC enabled to be sure the problem is the same on your end?

Osahashi commented 7 years ago

@EchoDev unfortunately it's not working on my Firefox, I enabled WebRTC complete, reset WebRTC to default, but twitch.tv doesn't load. :(

crssi commented 7 years ago

I am on FF 56 x64, Win10

Using preferences from https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js as base. At the end I have appended the following:

/*** PERSONAL TWEAKS ***/
    /* 0000  */ user_pref("findbar.highlightAll", true); // hihglight all hits on search
    /* 0100? */ user_pref("browser.startup.homepage", "about:blank"); // set blank page at start up
    /* 1003  */ user_pref("browser.cache.memory.enable", false); // Get rid of ETAG cookieless tracking/fingerprinting
    /* 0862  */ user_pref("places.history.enabled", false); // disable history
    /* 1020  */ user_pref("browser.sessionstore.max_tabs_undo", 10); // remember last 10 closed tabs for undo
    /* 1701  */ user_pref("privacy.userContext.ui.enabled", true); // containers
    /* 1702  */ user_pref("privacy.userContext.enabled", true); // containers
    /* 1704  */ user_pref("privacy.userContext.longPressBehavior", 2); // containers
    /* 2030  */ user_pref("media.autoplay.enabled", true); // to stop autoplay install extension "YouTube no Buffer" or simmilar
    /* 2603  */ user_pref("browser.download.useDownloadDir", true); // force save downloads to download folder
    /* 2701  */ user_pref("network.cookie.cookieBehavior", 1); // accept 1st party cookies
    /* 2803b */ user_pref("privacy.clearOnShutdown.cookies", true); // clear cookies at shutdown
    /* 5001a */ user_pref("full-screen-api.warning.timeout", 0); // remove fullscreen message annoyance
    /* 5004  */ user_pref("browser.backspace_action", 0); // set backspace to URl backpage
    /* 5022  */ user_pref("browser.bookmarks.showRecentlyBookmarked", true); // show recently bookmarks
    /* 5026  */ user_pref("reader.parse-on-load.enabled", false); // disable reader view
    /* 5028  */ user_pref("general.autoScroll", false); // disable mouse middle-click scroll annoyance

/*** LOCATION BAR / SEARCH BAR / SUGGESTIONS : Install extension "DuckDuckGo clean (no history version)" or any other privacy search provider ***/
    /* 0801  */ user_pref("keyword.enabled", true);
    /* 0807  */ user_pref("browser.search.suggest.enabled", true);
    /* 0808  */ user_pref("browser.urlbar.suggest.searches", true);
    /* 0850c */ user_pref("browser.urlbar.suggest.bookmark", true);
    /* 0850c */ user_pref("browser.urlbar.suggest.openpage", true);

/*** PASSWORDS : Install "Saved Password Editor" to simplify saving passwords, 2402 needed for random password generator ***/
    /* 0901  */ user_pref("signon.rememberSignons", false); // disable saving passwords
    /* 2803  */ user_pref("privacy.clearOnShutdown.siteSettings", true); // remove siteSettings on exit

/*** BREAKAGE TWEAKS ***/
    /* ????  */ user_pref("network.http.throttle.enable", false);
    /* 0001  */ user_pref("browser.privatebrowsing.autostart", false); // disable PB
    /* 1202  */ user_pref("security.tls.version.min", 1); // some SSL pages still uses TLS 1.0 and breaks with the value higher than 1
    /* 1212  */ user_pref("security.OCSP.require", false);
    /* 1401  */ user_pref("browser.display.use_document_fonts", 1); // can't help myself, but I like fonts
    /* 1405  */ user_pref("gfx.downloadable_fonts.woff2.enabled", true); // can't help myself, but I like glyphs
    /* 2204  */ user_pref("browser.link.open_newwindow.restriction", 2); // don't like new window to be forcibly opened fullsize
    /* 2402  */ user_pref("dom.event.clipboardevents.enabled", true); // enable clipboard manipulation, needed for "Saved Password Editor" random password generator and some like "WordPress" sites
    /* 2301  */ user_pref("dom.workers.enabled", true); // false breaks some sites, see: https://docs.microsoft.com/en-us/advanced-threat-analytics/modifying-ata-config-centercert
    /* 2418  */ user_pref("full-screen-api.enabled", true); // false breaks fullscreen
    /* 2674  */ user_pref("security.csp.experimentalEnabled", false); // true breaks CSS at https://securityheaders.io/
    /* 4001  */ user_pref("privacy.firstparty.isolate", false); // true breaks SDC, Cookie AutoDelete and some login pages

Additionally WebRTC is disabled also over uBlock Origin.

Maybe this would be the base to start from to find out the diffs you have.

Cheers

Osahashi commented 7 years ago

The WebRTC blocker in uBO is disabled like always.

Most of the settings are the same on my end, except for OCSP true, memory cache true but both does nothing about the issue. I know the guys from ghacks^^

kkapsner commented 7 years ago

CB does not do anything with WebRTC...

@Daisenki: can you give me your prefs.js? Maybe I'm able to reproduce the problem with it.

Osahashi commented 7 years ago

You can download it from my hoster here: https://qualy.hdc.bz/WlvN/prefs.js

kkapsner commented 7 years ago

Reproduced your problem and I think I can fix it. Still no idea what the real root is...

kkapsner commented 7 years ago

Hotfix 0.4.0.2 is out and hopefully twitch is now working.

Osahashi commented 7 years ago

The 0.4.0.2 fix twitch.tv, it works now the block everything! :)

But unfortunately the twitter timeline is still broken with block everything. Should I make a new ticket for twitter?

kkapsner commented 7 years ago

Yes, please open a new ticket (please add all relevant data like URL, error messages, etc.). I think this is a different problem - @Thorin-Oakenpants seems to have the same problem: https://github.com/kkapsner/CanvasBlocker/issues/127#issuecomment-335026696