Projecte-UrbanTree / UrbanTree

🌳 Aplicatiu web per a la gestió del manteniment d'arbrat urbà i periurbà
1 stars 0 forks source link

[Bug]: Routing issue: All routes fail when accessed with query parameters #100

Open 0x1026 opened 6 days ago

0x1026 commented 6 days ago

Describe the Bug

The application routing is not functioning correctly for any routes when query parameters are included in the URL. For example, accessing /example works as expected, but /example?param=value results in a failure or unexpected behavior. This issue prevents proper handling of query parameters across the entire application.

Steps to Reproduce

  1. Define any route in the routing file (e.g., /example).
  2. Start the application and access the route:
    • First without query parameters (e.g., GET /example): works as expected.
    • Then with query parameters (e.g., GET /example?param=value): fails.
  3. Observe the behavior:
    • The route does not match or fails to respond properly when query parameters are present.

Expected Behavior

All routes should handle requests with query parameters without issue, matching the route path and processing the request appropriately.

Actual Behavior

Routes fail to respond or behave unexpectedly when query parameters are appended to the URL.

Stack Trace (if applicable)

Paste any stack traces, error logs, or traceback here. If they’re lengthy, consider using a code block (```) or attaching a file.

Environment Information

Reproduction Details

Input and Output

Provide your input (e.g., code snippet, configuration) and the corresponding output or behavior.
Input:

docker-compose up --build --watch --remove-orphans

Output:

server-1      | 172.18.0.1 - - [20/Nov/2024:20:59:11 +0000] "GET /?id=a HTTP/1.1" 404 368 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
server-1      | 172.18.0.1 - - [20/Nov/2024:20:59:12 +0000] "GET /?id=a HTTP/1.1" 404 367 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
server-1      | 172.18.0.1 - - [20/Nov/2024:20:59:12 +0000] "GET /?id=a HTTP/1.1" 404 367 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
server-1      | 172.18.0.1 - - [20/Nov/2024:20:59:22 +0000] "GET /?id=a HTTP/1.1" 404 368 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
server-1      | 172.18.0.1 - - [20/Nov/2024:20:59:22 +0000] "GET /?id=a HTTP/1.1" 404 367 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
server-1      | 172.18.0.1 - - [20/Nov/2024:20:59:22 +0000] "GET /?id=a HTTP/1.1" 404 367 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"

Screenshots or Media

image

Additional Context

The issue occurs globally across all routes in the application. This might indicate a configuration problem in the router or middleware that processes incoming requests.

Possible Solution

Investigate and ensure: