Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
325 views
in Technique[技术] by (71.8m points)

adblock - inject.preload.js failing to load a file in chrome from my dev environment

I use google chrome for my php/js development.

today I started to see a file that is failing to load.

file name is always different

Request URL: blob:http://random.homestead.test/4d9f984b-b8f8-4e77-97cb-4fcfd8ace348

network page says that initiator is inject.preload.js:373

if I open this file, the first line says

/*
 *This file is part of Adblock Plus <https://adblockplus.org/>,

But I have Adblock Plus disabled. I noticed that file is being loaded with success occasionally. And also noticed that this file is only requested when I have AdBlock (not AdblockPlus) active. If I have AdBlock disabled - no problem. but even if I exclude my dev site from adblock - the file download is still failing.

My question is: How can I get rid of this red line in my console log and network without entirely deactivating adblock?

I tried it on stackoverflow.com and I see the same file inject.preload.js loading same randomly named file and succeeding. the file header says:

/*
* Frame context wrapper
*
* For some edge-cases Chrome will not run content scripts inside of frames.
* Website have started to abuse this fact to access unwrapped APIs via a
* frame's contentWindow (#4586, 5207). Therefore until Chrome runs content
* scripts consistently for all frames we must take care to (re)inject our
* wrappers when the contentWindow is accessed.
*/

it started today on 14 of June 2018

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looks like it is officially broken. The issue is ticketed at https://issues.adblockplus.org/ticket/6744

I tried to debug and find the exact cause, but the issue seems to be elsewhere. The JS code debugged (inject.preload.js at line 373)

document.documentElement.appendChild(script); // here, script.src is indeed a valid script
document.documentElement.removeChild(script);
URL.revokeObjectURL(url);

The script's src attribute targets a valid blob JS which is alive when this line is called!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...