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

Update process breaks app when double clicking and opening the app #163

Closed
btelintelo opened this issue Feb 9, 2016 · 4 comments
Closed

Comments

@btelintelo
Copy link

Here is what I'm seeing...please tell me why I'm crazy.

  1. User downloads my electron app on mac which has squirrel auto updating.
  2. Instead of dragging app to applications, user double clicks the app to open.
  3. Once open, an message pops up that says "An update is ready to install....type your password to allow this."

Typing the password does nothing, the app doesn't update. Now, if the user just double clicks to open, I wouldn't expect them to be able to auto update, the app isn't installed properly.

The issue I see is that in the com.electron....ShipIt directory, when the user double clicks to open, 2 logs files get written: ShipIt_stderr.log and ShipIt_stdout.log. But they get written as root, while ShipItState.plist is written as the currentuser. I can only guess that this is the reason for the popup asking for a password, because if you install the application normally, those two log files are owned by the current user, and the update process works fine. The terrible thing about this is, if a user double clicks and opens, then later installs the app normally into the applications directory, the app is still bricked from performing updates. Those two log files are still owned by root. And, to make matters slightly worse, the ShipIt helper process crashes and respawns itself every 2 seconds forever, even after the user close the app.

So I would hope there is some kind of fix for the issue. Once a computer gets in that state, you have to sudo rm the log files after killing the ShipIt process. NOT something I would want to tell anyone to do to resolve an issue.

@mdiep
Copy link
Contributor

mdiep commented Feb 9, 2016

bricks computer

That's not what brick means.

@mdiep mdiep changed the title Update process bricks computer when double clicking and opening the app Update process breaks app when double clicking and opening the app Feb 9, 2016
@btelintelo
Copy link
Author

Here are the errors every 2 seconds in stderr: Installation error: Error Domain=SQRLShipItRequestErrorDomain Code=2 "Could not read update request" UserInfo={NSLocalizedDescription=Could not read update request, NSUnderlyingError=0x7f9f81703c40 {Error Domain=NSCocoaErrorDomain Code=260 "The file “ShipItState.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/var/root/Library/Application Support/com.electron.ShipIt/ShipItState.plist, NSUnderlyingError=0x7f9f81703450 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
2016-02-08 16:46:57.969 ShipIt[52971:580078] ShipIt quitting

@emorikawa
Copy link

Yes, I get the same behavior, and yes it permanently keeps people who do this on old versions!

I put more info about this on this related issue here: #151

@joshaber
Copy link
Contributor

joshaber commented Jun 1, 2016

Seems similar/a dupe of #151.

@joshaber joshaber closed this as completed Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants