Skip to content

Chrome Devtools data appears in params in load #13863

Closed

Description

@MathiasWP

Describe the bug

Not sure how this happens, but it seems that the chrome devtools stuff causes the load to re-run...?

Screen.Recording.2025-06-06.at.16.06.28.mov

Reproduction

https://github.com/MathiasWP/sveltekit-chrome-devtools-bug

Logs

System Info

System:
    OS: macOS 15.5
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 54.04 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 10.9.2 - /usr/local/bin/npm
    pnpm: 10.3.0 - /usr/local/bin/pnpm
    bun: 1.0.0 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 136.1.78.97
    Chrome: 137.0.7151.69
    Safari: 18.5
  npmPackages:
    @sveltejs/adapter-auto: ^6.0.0 => 6.0.1 
    @sveltejs/kit: ^2.16.0 => 2.21.2 
    @sveltejs/vite-plugin-svelte: ^5.0.0 => 5.1.0 
    svelte: ^5.0.0 => 5.33.14 
    vite: ^6.2.6 => 6.3.5

Severity

serious, but I can work around it

Additional Information

Using ChromeDevTools/vite-plugin-devtools-json removes this bug

Activity

  1. Conduitry commented on Jun 6, 2025

    @Conduitry
    Member

    Ehhh. That incoming request does match that route, so in that sense, this is correct behavior. I don't know that we want to hardcode that specific URL within SvelteKit and prevent those requests from reaching your app. If someone had implemented their own handling of this file from within their SvelteKit app itself, doing that would be a breaking change for them.

  2. MathiasWP commented on Jun 6, 2025

    @MathiasWP
    ContributorAuthor

    Ehhh. That incoming request does match that route, so in that sense, this is correct behavior. I don't know that we want to hardcode that specific URL within SvelteKit and prevent those requests from reaching your app. If someone had implemented their own handling of this file from within their SvelteKit app itself, doing that would be a breaking change for them.

    That's true... maybe it could be an option in the svelte config or something? I'm okay with using ChromeDevTools/vite-plugin-devtools-json as an solution. But maybe it should be more documented than just a dev-warning in the terminal?

  3. elliott-with-the-longest-name-on-github commented on Jun 9, 2025

    @elliott-with-the-longest-name-on-github
    Contributor

    @MathiasWP as much as I hate it this is really just a Google Chrome problem. They've taken it upon themselves to start sending these random requests to your application. In this case you have a route that matches that request, so that route gets run. In your case (if you're not trying to do anything with Chrome Devtools), you could just create a /routes/appspecific/com.chrome.devtools.json/.well-known/+server.ts file that responds with 404 Not Found to avoid it matching your catchall params.

  4. elliott-with-the-longest-name-on-github commented on Jun 9, 2025

    @elliott-with-the-longest-name-on-github
    Contributor

    Going to close this for now, as it's basically intended behavior -- Chrome is sending a request to your app, and you're serving a response. I would definitely recommend joining the chorus complaining to Chrome about sending stupid requests to your app without asking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions