Video playback crashes app

I have created an app using Haxe, CreateJS, Electron. It all works very nicely prior to electron packaging. i.e. npm start = application works fine.

Once I package the application, the app crashes when it is playing video… i.e. run the exe, navigate to a section that plays video, application crashes. (window goes blank white, and is unresponsive. Devtools disconnects)

Any ideas on what could be the issue?

package.json

{
  "name": "hvdc2",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": 
   {
    "start": "electron ./bin",
    "package-win": "electron-packager ./bin --platform=win32 --arch=ia32 --out=./dist --overwrite=true",
    "package-osx": "electron-packager ./bin --platform=darwin --arch=x64 --out=./dist --overwrite=true"
  },
  "author": "Me",
  "license": "ISC",
  "dependencies": 
  {
    "electron-packager": "^7.0.4",
    "electron-prebuilt": "^1.3.8"
  },
  "bin": 
  {
   
  },
  "description": ""
}

Well, I managed to find a workaround this issue:

My application is based like so:

src
dist
node_modules
bin

inside of bin is where the source compiles to, and dist is where electron packages as an exectuable.

bin/app
bin/index.js
bin/package.json

where app holds all the real guts of the application (assets, config, index.html so forth)

Chances are that you will have a node_modules folder as part of your project. Drill into that folder and find the electron_prebuilt folder, drill further into the dist folder. Here you will find a copy of the core files you need for executing your application.

you will notice that the files here look very much like the files that are generated by the packager in your root dist folder. When you run the electron.exe file in this folder, it will tell you that you need to provide an application. Copy your app folder into the resources folder here, and run the electron.exe file. You will notice that your application runs perfectly.

So just use the files here as your application.

Hi. I ran in exactly the same problem. On windows the packaged application window did crash as soon as media playback was invoked. And that’s why: I did use a little utility (electron-packager-languages) to reduce the supported languages - so I was left with only one file in locales (de.pak). My windows system language is english but there was no en-GB.pak or en-US.pak in the folder. After adding all .pak files again everything works fine.

So this is just a not to myself and the next person having the same trouble.