electron-lets-move icon indicating copy to clipboard operation
electron-lets-move copied to clipboard

Can't move when app is download from web

Open runningdemo opened this issue 8 years ago • 14 comments

When package an electron app on local machine, it works. But when I upload the app to a web server and downloaded to Downloads folder it doesn't work. The password popup show correctly though.

Try this sample app. https://dl.dropboxusercontent.com/u/85873187/gethello/Stack-1.0.0-mac.zip

runningdemo avatar Jan 01 '17 15:01 runningdemo

Hey @liaa - it does appear that this example isn't working every time but I'm not sure if it's related to coming from a remote server or not…

Could you share the code snippet you used - preferably the entire main.js file if possible? Also make sure that you have logging on any errors that come out of the process - there is a likely some sort of file system or permissions error being produced.

tommoor avatar Jan 01 '17 16:01 tommoor

This is due to the Gatekeeper / translocation "security feature" as discussed here: https://github.com/potionfactory/LetsMove/issues/56

zone117x avatar Jan 30 '17 15:01 zone117x

Thanks @zone117x are you seeing this issue? I'd definitely like to get a fix in for that

tommoor avatar Jan 30 '17 16:01 tommoor

Any update @tommoor? I'd prefer to package my app with the 'move to applications folder' dialog over a dmg with drag to apps, but this issue makes it look like a dmg is probably more reliable.

Thanks for the great work.

davej avatar Feb 15 '17 00:02 davej

According to that thread there seems to be a way to delete the app from the original Download folder location using AppleScript https://github.com/potionfactory/LetsMove/issues/56#issuecomment-239017969

I played around with it a bit but couldn't get it to work - I don't know applescript.

zone117x avatar Feb 15 '17 00:02 zone117x

@davej there is work in progress on the develop branch. I'm not sure how long it will take to get to a releasable state - totally depends on what time I get.

Even if you decide to go the dmg route this is still will still be a good module to include otherwise users can double click the application on the mounted read-only DMG which is about as bad as launching it from the Downloads folder!

tommoor avatar Feb 15 '17 03:02 tommoor

Thanks for your work, much appreciated.

I'm also having issues with my app where it doesn't relaunch properly but remains in the menubar when I use electron-lets-move. I haven't had time to debug it yet but I'll create a new issue when I do that.

davej avatar Feb 15 '17 15:02 davej

I don't think it's because is download from web. I just packed my app and on sierra and is not moving the application when I click to move.

djalmaaraujo avatar Apr 07 '17 23:04 djalmaaraujo

@djalmaaraujo Yes, it's not because of download from the web. It's because of the downloaded file is in the ~/Downloads folder.

runningdemo avatar Apr 08 '17 00:04 runningdemo

@tommoor Can you give us some estimation on how to approach on this? I noticed your commits in the develop branch.

djalmaaraujo avatar Apr 27 '17 15:04 djalmaaraujo

Hey folks—it looks like this is still an issue on Mac OS High Sierra. It's really odd (just from a general user standpoint) that this fails after the admin password dialog.

image

Based on that LetsMove issue, it seems like it's possible to use AppleScript to strip the quarantine flag from the application (which... presumably would allow it to be moved? I'm not sure.) It seems like a real hack though!

bengotow avatar Oct 11 '17 18:10 bengotow

Yo @bengotow not sure if you noticed, but they included a new API in Electron to achieve this so this module has become a little redundant. I don't know if it's any better at dealing with this edge case though…

https://github.com/electron/electron/pull/10142

tommoor avatar Oct 11 '17 18:10 tommoor

@bengotow: moving to app folder is available in Electron core API now. Have you tried that? Or are you using this because you're pinned to an earlier version of Electron?

davej avatar Oct 11 '17 18:10 davej

Thanks folks! Will check that out. 👍

bengotow avatar Nov 28 '17 09:11 bengotow