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

左心房为你撑大大i 提交于 2019-11-27 05:09:18

问题


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


回答1:


In the comment https://issues.adblockplus.org/ticket/6744#comment:17 , you can find a link to build list https://downloads.adblockplus.org/devbuilds/adblockpluschrome/, install the development version "Adblock Plus for Google Chrome and Opera 3.1.0.2069" and the error won't display anymore

updated

On 2018.7.17 the new verison with bug fixed is released on chrome webstore. So this issue is automatically resolved.




回答2:


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!




回答3:


the ticket is on review and they working on it. Now you can add the entire test site to your trusted sites




回答4:


I installed an older version of Chrome and I solved the problem. https://www.slimjet.com/chrome/google-chrome-old-version.php




回答5:


If you have any adBlocker then remove or pause for that specific page adBlocker, it worked for me i had the same issue with JavaScript Application when fetching data from Firestore.



来源:https://stackoverflow.com/questions/50849510/inject-preload-js-failing-to-load-a-file-in-chrome-from-my-dev-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!