Skip to content

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

Closed

Description

@btelintelo

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.

Activity

  1. mdiep commented on Feb 9, 2016

    @mdiep
    Contributor

    bricks computer

    That's not what brick means.

  2. 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[/+] on Feb 9, 2016
  3. btelintelo commented on Feb 9, 2016

    @btelintelo
    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

  4. emorikawa commented on Mar 11, 2016

    @emorikawa

    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

  5. joshaber commented on Jun 1, 2016

    @joshaber
    Contributor

    Seems similar/a dupe of #151.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions