Search code examples
javascriptnode.jsjsonpackage.jsonnode-webkit

Node.js nwjs package compilation error: Invalid file descriptor to ICU data


I'm trying to create my first package with nwjs, so I created a simple app with only nwjs module installed locally with npm. My app main file has only a console.log("Hello World!"). I zipped the app files - keeping them in the root - and renamed to app.nw. I basically followed this doc. The package tree is the following:

app.nw 
 - node_modules
   - nw (and all its files inside)
 - package.json
 - app.js

And my package.json is:

{
  "name": "app3",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "window": {
  // Some properties here
  }
}

Then I created an empty folder and copied app.nw to it. From the module folder /nw/nwjs I copied the files: nw.exe, nw.dll, nw_elf.dll and ffmpeg.dll to it, and dragged app.nw over nw.exe. The debug.log file shows me the following error:

[0524/110408:ERROR:icu_util.cc(157)] Invalid file descriptor to ICU data received. [0524/110408:FATAL:icu_util.cc(260)] Check failed: result.

I can't find anything related to this error and this tool over the web. I'm running it in a Win7 x64. I also tryied downloading nwjs manually from github and tryied with x64 and x86 binaries, but they all give me the same error.

Below, the backtrace if needed:

v8::OutputStream::WriteHeapStatsChunk [0x000007FEDA1B7AB1+225089]
std::vector<v8::CpuProfileDeoptFrame,std::allocator<v8::CpuProfileDeoptFrame> >::operator= [0x000007FEDA1640BC+259612]
v8::OutputStream::WriteHeapStatsChunk [0x000007FEDA1F2E58+467688]
v8::Extension::auto_enable [0x000007FEDA1203D1+368897]
v8::Extension::auto_enable [0x000007FEDA11ED19+363081]
ChromeMain [0x000007FED9CE0EB5+133]
GetUploadedReportsImpl [0x000000013F201251+3297]
GetUploadedReportsImpl [0x000000013F20097F+1039]
IsSandboxedProcess [0x000000013F264628+231640]
BaseThreadInitThunk [0x0000000076C359BD+13]
RtlUserThreadStart [0x0000000076E6A2E1+33]

What am I missing here?


Solution

  • I got it to work with the following package.json:

    {
      "name": "app4",
      "version": "1.0.0",
      "description": "",
      "main": "index.html",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "single-instance": true,
      "package": ".json",
      "window": {
        "title": "app4",
        "toolbar": false
      }
    }
    

    I'm actually not sure what specific property which I removed/added to made it to work. Then I zipped it to package.nw and put in the same folder as nw.exe to run it.