0.13 beta4 - devtools / source not found when clicking links from console #4269
maxbarry posted onGitHub
In beta4 on Ubuntu 15.10 64-bit, clicking a link to source from the console opens a new ERR_FAILED browser window with "This webpage is not available," rather than displaying the source within devtools:
package.json:
{
"name": "sample",
"main": "index.html"
}
index.html:
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<script>
nw.require('./myModule.js');
</script>
</body>
</html>
myModule.js:
console.log("Hello.");
To reproduce:
- Run
nwjs-sdk-v0.13.0-beta4-linux-x64/nw .
- Right-click -> "Inspect background page"
- See output:
Hello. /home/max/code/sports/test/myModule.js:1
- Click link to source
Result: New window opens. URL is "chrome-devtools://devtools/home/max/code/test/myModule.js". Title is "chrome-devtools://devtools/home/max/code/test/myModule.js is not available - NW.js". Content is: "This webpage is not available | ERR_FAILED | The webpage at chrome-devtools://devtools/home/max/code/test/myModule.js might be temporarily down or it may have moved permanently to a new web address."
Notably, this only happens when myModule.js is included in the above fashion. If instead index.html includes it like this:
<script src="myModule.js"></script>
... then it works, except that it doesn't seem to correctly link to the right line number, and the output must be viewed via "Inspect" rather than "Inspect background page".