Bug 497884

Summary: Site Protocol Handler is not working
Product: [Applications] Falkon Reporter: Juraj <jurajoravec>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 24.12.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Juraj 2024-12-25 14:42:31 UTC
SUMMARY
After registering site custom protocol handler it does not work and opens external application instead.


STEPS TO REPRODUCE
1. Register a scheme handler
2. Try to use it (click on link with registered protocol)
3. Observe

OBSERVED RESULT
External commands is started, in case Falkon is registered to handle the registered protocol it will spawn an infinite amount of tabs.

EXPECTED RESULT
Redirected to the page specified in protocol handler

ADDITIONAL INFORMATION
After adding the protocol/scheme to the allowed list in [Preferences > Other > Custom Scheme Manager > Allowed Schemes (Add)] and restarting Falkon, it opens a single page with "about:blank#blocked" address in addressbar.
Comment 1 Juraj 2025-01-28 20:32:31 UTC
Results of my investigation:
- The scheme of the protocol handler "web+whatever" cannot be in the allowed/registered schemes.
  If it is registered as a custom scheme it will redirect to "about:blank#blocked"
- Falkons code to handle custom protocols is executed when the custom protocol handler is requested and also when browser starts, but somehow it is not working properly.
- If the Falkon custom code is bypassed and the request is accepted on the first try (with or without blocking popup), the feature works correctly, but makes the protocol handler only a temporary thing which needs to be registered after each browser restart (which is not a nice thing).
- I tested Qutebrowser if it works there and it does not seem to register it on its own after browser starts, I need to go to the site and than it will register it. Maybe this is the intended way of using it? First go to the site which offers protocol handler and then continue browsing? (can be done with pinned tabs and automaed answering within Falkon), This is how qutebrowser does it, from what I understand. (Or I missed something)

So I am still in doubts on how this thing should be working.