qwik icon indicating copy to clipboard operation
qwik copied to clipboard

[🐞] GET request to "//" causes internal server error

Open genki opened this issue 1 year ago • 7 comments

Which component is affected?

Qwik City (routing)

Describe the bug

I have found errors in the server log that explains an internal server error occurred when the visitor send a GET request to "//" pathname. I expect the response should be 404.

Reproduction

https://qwik.dev//

Steps to reproduce

Please visit the URL above. You can see it says 500.

System Info

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M2
    Memory: 56.95 MB / 24.00 GB
    Shell: 3.6.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.12.1 - /opt/homebrew/opt/node@20/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.5.0 - /opt/homebrew/opt/node@20/bin/npm
    pnpm: 9.11.0 - /opt/homebrew/bin/pnpm
    bun: 1.1.26 - ~/.bun/bin/bun
  Browsers:
    Chrome: 129.0.6668.70
    Safari: 17.6
  npmPackages:
    @builder.io/partytown: 0.10.2 => 0.10.2 
    @builder.io/qwik: workspace:^ => 1.9.0 
    @builder.io/qwik-city: workspace:^ => 1.9.0 
    typescript: 5.4.5 => 5.4.5 
    undici: * => 6.6.2 
    vite: 5.3.5 => 5.3.5

Additional Information

No response

genki avatar Sep 24 '24 23:09 genki

Thanks @genki for the report This problem should be solved by #6855 🤔 cc @JerryWu1234


Is the #6855 title wrong? The implementation is doing a different thing 😅

gioboa avatar Sep 25 '24 02:09 gioboa

Thanks @genki for the report This problem should be solved by #6855 🤔 cc @JerryWu1234

Is the #6855 title wrong? The implementation is doing a different thing 😅

I will take a look today. It seems like this problem isn't caused by PR

JerryWu1234 avatar Sep 25 '24 03:09 JerryWu1234

image

it's fine in local

JerryWu1234 avatar Sep 25 '24 05:09 JerryWu1234

@genki how to check log that from this website?

JerryWu1234 avatar Sep 25 '24 05:09 JerryWu1234

@JerryWu1234 I have no permission to see the log of that website. I have seen the log on one of my sites that is made of Qwik.

Here's an app that causes this error in local dev. https://github.com/genki/qwik-test/tree/invalid_url

image

genki avatar Sep 25 '24 17:09 genki

@JerryWu1234 I have no permission to see the log of that website. I have seen the log on one of my sites that is made of Qwik.

Here's an app that causes this error in local dev. https://github.com/genki/qwik-test/tree/invalid_url

image

this error in this picture is right, and Astro and other platform is same way

JerryWu1234 avatar Sep 26 '24 01:09 JerryWu1234

@JerryWu1234 The URL http://localhost:5137// is a valid URL. I think the Astro and other platforms also have same bug. The correct response should be 404 Not found or 400 Bad Request, not a server side error such as 5xx.

genki avatar Sep 26 '24 07:09 genki