nicole-ashley / uBlock-Edge

uBlock Origin - An efficient blocker for Chromium, Firefox and Edge. Fast and lean.
GNU General Public License v3.0
328 stars 16 forks source link

Browser trying to download some pages, instead of open them #45

Closed npavlov closed 7 years ago

npavlov commented 7 years ago

Read first: https://github.com/gorhill/uBlock/blob/master/CONTRIBUTING.md

Describe the issue

Browser trying to download some pages, instead of open them

One or more specific URLs where the issue occurs

https://news.yandex.ru/yandsearch?cl4url=www.interfax.ru/world/541884&lang=ru&from=main_portal&lr=213

Open any link below

Screenshot in which the issue can be seen

image

Steps for anyone to reproduce the issue

  1. Open link https://news.yandex.ru/yandsearch?cl4url=www.interfax.ru/world/541884&lang=ru&from=main_portal&lr=213
  2. Click on one link below on website

Your settings

[If you fail to provide this info, I will mark the issue as invalid. Lists all settings which differs from default settings]

nicole-ashley commented 7 years ago

Thanks for the report @npavlov, I'll take a look.

nicole-ashley commented 7 years ago

As far as I can tell, this is an Edge issue. 

Here's what's happening:

  1. When you click one of the links on the Yandex News page, it opens a new tab to http://news-clck.yandex.ru/clck/jsredir?.... The querystring contains the URL to redirect to.
  2. When processing the response headers of this page, uBlock identifies that it needs to block websockets on this page and adds a CSP header with the value connect-src: http:; frame-src: http:.
  3. Chrome handles this ok.
  4. Edge seems to bail when you add extra headers (no matter what they are) which seems to cause it to ignore the Content-Type: text/html header. Without this Content Type it tries to download the page instead.

I'll get the team at Microsoft to look into this and see if they can come up with a fix.

@npavlov, at the moment you can work around this by adding news-clck.yandex.ru to your whitelist.

npavlov commented 7 years ago

@nikrolls Thank you for answer. Will wait for fix. =) Not only news-clck.yandex.ru, but much more web sites. And strange thing while opening http://nnmclub.to/, page closes immediately.

nicole-ashley commented 7 years ago

Ticket for Edge bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8796739/

stasjok commented 7 years ago

Is it correct to add this custom rule for workaround? @@*$websocket Can something unexpected happen e.g. extra whitelisting?

ForumSchlampe commented 7 years ago

Is this the same problem as for openload.co? Sometimes it tries to download a site, sometimes it just closes the site.

stasjok commented 7 years ago

@ForumSchlampe, it's the same. You can exclude rule that causing the problem by adding custom rule (your domain only): @@$websocket,domain=openload.co or for all domains: @@$websocket I added last rule and never saw this problem since.

ForumSchlampe commented 7 years ago

@stasjok thanks @@$websocket works like a Charme...tried the previous one but this didnt work ( @@$websocket )..without the not needed it works

ibrokemypie commented 7 years ago

Same issue with http://www.tomsguide.com/ Even just that base url does not display with ubO enabled, works perfectly without

eherberg commented 7 years ago

The ticket for Edge appears to be closed. Does anybody know how long it takes for them to propagate to release?

nicole-ashley commented 7 years ago

It may actually be in the latest fast ring build. I’ll give it a go and report back.

nicole-ashley commented 7 years ago

It's not in the current Fast Ring build. I'd expect it to be in pretty soon though as they are now in feature-freeze for the Creators Update. @scottlow, do you have any insight on this one?

scottlow commented 7 years ago

@nikrolls Sorry, this notification slipped through my radar. Please send me mail if you don't hear back from me in a few days next time.

The fix for the original bug is in the latest Fast Ring build. This new bug occurs when the CSP header is modified in foilWithCSP() in traffic.js. I sent you mail earlier today, but can you help us understand the impact of this bug? Based on my brief look over the code, it appears it will happen any time there is an inline script or websocket rule associated with a site. Will this be a blocker for releasing publicly?

scottlow commented 7 years ago

New Edge ticket: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11111550/

scottlow commented 7 years ago

As an update here, we managed to get a one day turnaround on this bug! It will be fixed in an upcoming Windows Insider Preview flight. We're also in the process of making changes to our Edge Issue tracker so that you'll be able to check back and see whether a fix is "fixed, but not flighted", "fixed and flighted in build " or "fixed". Hopefully this helps everyone track when they can grab a build with the fix!

nicole-ashley commented 7 years ago

Fantastic! Thanks so much for working to get this fixed. I’ll update here once I see it in a Fast Ring update. And the new statuses in the tracker will be very helpful.

dhigh88 commented 7 years ago

Can someone please assist me on this because the @@$websocket,domain rule doesn't work anymore after update. I don't know how to use the @@|blob: rule on my filters, suggested #61

stasjok commented 7 years ago

@dhigh88 Just add this rule at the next line. There should be two rules now. "My filters" should be looking like this:

@@$websocket
@@|blob:
nicole-ashley commented 7 years ago

The fix is in build 15055, the latest fast ring build released today. I've verified that all sites mentioned now open correctly. I'll close this ticket once the Creators Update goes gold.

Checkoff85 commented 7 years ago

Hey there. Im also having this bug. Im not an Insider, so i have the official .953 installed and uBlock origin with Edge.

www.windowscentral.com for example isnt loading at all, sometimes it wants to download the page as described above.

So im hoping we talk about the same bug and its fixed with the upcoming build as you mentioned.

I really want to use this extension... Why isnt it listed in the store?

ForumSchlampe commented 7 years ago

@Checkoff85 see https://github.com/nikrolls/uBlock-Edge/issues/45#issuecomment-284952931 for a current Workaround...and yes this is the bug mentioned in this bug Report

it isnt listed while it is still in preview (and cause of this bug and some other things i dont think it will be out of preview before redstone 2 release)

debsuvra commented 7 years ago

Installed Windows 10 Creators Update today. Edge is updated to 40.15063.0.0 and the issue is fixed.

dhigh88 commented 7 years ago

I don't understand how all these Windows 10 updates work for others, but for me I still have to use the blob, domain rule. I had the Cumulative update 2 days ago and still didn't change a thing. Could anyone kindly explain what is wrong.

scottlow commented 7 years ago

@dhigh88 Can you confirm what version of Edge you're running?

"..." > Settings > scroll to "About this app"

dhigh88 commented 7 years ago

@scottlow Microsoft Edge 38.14393.0.0

I tried the creators update and noticed the problem was fixed but reverted back to my previous build as I was having some issues with the latest build.

scottlow commented 7 years ago

@dhigh88 Ah, yeah we weren't able to back-port the fix to the Anniversary Update due to how close we were to the Creators Update launching.

nicole-ashley commented 7 years ago

Closing as the issue is now fixed in the Creators Update.

japborst commented 7 years ago

@nikrolls does this mean the extension will be public now as all major issues are fixed?

nicole-ashley commented 7 years ago

It already is! 🎉 You just need the Creators Update to see it.

(I should probably update the Readme ...)

iDevPro commented 5 years ago

Hello, how to fix this issue, I have same issue with Safari extension uBlock Origin

4c74356b41 commented 4 years ago

same happens with edge dev to me. I would assume the root cause is the same, anyway I can figure this out\test this?