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.

node-remote does not recognize file:// scheme

See original GitHub issue

NWJS Version : 0.41.2 Operating System : macOS 10.15

Expected behavior

node-remote in manifest is said to support URL schemes ‘http’, ‘https’, ‘file’, ‘ftp’ (here: http://docs.nwjs.io/en/latest/References/Manifest Format/#node-remote).

Actual behavior

Setting node-remote: ["file://*"] (or any other file:// URL pattern) results in the following error on application startup:

Failed to load extension from: <--location-->.
Invalid value for 'app.urls[0]': Invalid scheme.

Setting it to ["*://*"] allows the application to start, but has no effect on file:// URIs. This may be related to https://github.com/nwjs/nw.js/issues/6860.

How to reproduce

This is a minimal package.json that reproduces the error:

{
    "name": "node-remote-issue",
    "main": "index.html",
    "node-remote": [
        "file://*"
    ]
}

Run nw in a directory containing this file.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rogerwangcommented, Dec 29, 2019

This is fixed in git and will be available in the next nightly build.

0reactions
liuyicommented, Nov 5, 2019

I resolved ths probem, like this: 1\set package.json “chromium-args”:“–disable-web-security’”

2\ Use window.postMessage('what your want to send",“*”) instead of javscript call.

That’s all. It works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manifest Format - NW.js Documentation
Every app package should contain a manifest file named package.json in the format of JSON. This document will help you understand the meaning...
Read more >
what is this "scheme don't have a registered handler" error?
I am working on a node app. i have an ejs file , where on clicking a button a get request ...
Read more >
Dell EMC NetWorker Administration Guide
THE INFORMATION IN THIS PUBLICATION IS PROVIDED “AS-IS.” DELL MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND. WITH RESPECT TO THE INFORMATION IN...
Read more >
Chapter 5. Naming
As it turns out, naming systems for human-friendly names are not ... In this case, we will also see an example where name...
Read more >
About Managing Power Scheme Settings - TechDocs
View power schemes data. You can use a predefined report to see the power scheme settings that are currently active on your Windows...
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