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

AutoUpdate Error code = 13 Permission Denied #209

Closed
dsagal opened this issue Jul 19, 2017 · 9 comments
Closed

AutoUpdate Error code = 13 Permission Denied #209

dsagal opened this issue Jul 19, 2017 · 9 comments

Comments

@dsagal
Copy link

dsagal commented Jul 19, 2017

Copied from electron/electron#9752


Hi, currently I am having problem with the autoupdate in electron application. Here is the case.

The application is able to check for update and successfully downloaded the update
The application quits and re-launch however the version is not updated
I checkout into the ShipIt_stderr.log and here is what I got

2017-06-14 11:32:15.589 ShipIt[44423:915887] Beginning installation
2017-06-14 11:32:23.460 ShipIt[44423:915887] Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo={NSLocalizedDescription=Permission denied}
2017-06-14 11:32:23.460 ShipIt[44423:915887] ShipIt quitting
2017-06-14 11:32:23.550 ShipIt[44440:916130] Resuming installation attempt 2
2017-06-14 11:32:33.271 ShipIt[44440:916133] Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo={NSLocalizedDescription=Permission denied}
2017-06-14 11:32:33.271 ShipIt[44440:916133] ShipIt quitting
2017-06-14 11:32:33.331 ShipIt[44443:916501] Resuming installation attempt 3
2017-06-14 11:32:41.436 ShipIt[44443:916504] Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo={NSLocalizedDescription=Permission denied}
2017-06-14 11:32:41.436 ShipIt[44443:916504] ShipIt quitting
2017-06-14 11:32:41.552 ShipIt[44444:916571] Too many attempts to install, aborting update
2017-06-14 11:32:41.554 ShipIt[44444:916574] ShipIt quitting

Electron version: 1.6.11
Operating system: Mac OS X 10.12.5

Actually this issue never happened before and after I got my electron version updated, there is this issue happening. I try to downgrade my electron version to 1.4.15 and 1.6.6 and 1.6.10 but no luck the problem still persists.


I'll add that I'm having the same problem on Mac OS X 10.11.6, electron 1.6.2. Any suggestions for how it could be debugged in more detail would be appreciated too.

@joshaber
Copy link
Contributor

That looks like a duplicate of #157 or #131.

There's currently a PR open to hopefully fix it: #207

@joshaber joshaber marked this as a duplicate of #157 Jul 19, 2017
@dsagal
Copy link
Author

dsagal commented Jul 19, 2017

It's a different issue. I am an Admin user, and running the application that lives on my desktop. All files in the application being run and the bundle that gets downloaded and unpacked are owned by me.

It's great if the PR fixes it too, but it's not a duplicate of either #157 or #131.

Is there a version of Electron built with the PR that I could test?

@joshaber
Copy link
Contributor

Hrm, I'm not sure where a permission problem would come from then.

Is there a version of Electron built with the PR that I could test?

Unfortunately no. You could make your own but there's not build provided yet.

@dsagal
Copy link
Author

dsagal commented Jul 19, 2017

I am guessing it is this line in Squirrel/SQRLInstaller.m:

if (removexattr(path, "com.apple.quarantine", XATTR_NOFOLLOW) != 0) {

with the issue being that some files in the zip archive are read-only, and this call fails with errno 13 (Permission Denied).

@joshaber: does this sound like a plausible theory?

@joshaber joshaber reopened this Jul 19, 2017
@joshaber
Copy link
Contributor

Ah, interesting. That's a good theory!

@dsagal
Copy link
Author

dsagal commented Jul 19, 2017

Making all files user-writable (in the bundle containing the new version) fixes the issue! I think it makes more sense for files to be read-only, but it's an acceptable workaround.

What I do think is necessary in order to close the issue is to report to the log which path and operation are causing the error. It took me hours to find the cause.

@joshaber
Copy link
Contributor

Agreed! Opened #210 to address this.

@dsagal
Copy link
Author

dsagal commented Jul 20, 2017

Thank you!!!

@joshaber
Copy link
Contributor

Thanks for all your help in debugging!

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

2 participants