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

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

Closed
PungYoung opened this issue May 23, 2022 · 10 comments
Closed
Labels
awaiting feedback More information is required from the requestor Bug Something isn't working Ready For Testing A fix is available and needs testing

Comments

@PungYoung
Copy link

Description

OS: windows10
wails: v2.0.0-beta.35
run "wails dev" error:The process cannot access the file because it is being used by another process.
run "wails build" is ok,other computer run "wails dev" also ok.

To Reproduce

  1. wails dev

Expected behaviour

running "wails dev"

Screenshots

No response

Attempted Fixes

No response

System Details

output:
`
E:\atools>wails dev
Wails CLI v2.0.0-beta.36


Executing: go mod tidy -compat=1.17
Executing: wails generate module


ERROR: remove C:\Users\ADMINI~1\AppData\Local\Temp\wailsbindings.exe: The process cannot access the file because it is being used by another process.

If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony


exit status 1
`

Additional context

No response

@PungYoung PungYoung added the Bug Something isn't working label May 23, 2022
@PungYoung
Copy link
Author

PungYoung commented May 23, 2022

I cleaned up the computer's cache and wails dev worked normally,but reboot computer error again.

@stffabi
Copy link
Collaborator

stffabi commented May 23, 2022

Thanks for opening this issue.

Might some antivirus program lock the file until scanning has been finished?

@leaanthony leaanthony added the cannot reproduce The issue cannot be reproduced by the project maintainers label May 27, 2022
@chenxiao1990
Copy link
Contributor

我也有这个问题。

@sentangle
Copy link

sentangle commented Jun 17, 2022

I also have this problem!
how to solve this bug?

`PS F:\root-go\oclient> wails doctor
Wails CLI v2.0.0-beta.37

Scanning system - Please wait (this may take a long time)...Done.

System

OS: Windows 10 Enterprise LTSC 2019
Version: 1809 (Build: 17763)
ID:
Go Version: go1.18.1
Platform: windows
Architecture: amd64

Wails

Version: v2.0.0-beta.37

Dependency Package Name Status Version


WebView2 N/A Installed 101.0.1210.53
npm N/A Installed 6.14.14
*upx N/A Available
*nsis N/A Available

    • Optional Dependency

Diagnosis

Your system is ready for Wails development!
Optional package(s) installation details:

If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
`

`PS F:\root-go\oclient> wails dev
Wails CLI v2.0.0-beta.37

Executing: go mod tidy -compat=1.17
Executing: C:\Users\Administrator\go\bin\wails.exe generate module
Converting type application.RespResult

  • simple field RespResult.Status
  • simple field RespResult.Message

ERROR: remove C:\Users\ADMINI~1\AppData\Local\Temp\wailsbindings.exe: Access is denied.

If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony`

@stffabi
Copy link
Collaborator

stffabi commented Jun 17, 2022

@sentangle are you using an antivirus tool, which might block the file?

I think we could probably just change the deletion of that temp file to a best effort case. If it could be deleted, that's fine otherwise it will be left in there and overwritten during the next build.

@leaanthony
Copy link
Member

Weird this seems to be happening only on Windows. I agree with just best effort delete. I'm not 100% sure it will be overwritten though if it's locked. Let's see 👍

@leaanthony
Copy link
Member

@sentangle @chenxiao1990 @yangpeng1994 - Please try the linked PR and let us know if it fixes this. Thanks 👍

@leaanthony leaanthony added awaiting feedback More information is required from the requestor Ready For Testing A fix is available and needs testing and removed cannot reproduce The issue cannot be reproduced by the project maintainers labels Jun 18, 2022
@leaanthony
Copy link
Member

@sentangle @chenxiao1990 @yangpeng1994 - Any updates?

@chenxiao1990
Copy link
Contributor

PS E:\chenxiao\wailsjianfei> wails doctor
Platform: windows
Architecture: amd64

Wails

Version: v2.0.0-beta.37

system : win11

ERROR: remove C:\Users\zxj\AppData\Local\Temp\wailsbindings.exe: The process cannot access the file because it is being used by another process.

Update code to the linked PR, work well.

@stffabi
Copy link
Collaborator

stffabi commented Jun 28, 2022

A fix has been released with v2.0.0-beta.38.

@stffabi stffabi closed this as completed Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback More information is required from the requestor Bug Something isn't working Ready For Testing A fix is available and needs testing
Projects
None yet
Development

No branches or pull requests

5 participants