Skip to content

Electron build path issue #54

@birchb

Description

@birchb

This code, which works in a dev build, throws a path error in a production build:

      const options = { input: file.path, output: '../video_crunched.mp4', width: 1280, height: 720 }
      hbjs.spawn(options)
        .on('error', err => {
          console.log('Error: ', err)
        })
        .on('progress', progress => {
          console.log(
            'Percent complete: %s, ETA: %s',
            progress.percentComplete,
            progress.eta
          )
        })

This is the error:

      Error:  HandbrakeCLINotFound: HandbrakeCLI application not found: /Users/birchbrowning/Development/video_test/dist/electron/Video Cruncher-darwin-x64/Video Cruncher.app/Contents/Resources/bin/HandbrakeCLI. Linux users must install HandbrakeCLI manually, please see https://handbrake.fr/downloads.php.
    at i._run (file:///Users/birchbrowning/Development/video_test/dist/electron/Video%20Cruncher-darwin-x64/Video%20Cruncher.app/Contents/Resources/app.asar/js/vendor.js:11:53007)
    at file:///Users/birchbrowning/Development/video_test/dist/electron/Video%20Cruncher-darwin-x64/Video%20Cruncher.app/Contents/Resources/app.asar/js/vendor.js:6:97230
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

process.platform = darwin
process.arch = x64

I tried some of the edits referenced in an early issue, but they also resulted in various errors. I can try again and document those, if it would help.

Note: I'm using Quasar, and found the suggestion asar: false in one of the forums. When I did that, I ended up with a app folder the did include HandbrakeCLI, but the path was still incorrect. Again, I can go back and recreate that if it will help.

I will happily pay a beer bounty if you can help me figure this out!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions