Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fetch trying to read local file gives Deno Panic #27258

Closed
EnixTV opened this issue Dec 6, 2024 · 2 comments · Fixed by #27259
Closed

fetch trying to read local file gives Deno Panic #27258

EnixTV opened this issue Dec 6, 2024 · 2 comments · Fixed by #27259
Assignees
Labels
bug Something isn't working correctly

Comments

@EnixTV
Copy link

EnixTV commented Dec 6, 2024

Version: Deno 2.1.3 Platform: windows x86_64
Deno gives a ✅ Granted read access to "\". if u try to read a none existing local file if your fetch-link starts with "file://"
Deno will panic afterwards I don't want to see that cute dino panicing ;-;
probably just an uncaught error or something

@dsherret
Copy link
Member

dsherret commented Dec 6, 2024

Can you provide a reproduction with the panic message?

@dsherret dsherret added the needs info needs further information to be properly triaged label Dec 6, 2024
@EnixTV
Copy link
Author

EnixTV commented Dec 6, 2024

deno run .\main.ts
✅ Granted read access to "\a".

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 2.1.3
Args: ["C:\Users\en\.deno\bin\deno.exe", "run", ".\main.ts"]

thread 'main' panicked at C:\a\deno\deno\ext\fetch\lib.rs:439:55:
called Result::unwrap() on an Err value: ()
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

was the msg i got

const data = await fetch("file://a")
was the code i tried

@dsherret dsherret added bug Something isn't working correctly and removed needs info needs further information to be properly triaged labels Dec 6, 2024
@dsherret dsherret self-assigned this Dec 6, 2024
bartlomieju pushed a commit that referenced this issue Dec 11, 2024
I tried adding a test, but it's not possible due to a debug assertion in
the url crate (servo/rust-url#505)

Closes #27258
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants