Skip to content

Invalid URL error when using Svelte Inspector after updating to Vite 7.1.0 #1190

@samal-rasmussen

Description

@samal-rasmussen

Describe the bug

@sveltejs/vite-plugin-svelte-inspector doesn't do anything after updating to Vite 7.1.0. In the dev tools network tab I can see the request is failing with a 500 error with the response body being:

launch-editor-middleware: invalid URL.

Request info:

Request URL
http://localhost:5173/__open-in-editor?file=src%2Froutes%2F%2Bpage.svelte%3A2%3A1

Request Method
GET

Status Code
500 Internal Server Error

Remote Address
127.0.0.1:5173

Referrer Policy
strict-origin-when-cross-origin

Reproduction URL

https://github.com/samal-rasmussen/svelte-inspector-invalid-url-error-reproduction

Reproduction

The reproduction repo is just four commits.

  1. Install minimal Svelte template
  2. Update npm packages to exact versions for better reproducability
  3. Enable inspector (it works here)
  4. Update Vite from 7.0.6 to 7.1.0 (it breaks here)

Logs

System Info

System:
    OS: macOS 15.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 83.63 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.17.0 - ~/.nvm/versions/node/v22.17.0/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.17.0/bin/npm
    pnpm: 9.4.0 - ~/Library/pnpm/pnpm
    Watchman: 2025.06.30.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 138.1.80.124
    Chrome: 138.0.7204.101
    Safari: 18.5
  npmPackages:
    @sveltejs/adapter-auto: 6.0.1 => 6.0.1 
    @sveltejs/kit: 2.27.1 => 2.27.1 
    @sveltejs/vite-plugin-svelte: 6.1.0 => 6.1.0 
    svelte: 5.38.0 => 5.38.0 
    vite: 7.1.0 => 7.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions