I want to use electron js in order to build a desktop app, which will run on a Raspberry Pi 3B. I'm developing the app on my macbook. There, I can use the command electron . without any problems. If I try to start the electron-quick-start app, the following happens:
I execute the following command in the terminal in the directory of electron-quick-start: electron .
The electron window opens with the correct background color
No html content is shown
I tried building the app with the electron-packager for the armv7l architecture and running it on the raspberry pi. This works, but it is a tedious task to build the app every time to test it on the Raspberry Pi.
Do you have any ideas, why the electron . command doesn't work?
UPDATE: I started debugging the main.js file:
webContents.on('did-start-loading', function() {
console.log('did-start-loading');
});
webContents.on('did-stop-loading', function() {
console.log('did-stop-loading');
});
webContents.on('did-finish-load', function() {
console.log('did-finish-load');
});
webContents.on('did-get-response-details', function(e, status, newUrl) {
console.log(newUrl);
});
And I get the following response:
did start loading
did stop loading
UPDATE 2:
I uncommented the mainWindow.webContents.openDevTools() line, so actually the chromium dev tools should start, but they don't...
Thanks for your help.
After the debugging and the fact, that the developer console wasn't working, I quickly came to the conclusion, that chromium is crashing.
I thereafter found this issue in the electron github repository:
https://github.com/electron/electron/issues/12850
It looks like the used version in the electron-quick-start demo (1.8.x) is not working on ARM processor. The version "2.0.0" works again.
Related
I've created a simple game using Phaser on vscode.
I read that i need to run it locally in order to run it on chrome and i can't manage to do so using vscode's F5.
when im on "index.html" and pressing F5 it pops out an alert box that says "cannot find progrem to debug".
pressing F5 while im on any other file causes a error in the debugger "window is not defined"(when im on phanser.js)/"Phaser is not defined"(when im on any other file)
how can i start this program correctlly ? sorry for the basic question .
http-server works just fine. But if you want to debug the game easily. You might want to follow the steps in this post: https://divillysausages.com/2015/06/09/using-phaser-with-visual-studio-code/
It is an instruction for setting up Typescript phaser development in vscode, but the steps that teach you how to set up node server also applies to a javascript usage case. If you want to make it easy to debug(pause code executing while game running, etc.) Try to set it up in that way.
Had to install http-server from npm and run it in terminal.
tried it before, but accidently installed it not globaly.
now it works. thanks!
I am trying to clear app's data from several emulators, in a loop inside a bash script.
Doing so from the terminal indeed clears the app's data, but doing so from a bash script will also uninstall the app from the emulator and close the emulator's window (UI).
I don't want my app to be uninstalled as i need to test it.
Is there a reason that this command works differently when executed from terminal vs. when executed from bash script? When executing from a script against a real device it works perfectly as it should - clear the app's data without uninstalling the application from the device.
I found the answer.
When the emulator is open (with GUI) - the command will work as it should, that is clear the app's data.
When the emulator is open without GUI - the application will also get uninstalled.
I am trying to make my raspberry pi open a set of page's automatically when i start it up in the morning but unfortunately i can't get it to work
i already have the links in chromium so if chromium can start automatically and get to the full screen mode it is solved
so the only thing that needs to happen is to automatically start up chromium
i tried to use Kiosk for it but it gave me a lot of trouble
this is the code i have right now
#chromium-browser --kiosk
If u want to start your browser in fullscreen mode at boot use the following line in terminal to edit the startup file. (if you're already in root then u dont have to use sudo)
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
Then add the following to the startup file.
For using chromium
#chromium-browser --start-fullscreen
It is basically the same as pressing f11 but then automatically.
If u want to add an URL to this u can do that in-between the command and the argument like this.
#chromium-browser http://localhost --start-fullscreen
This will launch the browser in fullscreen in the requested URL.
I have python 2.7, android view client, adb environment setup in my PC. Also I have connected my android device with culebra tester installed in it and performed some Test case steps to record script (Java/python). Now I have the recorded script ready. Can any one tell me the right procedure to re-run the recorded script in the same android device automatically, because culebra tester doesn't have any option to re-run the test case. Any inputs would be appreciated.
Once you have generated your test script (if you selected python as the code generation language), you download it, rename it (it is downloaded as .py.txt to avoid browser warnings) and then you can run it as any other AndroidViewClient/culebra script.
You need python and androidviewclient installed via pip or easy_install.
If you generated java code, then you copy or paste the code to your Android Studio project, create the APK, install and run.
What I'm doing
I am using the instructions on this page to generate a Hello World extension for Visual Studio Code. I've generated the extension using Yeoman and am now simply trying to launch the hello world extension in an Extension Host instance of VSCode using the debugger by hitting F5.
The problem
I am receiving a notification at the top of the original VSCode window that reads, "Error cannot connect to runtime process (timeout after 3000ms) launch.json | Close".
This error appears slightly before the Extension Host window opens.
Once the extension host window opens, it spins a bit and then shows this warning at the top of its window:
The warning reads, "warn plugin host did not start in 10 seconds, it might be stopped on the first line and needs a debugger to continue | Close".
Seems like I just need some way of making the runtime timeout longer but I haven't found out how to do this.
My environment:
OSX 10.10.5 Yosemite
Node 0.12.7 or 4.2.1 (I've tried both)
Visual Studio Code 0.10.1
EDIT: This only happens when using Typescript in the Yeoman generator. I tried the Javascript version and it works fine.
Given that this seems to be a bug, I've opened this Github issue with the code yeoman generator.
It's simple but I spent 1 hour to find the issue.
I think mistake I did is first I created launch json and installed chrome debugger and then I modified launch.json for chrome launch so did not work.
So I tried below and it worked.
Deleted launch.json and reinstalled chrome debugger extension and
restart visual studio code and create lanch.json after these steps it worked :)
Try it may work.
This happens to me as well. I simply reload the extension by pressing F5 again and it usually works. Rarely it will fail twice in a row and then will work on the third time.
Not really a "solution" to the problem, but it's worked so far.
Find %VSCodeHome%\resources\app\extensions\node-debug\out\node\nodeDebug.js and change wait time in line 203.
// try to attach
setTimeout(function () {
_this._attach(response, port, 3000);
}, 2000);
into time working for you, like:
// try to attach
setTimeout(function () {
_this._attach(response, port, 10000);
}, 2000);
Worked for me.
Accessing the Internet through a proxy may also cause this. It's due to the source map downloader doesn't use your proxy, so the download always times out after attempting to connect for a long time.
For those who encounter this, try the workaround here.
I am also running into this same error, but I'm seeing this with the example language server example repo that's in the documentation: https://github.com/Microsoft/vscode-languageserver-node-example