nw version 23.5 -load-extension :ERR_BLOCKED_BY_CLIENT
See original GitHub issuepackage.json
{
"main": "index.html",
"name": "canhuang",
"appname": "canhuang",
"version": "1.0.0",
"window": {
"title": "v1.0.0",
"toolbar": true,
"width": 800,
"height": 800,
"frame": true
},
"chromium-args": "-load-extension=./extensions/ -ignore-certificate-errors",
"webview": {
"partitions": [
{
"name": "trusted",
"accessible_resources": [
"<all_urls>"
]
}
]
}
}
index.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
</head>
<body>
<div id="container" class="container"></div>
<script src="index.js"></script>
</body>
</html>
index.js
global.contentDocument = document
require('./core.js')
if (nw.App.argv.indexOf('inspect') !== -1) {
nw.Window.open('about:blank', {
"show": false,
"width": 799,
"height": 799,
}, (inspectWin) => {
inspectWin.maximize()
inspectWin.window.location = "chrome://inspect/#devices"
inspectWin.show()
})
}
core.js
var webview = document.createElement('webview')
var devtools = document.createElement('webview')
webview.setAttribute('style', 'height:300px;width:100%;position:absolute')
devtools.setAttribute('style', 'height:300px;width:100%;position:absolute;top:300px')
devtools.setAttribute('partition', 'trusted')
var container = global.contentDocument.getElementById('container')
container.appendChild(webview)
container.appendChild(devtools)
webview.src = 'https://mp.weixin.qq.com'
const devtoolsviewCommit = () => {
devtools.removeEventListener('loadcommit', devtoolsviewCommit)
webview.showDevTools(true, devtools)
}
devtools.addEventListener('loadcommit', devtoolsviewCommit)
devtools.src = 'about:blank'
in extension folder create 3 files: devtools.html、manifest.json、custom.html
devtools.html
<html>
<head>
</head>
<body>
<script >
"use strict"
// 添加appdata pannel
chrome.devtools.panels.create("custome",
"",
"custome.html",
function(panel) {
//console.log(panel)
}
)
</script>
</body>
</html>
manifest.json
{
"name": "wechat devtools extension",
"version": "1.1",
"description": "Extends the Developer Tools, adding appdata",
"devtools_page": "devtools.html",
"manifest_version": 2
}
custom.html
<html>
<head>
</head>
<body>
custom
</body>
</html>
if i use nw version 22.3 to run the project devtools will add the custom pannel
but when using nw version 23.5 the custom pannel doesn’t appear
use
nw23 . inspect
to show the inspect window
i see the following error tips
chrome-extension://clolcahimhommgjjmgkbkeccoihhkpfg/devtools.html Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
is there any mistake ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
How to Solve ERR_BLOCKED_BY_CLIENT - KeyCDN Support
An ERR_BLOCKED_BY_CLIENT error is commonly caused due to one of the extensions installed on the browser. Learn more about how to solve this ......
Read more >4 Ways to Fix the “Failed to Load Resource: net - Kinsta
Learn how to fix the "Failed to Load Resource: net::ERR_BLOCKED_BY_CLIENT" error. We'll show you 4 different methods to fix this error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OP’s sample is working with this build: https://dl.nwjs.io/live-build/07-24-2017/nw23-890b720-3f64365-bdcc2a7-93e37d9/v0.23.7/
The last commits fix regression. It will be available in the next nightly build and will be shipped with 0.34.0.