Packaged Electron app (.exe) crashes silently, runs fine via command line - windows

Running my Electron app via command-line works fine, but when I double-click the .exe of the packaged app, nothing happens other than my cursor doing a quick "busy" animation. I assume my app is silently crashing.
Is there a way I can get an error message or a crash report from the .exe to help me see what's going on?
From the root of my app directory, both these methods result in my app running fine:
node_modules\.bin\electron.cmd .
electron-packager .
node_modules\.bin\electron.cmd my_app-win32-x64\resources\app
Environment
OS: Windows 10 Anniversary x64
Node: 4.3.1
Npm: 1.14.12
Local electron: 1.4.3
Local and Global electron-packager: 8.1.0
electron-rebuild (for native module "serialport"): 1.2.1

This was not an Electron problem. This was my app trying to access a path relative to process.cwd(), which, when double-clicking the .exe file in the output folder, was not the expected one.
I was able to debug this by running the .exe from the command line, instead of double-clicking the .exe:
my_app-win32-x64\my_app.exe
This causes console.log() output to be visible in the command prompt, which allowed me to finally see the exception that was occurring.

One way to debug such issues is to open a terminal or cmd and drag the exe to it or launch the exe from the terminal or cmd. this will print any uncaught error the app might be throwing.

This can be an issue with paths if you're spawning sub processes - you can use https://github.com/jonluca/node-fix-path to fix the paths on linux and macos

Related

Flutter .exe Release not running on Windows

When I build flutter for windows with flutter build windows it generates a .exe file with its .dll files etc. However, running that file (.exe) gives me a white screen and my app is not running normally.
Running flutter run --release -d windows however builds my app normally and I can use it.
What is wrong here that running the .exe file is not starting my app properly?
This is my release folder structure when running flutter build windows:
Running the .exe file:
I was using sqflite_common_ffi on Windows and this was causing the issue. Initializing it was only valid for debug thus I had to add the sqlite3.dll to the release build folder. Then it worked fine like before when starting the .exe file.
Detailed description can be found here: https://github.com/tekartik/sqflite/issues/574

Unable to run a dart program inside VS code

I am new to Dart/flutter. I have installed flutter SDK and VS Code on windows 10 machine, updated the system path, run flutter doctor, which shows that flutter is indeed installed (flutter doctor output). I read that installing flutter is enough, and I don't have to install Dart SDK too, as it comes build in with flutter (please correct me if I am wrong).
I wrote a very short Dart code for testing, but I couldn't run it from VS Code terminal (run in terminal output), as it returns the following error: "bash: dart: command not found".
But when I debug the code in VS Code, it returns the expected output (debug output).
Can someone please explain to me if I am doing something wrong, or if I am missing something? Why can't I run the program from the bash terminal?
Thanks
You should enter the full path directory instead of file name. For doing so right click on the dart file then choose Copy Path.
Then run following code on terminal:
dart (paste main file path)
For more information about creating and running Dart console application using VSCode please check out THIS answer.

Nuget.exe crashes when invoked from cmd.exe

I'm trying to automatically download Nuget.exe from a Rakefile, in order to minimize the amount of initial setup needed to run my samples on GitHub.
I've understand how to download a file (I'm using HTTParty) and how to save a binary file (using the b flag on File.new) but now I've got problem running Nuget.exe. In particular:
if I launch it directly or from PowerShell, the executable runs fine;
if I launch it from cmd or from a Rakefile (which in turn runs cmd), Windows tells me that the program "stopped working".
I reproduced the same behavior with the Nuget bootstrapper, so I thought that the cause was some configuration in my computer.
It then occured to me that I installed ansicom, a library to handle ANSI sequences. I disabled it and then Nuget started without any problem.

running SWF from the command line and getting trace output to the console

On windows 7, I installed Flash Builder 4.7 and got the Flex SDK with it (4.9.1, I think). I'm now compiling .as files on the command line. I'm running the resulting SWF files with FlashPlayerDebugger.exe (that came with my trial of Flash Builder 4.7). I'd like to see trace() output on the cmd.exe window, but I don't know how. If I should be using a different way to run the SWF files (perhaps sending them to a browser?) let me know.
You can use the command line debugger, fdb to see console output.
First, compile a debug SWF:
mxmlc -debug=true myApp.mxml
Then launch the debugger:
java -jar ../lib/fdb.jar
Then you can either launch your app in the standalone Flash Player or in a browser. When you see the (fdb) prompt, use the run debugger command to start your app. You have several choices:
run <path to SWF> (launch SWF in the standalone Flash Player)
run <url to SWF> or run <path to HTML file that embeds SWF> (launch in browser)

force TideSDK debug console window to stay open on windows

I'm trying to debug a HTML5/javascript application that uses the TideSDK (1.2.0RC4). I can run the build script and create an executable and start it with <appname>.exe --debug. The executable starts and opens a separate console window with log output, than exits with an error code and closes the console window. I've got no idea what went wrong because I can't see the log output. How do I force the window that contains the log output to stay open? I dimly remembered cmd /k ... but that doesn't work. Anyone any pointers?
Checkout TideSDK 1.3.1-beta available for download at http://tidesdk.org
The earlier version is not supported.

Resources