question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nw version 23.5 -load-extension :ERR_BLOCKED_BY_CLIENT

See original GitHub issue

package.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:closed
  • Created 6 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
rogerwangcommented, Jul 24, 2017
0reactions
rogerwangcommented, Oct 15, 2018

The last commits fix regression. It will be available in the next nightly build and will be shipped with 0.34.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found