Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on splash screen #3

Closed
wotori opened this issue Aug 13, 2020 · 11 comments
Closed

Stuck on splash screen #3

wotori opened this issue Aug 13, 2020 · 11 comments

Comments

@wotori
Copy link
Contributor

wotori commented Aug 13, 2020

Hello Alexander.
The ImageGrid stuck on splash screen after npm install inside ui (gen 4) and npm start
image
The issue apeear on linux and windows 10.
Any suggestions?

@wotori wotori mentioned this issue Aug 13, 2020
@flynx
Copy link
Owner

flynx commented Aug 13, 2020

Hi,

There are two common issues with startup:

  • a feature misbehaved on start -- this should be addressed by a watchdog that will start devtools in 5 seconds and force app startup in 15sec. if this does not happen then it's almost definitely the next issue:

  • the "sharp" module either failed to compile or compiled for the wrong version of node than the one used by electron, seg-faulting and taking down the UI thread -- you can either delete it (node_modules/sharp) and start the app without it, you'll lose the ability to generate full indexes with previews but you will be able to run the app and test out most of it... or you can try and semi-manually recompele the module by running electron-rebuild...

Tell me how it goes)

...I'm currently working on parts of the "external UX" so things may/will misbehave and there are several drastic changes coming in the following weeks :)

@flynx
Copy link
Owner

flynx commented Aug 13, 2020

My bad, I misread your original message, sorry....

You are slightly on the wrong track here, the magic words are not:

npm install
npm start

They are:

make run

...this is still a bug on my part, I should make npm complain explicitly ;) (FIXED: 323e1a9)

And as I said before, the initial build/run are a bit more complicated than they could be at this point, and I'm literally working on it =)


P.S. you are still likely to run into some issues, you'll need sed, fgrep and printf on your system, then make help and make check will be able to help...

@wotori
Copy link
Contributor Author

wotori commented Aug 14, 2020

Thanks for such a fast response.
I found that I need to install electron globally becouse of Makefile trying to catch it this way so I used the command:
sudo npm install -g electron --unsafe-perm=true --allow-root
then ...
make check
Everething appears to be ok.
image
Still got the same Issue, stuck on splash screen after make run.
Electron-rebuild finishing with errors using default settings.

Error log

`~/code/ImageGrid/ui (gen4)$ electron-rebuild
⠏ Building module: sharp, Completed: 0Attempting to build a module with a space in the path
See nodejs/node-gyp#65 (comment) for reasons why this may not work
✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@10.19.0 | linux | x64
gyp info find Python using Python version 3.7.6 found at "/home/ekza/anaconda3/bin/python3"
gyp info spawn /home/ekza/anaconda3/bin/python3
gyp info spawn args [ '/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/ekza/.electron-gyp/9.2.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/ekza/.electron-gyp/9.2.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/ekza/.electron-gyp/9.2.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp/build'
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
AR(target) Release/obj.target/../node-addon-api/nothing.a
COPY Release/nothing.a
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [sharp.target.mk:139: Release/obj.target/sharp/src/common.o] Error 2
make: Leaving directory '/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.0-42-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/electron-rebuild/node_modules/.bin/node-gyp" "rebuild" "--target=9.2.0" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
gyp ERR! cwd /home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Failed with exit code: 1

Error: gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@10.19.0 | linux | x64
gyp info find Python using Python version 3.7.6 found at "/home/ekza/anaconda3/bin/python3"
gyp info spawn /home/ekza/anaconda3/bin/python3
gyp info spawn args [ '/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/ekza/.electron-gyp/9.2.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/ekza/.electron-gyp/9.2.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/ekza/.electron-gyp/9.2.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp/build'
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
AR(target) Release/obj.target/../node-addon-api/nothing.a
COPY Release/nothing.a
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [sharp.target.mk:139: Release/obj.target/sharp/src/common.o] Error 2
make: Leaving directory '/home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/electron-rebuild/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.0-42-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/electron-rebuild/node_modules/.bin/node-gyp" "rebuild" "--target=9.2.0" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
gyp ERR! cwd /home/ekza/code/ImageGrid/ui (gen4)/node_modules/sharp
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Failed with exit code: 1
at SafeSubscriber._error (/usr/local/lib/node_modules/electron-rebuild/node_modules/spawn-rx/lib/src/index.js:267:84)
at SafeSubscriber.__tryOrUnsub (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.error (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:156:26)
at Subscriber._error (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:92:26)
at Subscriber.error (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:72:18)
at MapSubscriber.Subscriber._error (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:92:26)
at MapSubscriber.Subscriber.error (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:72:18)
at SafeSubscriber._next (/usr/local/lib/node_modules/electron-rebuild/node_modules/spawn-rx/lib/src/index.js:242:65)
at SafeSubscriber.__tryOrUnsub (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.next (/usr/local/lib/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:143:22)`

Have no succes even after rebuild with command that i found inside the 'Makefile' document with a little modification.

sudo npm i -g electron electron-rebuild asar less --unsafe-perm=true
No errors but still no results.
(Linux, Debian based)

@flynx
Copy link
Owner

flynx commented Aug 27, 2020

Hi,

This is not an answer yet, just an update....

Took me some time but I think I'm able to reproduce the error.

Can you give me the electron versions you are using:
$ electron -v
and
$ ./node_modules/.bin/electron -v
(Note that they can be and likely are different)

and just n case also:
$ node -v


UPDATE: as a temporary (older version of electron) fix this should help:

$ rm -rf ./node_modules/
$ git pull
$ make run

...tell me if it does =)

@flynx
Copy link
Owner

flynx commented Aug 30, 2020

Hi,

Now most of the issues with the setup/build should be fixed, tell me how it goes, if all is well this issue should be resolved =)


P.S. we're still not compatible with electron v10 but make should now know how to take care of that.

@flynx
Copy link
Owner

flynx commented Sep 4, 2020

Since I can no longer reproduce this issue I'm counting it as closed.

If there is a confirmed fail case I'll re-open it.

@flynx flynx closed this as completed Sep 4, 2020
@wotori
Copy link
Contributor Author

wotori commented Jan 25, 2022

still don't work out of the box.

% git clone https://github.com/flynx/ImageGrid/
% cd ImageGrid/Viewer/
% npm install
% make run

If I press the splash screen It closes and several errors in console window appears
image

Any suggestions?

Node v16.13.2
Ubuntu 20.04.3 LTS

Update:

% make check
image
tried under zsh and bash

Update:

tried with all this node versions and still no success

         v4.9.1
->      v8.17.0
       v12.22.9
       v14.18.3
       v16.13.2

@flynx
Copy link
Owner

flynx commented Feb 8, 2022

Just reworked this some days ago -- now make run should do everything (tested on both Fedora and Windows)...

...if a clean make run gets confused run make dev before it...

Tell me if it runs now?

@wotori
Copy link
Contributor Author

wotori commented Feb 8, 2022

If`s finally works!
Thanks Alexander.
For a long time wish to try your tool.
Now I have to figure out how to import images... ))

update:
drag&drop does the import trick

@flynx
Copy link
Owner

flynx commented Feb 8, 2022

Drag&drop is not a very good idea in the app, at this point -- If I remember correctly, ig will not pickup the image path this way (d&d was implemented for the browser quite a long time ago)....

To open a directory:

Use the hamburger menu is top-left -> File -> Browse file system... or simply hit O in the main window (i.e. [O]pen)

To access the opened path history type ctrl-h

P.S. note the keyboard shortcut hints in the menu and for a more extensive keyboard shortcut list type ? in the main window....

@flynx
Copy link
Owner

flynx commented Feb 8, 2022

If I remember correctly, ig will not pickup the image path this way (d&d was implemented for the browser quite a long time ago)....

...just checked, yep, the app does not pickup the base path of dropped set of images, need to think about this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants