Allow the OS to handle custom URIs. Cannot open links with custom URL schema (e.g. slack://)
See original GitHub issueDoes this issue occur when all extensions are disabled?: Yes/No Yes
- VS Code Version: 1.60.1
- OS Version: All
Steps to Reproduce:
- Obtain a custom URI.
For Mac users an easy way to test a custom URI is with Hook from a file or email.
Or you could create a bearbones app with a custom URI with a few lines of AppleScript. These types of links are common e.g.
slack://
, Zoom, OmniFocus, and several more so you should be able to find a URI that works. You can test these in your browser. - Add the link to a markdown file open in VSCode
- Try to click it in the code editor and markdown preview. Observe the error.
Additional Info
Poking around I see vscode only handles a limited list. If a schema is unknown, VSCode must delegate to the OS to handle it. It also occurs to me that mailto doesn’t require special treatment on this list and should be handled by the OS.
This was reported before and fell through the cracks. The same console errors where VSCode attempts to resolve a markdown file with a filename that is a substring of the url it does not understand:
Testing custom scheme:
[p.ideas.test.md](hook://file/3NE0H471r?p=RGVuZHJvbi92YXVsdA==&n=p.ideas.test.md)
Unable to open '3NE0H471r.md': Unable to read file '/Users/brandon/Dendron/vault/hook:/file/3NE0H471r.md'
(Error: Unable to resolve non-existing file '/Users/brandon/Dendron/vault/hook:/file/3NE0H471r.md').
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Reference: Deep linking into Slack
Deep linking with slack:// Use the slack:// URI scheme to deep link into a user's native Slack client on the following operating systems:...
Read more >Defining a custom URL scheme for your app - Apple Developer
Custom URL schemes provide a way to reference resources inside your app. Users tapping a custom URL in an email, for example, launch...
Read more >Linking - React Native
Custom URL scheme isn't the only way to open your application on mobile. You don't want to use a custom URL scheme in...
Read more >Slack URL to open a channel from browser - Stack Overflow
The OS will prompt you if it doesn't recognize the custom protocol handler, but if Slack has this enabled, then it wouldn't be...
Read more >Configure Link Behaviors for Redirects and Link Domain
If you change settings in Custom link behavior, the values you set for ... allows you to control how and when Branch uses...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did a PR to the Dendron Extension which provides a tidy workaround for this issue via
dendron: Open link
.Whatever you’re doing with this, please just simply add ‘tel’ href links to the sanitization list as requested here: https://github.com/microsoft/vscode/issues/133365