QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.84k stars 1.31k forks source link

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

Open genki opened 1 month ago

genki commented 1 month ago

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

gioboa commented 1 month ago

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 😅

JerryWu1234 commented 1 month ago

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 commented 1 month ago

image

it's fine in local

JerryWu1234 commented 1 month ago

@genki how to check log that from this website?

genki commented 1 month ago

@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

JerryWu1234 commented 1 month ago

@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

genki commented 1 month ago

@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.