Protocol handler silently dropped after 1st use

Originator:apk
Number:rdar://44851142 Date Originated:2018-09-27
Status:Open Resolved:NO
Product:Safari Product Version:12
Classification:Bug Reproducible:Yes
 
Summary:
Our web application uses a protocol handler to start a desktop agent. User sees "Do you want to allow this page to open “IBM Aspera Launcher.app”?"

We found that Safari will stop displaying the protocol handler popup for any other domain using any custom protocol handler. This bug persists for the lifetime of a tab. If a new tab is opened, protocol handlers start working again.

Steps to Reproduce:
0. Example script uses "magnet" url. Torrent app Transmission was installed on the system to handle this url.
1. Trigger protocol handler using iframe technique.
2. Visit another domain that uses custom protocol handlers. For example, another torrent magnet link. http://academictorrents.com/details/52da574b6412862e199abeaea63e51bf8cea2140
3. Click on the magnet link

Actual Result:
The user interaction is ignored. The protocol handler popup is not show. 

Expected Results:
The protocol handler should be displayed every time.

Version/Build:
Safari 12. Safari 12.0.1

Other notes:
Using 'window.location' or 'document.location' results in a redirection to a Safari error page if our desktop agent is not yet installed. The iframe helps avoid a poor user experience.

Javascript example:
var dummyIframe = document.createElement("IFRAME");
dummyIframe.src = "magnet:";
document.body.appendChild(dummyIframe);

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!