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.

nwjs taskbar icon on Windows for NW.js is a red square, can't set icon in package.json

See original GitHub issue

NWJS Version : 0.42.5 SDK version Operating System : Windows 10 (x64)

Expected behavior

You should be able to set the icon associated with NW.js using the provided method of setting “icon” in the “window” section of the package.json file.

Actual behavior

The icon associated with the NW.js application is a red square and cannot be set using the provided methods in the package.json. See screenshot in the comments below.

How to reproduce

Download 0.42.5 SDK for Windows x64 and set your package.json to be like:

NOTE: This is not a path problem as it works fine in 0.40.

{
  "name": "app-name-here"
  "main": "index.html",
  "window": {
    "icon": "image.png"
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:30 (9 by maintainers)

github_iconTop GitHub Comments

9reactions
rogerwangcommented, Nov 28, 2019

I managed to reproduce it in another system. This is now fixed in git and will be available in the next nightly build.

2reactions
frankhalecommented, Nov 24, 2019

I don’t think a sample is really needed of my icon because the same icon works fine in NW.js 0.40.0 and in much older releases. I’ve been using the same icon for my app for a lot of years.

Here is my icon:

toby

Just running NW.js demonstrates the behavior. Here is a screenshot of it. Notice that the task bar icon is a red square. When you attempt to set the icon in the package.json it doesn’t work.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change taskbar icon in NW.js? - Stack Overflow
It's in the right place package.json:window:icon. The problem is the path where your icon.png is located. Change to something like ...
Read more >
NW.js v0.42.6 Released
... window size limit in package.json don't work in some cases (#7248); nw2: taskbar icon on Windows for NW.js is a red square,...
Read more >
How To Add Taskbar Icon To Node Webkit Application
This lets you open NW.js, then immediately launch the Webkit Developer Tools, ... icon on Windows for NW.js is a red square, can't...
Read more >
All of the Documentation | Electron - GitHub Pages
app. Control your application's event lifecycle. Process: Main. The following example shows how to quit the application when the last window ...
Read more >
Chapter 2. Laying the foundation for your first desktop ...
Building a file explorer in both NW.js and Electron; Setting up your application; ... cd lorikeet-nwjs touch package.json. Running on 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