Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app.moveToApplicationsFolder() fails unexpectedly when running in a disk image #12869

Closed
javan opened this issue May 9, 2018 · 4 comments
Closed

Comments

@javan
Copy link
Contributor

javan commented May 9, 2018

  • Electron Version: 2.0.0
  • Operating System: macOS 10.13.4

Expected Behavior
Calling app.moveToApplicationsFolder() when an application is launched from a disk image (.dmg) should move the application from the disk image to the Applications folder.

Actual behavior

  • Finder alerts The item can't be moved to the Trash because it can't be deleted.
  • The application stops responding and must be force quit
  • The application is partially (?) moved to Applications, but internally its paths still reference the disk image (e.g. /private/var/folders/52/zh03bcd5tx…/…/…/…/…/Contents/Resources/app.asar)

See video: https://cl.ly/2i0u131q0D1a

Additional Information

  • app.moveToApplicationsFolder() works as expected when the app isn't in a disk image (and not in the Applications folder).
  • I tried try / catching the invocation and logging any errors with no success. There's either no error or the application becomes unresponsive before reaching the catch branch.
  • Here's the after-force-quit crash dump log: https://gist.github.com/javan/50208efe1bfa738d09605b0c980a557e
@javan
Copy link
Contributor Author

javan commented May 9, 2018

My implementation is basically just:

if (!app.isInApplicationsFolder()) {
  const button = dialog.showMessageBox()
  if (button == 0) {
    app.moveToApplicationsFolder()
  }
}

@javan
Copy link
Contributor Author

javan commented May 9, 2018

@MarshallOfSound, I see some disk image conditions in #10142. Perhaps they're not quite right?

@codebytere
Copy link
Member

codebytere commented Oct 7, 2018

@javan unfortunately this is a problem with upstream (we ported this functionality from LetsMove) which doesn't seem to have a potential solution at present 😞

@sofianguy sofianguy added blocked/need-info ❌ Cannot proceed without more information and removed blocked/need-info ❌ Cannot proceed without more information labels Aug 9, 2019
@sofianguy
Copy link
Contributor

Closing this issue as this is not something we can fix, according to the comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants