10

At the moment, I am developing a "kiosk" application for my Raspberry Pi. I decided to use Electron as it offers the key feature I need: Combining a web based UI with direct system an I/O access via node.js.

However, Electron refuses to run on my Raspberry Pi whereas it works just fine on the computer I am using for development. Nothing happens after issuing electron . in the terminal, the program just exits without showing a window or any errors in the command line. Any clues? I couldn't find any on the web so far. I installed Electron via npm install electron-prebuilt -g, which downloaded and installed the latest ARM-version.

If this is an unresolvable compatibility problem: Are there any good alternatives for Electron?

Thanks in advance!

6
  • I have the exact same issue. Did you manage to find a solution for this by now? Commented Aug 17, 2015 at 13:30
  • Unfortunately, I couldn't find a solutution yet - I'm still working on it Commented Aug 17, 2015 at 13:40
  • Can you elaborate a bit on your setup? Which distribution to you use? How did you install nodejs? Which version of nodejs have you installed? Commented Aug 17, 2015 at 13:44
  • I use the Raspbian distribution as it was installed already for previous projects. Then I installed electron via the node package manager which I did successfully on my working machine as well. Nevertheless, (for private reasons) I won't be able to investigate this issue any further during the next two or three weeks. A recent suspicions is that there is just not enough RAM in order to execute Electron. Commented Aug 17, 2015 at 20:16
  • 2
    I tried it at home today with a newer raspbian version and a 16GB SD Card. The examples taken from github.com/hokein/electron-sample-apps now work for me. So it's either free space or the newer raspbian version. Commented Aug 18, 2015 at 13:49

4 Answers 4

6

Unfortunately the reason for that error is that Electron currently does not support ARM devices. We will have to wait until it is implemented

See this issue https://github.com/atom/electron/issues/1702

-- Update

As noted by @skeggse, Electron now does support ARM.

  • 1 Get the dependecies going apt-get install libgtk2.0-0 libnotify4 libgconf2-4 libnss3 node npm

  • 2 Download the latest arm release called electron-...-linux-arm.zip from here

  • 3 unzip electron-...-linux-arm.zip

  • 4 go inside the folder and double click the file named electron

  • 5 Have fun!

Sign up to request clarification or add additional context in comments.

1 Comment

I don't think that's right - that issue is closed, and if you follow the issue chain you find #2094 which indicates that they cross-compile for ARM. It's entirely possible that their ARM cross-compile is incompatible with RPi, in which case (as @user650881 noted), you should compile from source.
1

Depending on which Raspberry Pi you have it may be an incompatible binary. The electron prebuilt binaries, I believe, target armv7-hf. Try building electron from source. The instructions can be found here https://github.com/atom/electron/blob/master/docs/development/build-instructions-linux.md

Note that if you are interested in using hardware float support (at least prior to RPiB+) you might want to run Raspbian or another port with hard-float support. (ref)

1 Comment

Build Electron, directly on an rPi? Prerequisites: At least 25GB disk space and 8GB RAM.
1

Connect to Raspberry SSH as user pi, and execute this:

# Clone this repository git clone https://github.com/electron/electron-quick-start # Go into the repository cd electron-quick-start # Install dependencies npm install # Set display export DISPLAY=:0 # Run the app npm start 

1 Comment

the problem is this part: export DISPLAY=:0 thanks mate :)
0

This is a pretty broad question. You could try stopping on the first line of your application with:

electron --debug-brk=5858 . 

This would help you determine whether it's an electron issue or an issue with your app.

http://electron.atom.io/docs/v0.30.0/tutorial/debugging-main-process/

1 Comment

electron --debug-brk=5858 . produces no output as well. But I don't think it has to du with my app due to its simplicity (Just opens a window with a basic angular js app at the moment). Thanks for your help!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.