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

Cannot access file, used by another process. 7z -- building for Windows with EV in 5.34.1 #706

Closed
sklink opened this issue Aug 26, 2016 · 3 comments · May be fixed by qcif/data-curator#563 or Omrisnyk/trinity-wallet#88

Comments

@sklink
Copy link

sklink commented Aug 26, 2016

  • Version: 5.34.1
  • Target: Windows 64-bit

I have EV code signing which worked on a previous electron-builder release (5.21.0) with the updated version I am getting this error when building:

Error: D:\path-to-app\appname\build\node_modules\7zip-bin-win\x64\7z.exe exited with code 2
Output:

7-Zip [64] 16.00 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-10

Scanning the drive for archives:
1 file, 0 bytes

Extracting archive: C:\Users\MyUserName\.cache\winCodeSign\2150-156c8501be0-0.7z

Can't open as archive: 1
Files: 0
Size:       0
Compressed: 0

Error output:
ERROR: C:\Users\MyUserName\.cache\winCodeSign\2150-156c8501be0-0.7z
Can not open the file as archive

The process cannot access the file because it is being used by another process.

    at ChildProcess.childProcess.once.code (D:\path-to-app\appname\build\node_modules\electron-builder\src\util\util.ts:154:14)
    at ChildProcess.g (events.js:286:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
From previous event:
    at Object.spawn (D:\path-to-app\appname\build\node_modules\electron-builder\src\util\util.ts:117:9)
    at D:\path-to-app\appname\build\node_modules\electron-builder\src\util\binDownload.ts:62:14
    at next (native)
    at emitNone (events.js:91:20)
    at WriteStream.emit (events.js:185:7)
    at finishMaybe (_stream_writable.js:488:14)
    at afterWrite (_stream_writable.js:362:3)
    at onwrite (_stream_writable.js:352:7)
    at WritableState.onwrite (_stream_writable.js:89:5)
    at fs.js:1866:5
    at FSReqWrap.wrapper [as oncomplete] (fs.js:741:5)
From previous event:
    at tsAwaiter (D:\path-to-app\appname\build\node_modules\electron-builder\src\util\awaiter.ts:10:47)
    at Object.build (D:\path-to-app\appname\build\node_modules\electron-builder\src\builder.ts:195:52)
    at Object.<anonymous> (D:\path-to-app\appname\build\node_modules\electron-builder\src\build-cli.ts:27:28)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:160:18)
    at node.js:445:3
error: D:\path-to-app\appname\build\node_modules\7zip-bin-win\x64\7z.exe exited with code 2Output:7-Zip [64] 16.00 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-10Scanning the drive for archives:1 file, 0 bytesExtracting archive: C:\Users\MyUserName\.cache\winCodeSign\2150-156c8501be0-0.7zCan't open as archive: 1Files: 0Size:       0Compressed: 0Error output:ERROR: C:\Users\MyUserName\.cache\winCodeSign\2150-156c8501be0-0.7zCan not open the file as archiveThe process cannot access the file because it is being used by another process.    at ChildProcess.childProcess.once.code (D:\path-to-app\appname\build\node_modules\electron-builder\src\util\util.ts:154:14)    at ChildProcess.g (events.js:286:16)    at emitTwo (events.js:106:13)    at ChildProcess.emit (events.js:191:7)    at maybeClose (internal/child_process.js:850:16)    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)From previous event:    at Object.spawn (D:\path-to-app\appname\build\node_modules\electron-builder\src\util\util.ts:117:9)    at D:\path-to-app\appname\build\node_modules\electron-builder\src\util\binDownload.ts:62:14    at next (native)    at emitNone (events.js:91:20)    at WriteStream.emit (events.js:185:7)    at finishMaybe (_stream_writable.js:488:14)    at afterWrite (_stream_writable.js:362:3)    at onwrite (_stream_writable.js:352:7)    at WritableState.onwrite (_stream_writable.js:89:5)    at fs.js:1866:5    at FSReqWrap.wrapper [as oncomplete] (fs.js:741:5)From previous event:    at tsAwaiter (D:\path-to-app\appname\build\node_modules\electron-builder\src\util\awaiter.ts:10:47)    at Object.build (D:\path-to-app\appname\build\node_modules\electron-builder\src\builder.ts:195:52)    at Object.<anonymous> (D:\path-to-app\appname\build\node_modules\electron-builder\src\build-cli.ts:27:28)    at Module._compile (module.js:541:32)    at Object.Module._extensions..js (module.js:550:10)    at Module.load (module.js:456:32)    at tryModuleLoad (module.js:415:12)    at Function.Module._load (module.js:407:3)    at Function.Module.runMain (module.js:575:10)    at startup (node.js:160:18)    at node.js:445:3

Suggestions?

@develar
Copy link
Member

develar commented Aug 27, 2016

Please try remove .cache/winCodeSign dir and try again.

@develar
Copy link
Member

develar commented Aug 27, 2016

#695

@sklink
Copy link
Author

sklink commented Aug 27, 2016

Same error, new file referenced. I'm not sure what they're referencing with finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants