Try to have Cursor open a local index file in the built-in or remote controlled Chrome instance and the browser_navigate tool will reject it (probably due to not starting with http/https if I had to guess.)
This is a legitimate use case for single file html development, don’t always need a running server or livereload/HMR may be injected into the bundle loaded by the html file without a running html server.
Steps to Reproduce
Create a local index file and try to open it via typical file:// protocol. The easiest way to get this value is to double click to open it in Chrome first and then copy the local url. Enable either the built-in browser or Google Chrome in the agent browser setting and then instruct the agent to load that file URL. It won’t work.
Expected Behavior
It works.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Wish you’d fix this and it’s in Windows just as well. Browsers have been running local files forever, so it’s quite unusual.
An interim fix is to use Python’s built-in http.server (thanks to this “how to” discussion), by running:
python3 -m http.server
Or in Windows:
python.exe -m http.server
This will serve http://127.0.0.1:8080, and you’ll be able to open any local file using http://127.0.0.1:8080/[local_path] by just modifying [local_path].