Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch('/__open-in-editor') in error overlay does not respect base #8627

Closed
7 tasks done
ascott18 opened this issue Jun 17, 2022 · 1 comment · Fixed by #11337
Closed
7 tasks done

fetch('/__open-in-editor') in error overlay does not respect base #8627

ascott18 opened this issue Jun 17, 2022 · 1 comment · Fixed by #11337
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@ascott18
Copy link

ascott18 commented Jun 17, 2022

Describe the bug

  1. Have an app with a base configured.
  2. Introduce an error in your code that triggers the error overlay.
  3. Click a file link in the stack trace. Observe that no editor opens and the response to the request is The server is configured with a public base URL of /myBase/ - did you mean to visit ...

Note that requests to __vite_ping DO prepend base.

Reproduction

NOTE: It doesn't actually reproduce on stackblitz because they seem to have a web worker that intercepts __open_in_editor and does the necessary handling to make it work in that environment. You'll have to download it and run it locally.

https://stackblitz.com/edit/vitejs-vite-gknqnq?file=counter.js,vite.config.ts&terminal=dev

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz 
    Memory: 3.81 GB / 31.94 GB
  Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE       
    Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 102.0.5005.115
    Edge: Spartan (44.19041.1266.0), Chromium (102.0.1245.41)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vite: 2.9.12 => 2.9.12

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Jun 17, 2022
@sapphi-red
Copy link
Member

It worked for me on windows. That said, it is a bug since the request should be prepended with base.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants