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

Catch error when trying to delete non-existing deno.lock file #143

Open
Tracked by #144
benStre opened this issue Jun 5, 2024 · 4 comments
Open
Tracked by #144

Catch error when trying to delete non-existing deno.lock file #143

benStre opened this issue Jun 5, 2024 · 4 comments
Labels
bug Something isn't working important

Comments

@benStre
Copy link
Member

benStre commented Jun 5, 2024

Currently, the deno process crashes when trying to delete a non-existing deno.lock file (during UIX updates)

@benStre benStre added bug Something isn't working important labels Jun 5, 2024
@benStre
Copy link
Member Author

benStre commented Jun 9, 2024

@asbng Do you know where exactly this happens / how it can reproduced?
When removing the deno.lock file during updates, it is already checked beforehand if the file exists (

if (denoLock.fs_exists) {

@asbng
Copy link
Member

asbng commented Jun 24, 2024

Unfortunately, I don't have a stack trace for this. Let's close this issue until we can reproduce it.

@asbng asbng closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
@asbng
Copy link
Member

asbng commented Jun 24, 2024

Just got it again:

NotFound: No such file or directory (os error 2): remove '/home/user/uix-project/deno.lock'
    at async Object.remove (ext:deno_fs/30_fs.js:259:3)
    at async updateCache (https://cdn.unyt.org/uix/auto-update.ts:30:3)

@asbng asbng reopened this Jun 24, 2024
@benStre
Copy link
Member Author

benStre commented Jun 26, 2024

This is really weird - we are definitely checking beforehand if the file exists with denoLock.fs_exists. Either this check does not work correctly, which should definitely not be the case, or the file is already deleted before Deno.remove is finished. I changed the async Deno.remove call to Deno.removeSync for the next release, hoping that this has an effect somehow, I don't know what else we could change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important
Projects
None yet
Development

No branches or pull requests

2 participants