Electron-packager: Send packaged app via Email

Created on 4 Apr 2017  路  5Comments  路  Source: electron/electron-packager

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Command line arguments

electron-packager . --overwrite myApp --platform=darwin --arch=x64

Just trying to figure out how to send this app via email.. Gmail does not let me attach it. Thank you in advance!

question

Most helpful comment

@Bharwcb That error is because on newer version of macOS gatekeeper launches your app in a virtual read only file system area. So you can't write to __dirname or app.getPath() or anything like that. All files should be written to os.tmpdir() or you get that error 馃憤

All 5 comments

You would zip up the myApp.app "app" _(it's really a folder)_ inside the myApp-darwin-x64 out directory and then attach that zip file.

Thanks @malept .. really appreciate it.

Actually @malept, do you have any experience in errors after sending a packaged electron app?

I'm getting the error: EROFS: read-only file system, mkdir '/private/var/folders/.../myApp.app/Contents/Resources/app' at Object.fs.mkdirSync

So something about sending the packaged app does not allow the mkdirSync function to run.

I'm not a macOS expert, but if I had to guess, it's one of two things:

  • You're trying to run an app directly from the email, instead of saving it somewhere first. I can't imagine macOS lets you do that.
  • macOS sandboxing is preventing you from doing that.

@Bharwcb That error is because on newer version of macOS gatekeeper launches your app in a virtual read only file system area. So you can't write to __dirname or app.getPath() or anything like that. All files should be written to os.tmpdir() or you get that error 馃憤

Was this page helpful?
0 / 5 - 0 ratings