Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 508615

Summary: Failed updates can prevent further updates
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: ElectronAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Silenio_Quarti, steve_northover
Version: 13.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Rennie CLA 2016-12-02 12:09:36 EST
I was trying to update to the latest version of the electron app today, and halfway through the little dialog said there was and exception during the update. So I tried the update again, and nothing seemed to happen. So I cancelled the second update attempt and went and grabbed the installer. When I tried running the installer, it fails with a dialog that says:

"There was an error while installing the application...".

When I checked the log I found a bunch of these:

(Inner Exception #0) System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

And a bunch of these:

(Inner Exception #0) System.IO.IOException: The process cannot access the file 'C:\Users\mrennie\AppData\Local\Orion\SquirrelSetup.log' because it is being used by another process.
Comment 1 Michael Rennie CLA 2016-12-02 14:32:46 EST
Looks like part of this could be https://github.com/atom/atom/issues/5109
Comment 2 Silenio Quarti CLA 2016-12-05 10:30:13 EST
It seems that the new version of nodegit creates really long paths because of the dependency tree. For example:

app-0.1.65/resources/app/node_modules/nodegit/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json

which 215 characters long.

Possible solutions:

- ship app resources as an asar file
- use npm3 to flatten the dependency tree
Comment 3 Steve Northover CLA 2016-12-05 11:16:54 EST
There is also https://www.npmjs.com/package/flatten-packages
Comment 4 Silenio Quarti CLA 2016-12-05 13:36:58 EST
Fixed by building app resources as asar file

http://git.eclipse.org/c/gerrit/orion/org.eclipse.orion.client.git/commit/?id=1fcc2a8c5f9e9f14e5140098c07c53ce6be6522d
Comment 5 Silenio Quarti CLA 2016-12-05 13:37:06 EST
.