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

Vscode extension keeps file lock on asar files #2330

Open
NateScarlet opened this issue May 21, 2021 · 0 comments
Open

Vscode extension keeps file lock on asar files #2330

NateScarlet opened this issue May 21, 2021 · 0 comments
Labels
🗒️ component - vscode related to editor tooling

Comments

@NateScarlet
Copy link
Contributor

Intended outcome:

success when remove app.asar

Actual outcome:

app.asar locked by apollo language server

image

How to reproduce the issue:

modified from vuejs/vetur#1474 (comment)

  1. extract issue-repro-2021-05-21.zip

  2. pnpm install or npm install

  3. Open project folder with vscode. And open src/graphql/todo.gql file.

  4. electron build
    (There are no asar files at this time. The build was successful.)
    npm run electron:build

  5. electron build
    npm run electron:build
    problem!

PS E:\test\asar-problem> npm run electron:build

> [email protected] electron:build
> vue-cli-service electron:build

 INFO  Bundling render process:

|  Building modern bundle for production...

 DONE  Compiled successfully in 1394ms                                                                                                                                                     4:10:18 ├F10: PM
┤

  File                                                  Size                                                                     Gzipped

  dist_electron\bundled\js\chunk-vendors.d3aef48b.js    56.34 KiB                                                                21.33 KiB
  dist_electron\bundled\js\app.a22903ec.js              4.49 KiB                                                                 1.60 KiB
  dist_electron\bundled\css\app.fb0c6e1c.css            0.33 KiB                                                                 0.23 KiB

  Images and other types of assets omitted.

 DONE  Build complete. The dist_electron\bundled directory is ready to be deployed.
 INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html

/  Bundling main process...

 DONE  Compiled successfully in 494ms                                                                                                                                                      4:10:18 ├F10: PM
┤

  File                                   Size                                                                            Gzipped

  dist_electron\bundled\background.js    195.62 KiB                                                                      60.36 KiB

  Images and other types of assets omitted.

 INFO  Building app with electron-builder:
  • electron-builder  version=22.10.5 os=6.1.7601
  • description is missed in the package.json  appPackageFile=E:\test\asar-problem\dist_electron\bundled\package.json
  • author is missed in the package.json  appPackageFile=E:\test\asar-problem\dist_electron\bundled\package.json
  • writing effective config  file=dist_electron\builder-effective-config.yaml
  • packaging       platform=win32 arch=x64 electron=12.0.9 appOutDir=dist_electron\win-unpacked
  • Unpacking electron zip  zipPath=undefined
  ⨯ remove E:\test\asar-problem\dist_electron\win-unpacked\resources\app.asar: The process cannot access the file because it is being used by another process.
github.com/develar/go-fs-util.EnsureEmptyDir
        C:/Users/develar/go/pkg/mod/github.com/develar/[email protected]/fs.go:98
github.com/develar/app-builder/pkg/electron.UnpackElectron.func1.1
        C:/Users/develar/Desktop/app-builder/app-builder/pkg/electron/electronUnpack.go:38
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
        C:/Users/develar/Desktop/app-builder/app-builder/pkg/util/async.go:68
runtime.goexit
        c:/go/src/runtime/asm_amd64.s:1374
ExecError: E:\test\asar-problem\node_modules\.pnpm\[email protected]\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (E:\test\asar-problem\node_modules\.pnpm\[email protected]\node_modules\builder-util\src\util.ts:243:14)
    at Object.onceWrapper (events.js:421:26)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
  exitCode: 1,
  alreadyLogged: false,
  code: 'ERR_ELECTRON_BUILDER_CANNOT_EXECUTE'
}

Versions

apollograhql.vscode-apollo v1.19.1

@abernix abernix added the 🗒️ component - vscode related to editor tooling label Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗒️ component - vscode related to editor tooling
Projects
None yet
Development

No branches or pull requests

2 participants