Nw.js: OSX only crash: no suitable image found.

Created on 22 May 2018  路  10Comments  路  Source: nwjs/nw.js

======== TEMPLATE BUG FORM ========

NWJS Version : 3.5.4
Operating System : OSX 10.13.4

Expected behavior

See the NWJS window after start.

Actual behavior

NWJS complains: no suitable image found / file too short. There is never a window.

======== Running on http://0.0.0.0:9999 ========
(Press CTRL+C to quit)
runtime process (0x1142427f0) stopped (-6), stdout:
dlopen /Users/lucas/Library/Application Support/webruntime/temp_apps/nw_1526472028_1~20020/pywebpoc-ui.app/Contents/MacOS/../Versions/66.0.3359.170/nwjs Framework.framework/nwjs Framework: dlopen(/Users/lucas/Library/Application Support/webruntime/temp_apps/nw_1526472028_1~20020/pywebpoc-ui.app/Contents/MacOS/../Versions/66.0.3359.170/nwjs Framework.framework/nwjs Framework, 257): no suitable image found.  Did find:
    /Users/lucas/Library/Application Support/webruntime/temp_apps/nw_1526472028_1~20020/pywebpoc-ui.app/Contents/MacOS/../Versions/66.0.3359.170/nwjs Framework.framework/nwjs Framework: file too short
    /Users/lucas/Library/Application Support/webruntime/temp_apps/nw_1526472028_1~20020/pywebpoc-ui.app/Contents/Versions/66.0.3359.170/nwjs Framework.framework/nwjs Framework: file too short
^C[20019] LOADER: Back to parent (RC: 1)
[20019] LOADER: Doing cleanup
[20019] LOADER: Freeing archive status for /Users/lucas/Projects/Feathercoin/pywebpoc/dist/pywebpoc

How to reproduce

We want to use NWJS with Python (and PyInstaller). Here is our small PoC where we are trying the setup:
https://github.com/Feathercoin-Foundation/pywebpoc

You can run it by creating a pipenv and build it with the script:

pipenv install
pipenv shell
./build.sh
./dist/pywebpoc

It works on Windows.

Any input is welcome. Downgrading didn't help (as described in https://github.com/nwjs/npm-installer/issues/56).

P2 bug triaged

All 10 comments

Thanks for reporting. I believe this is an issue in the package tool, not NW.js. Could you please check asap @Christywl ?

@rogerwang , according to the steps above, I try this on Mac, can reproduce this issue.

Thanks for the quick answers and testing.

@rogerwang I can well imagine the problem being with the way we package it. Any input regarding that would also be very welcome. I've tried all kind of different things without success so far unfortunately.

It looks like a known issue that the symlinks in the official zip package is lost during packaging.

I also tried with 0.21.1 and 0.22.1 which should not have the symlink change according to various comments but that didn't help.

What could a workaround for this be ?

When I run ./dist/pywebpoc it failed with:

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from webruntime import launch
ModuleNotFoundError: No module named 'webruntime'

Did you run

pipenv install
pipenv shell

first to install the necessary dependencies?

yes I did.

Ok, that's strange. webruntime should get installed by "pipenv install".
You can also try with pip install webruntime

Is there anything I can help with regarding this issue ?

Was this page helpful?
0 / 5 - 0 ratings