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

triggering custom protocol - sometimes the association is lost #265

Open
npup opened this issue Jan 25, 2024 · 0 comments
Open

triggering custom protocol - sometimes the association is lost #265

npup opened this issue Jan 25, 2024 · 0 comments

Comments

@npup
Copy link

npup commented Jan 25, 2024

Hi!

I found this app a few days ago and was immediately impressed and very happy with it, truly a sweet thing!

I bundled a nodejs script which downloads a file and then opens it in a suitable application on the computer. But that is just plain nodejs code, nothing special.. the script was triggered by clicking links like pp://example.pdf on my testing web page via the protocol association, and also of course worked fine when run directly from the terminal as a node script.

At one point, after tweaking the script itself and building a new MyHandler.app - and replacing it in the /Applications directory - the message when clicking links is

Failed to launch 'pp://example.pdf' because the scheme does not have a registered handler.

with pp:// being my protocol, as entered in the list of URI Schemes in Platypus. I checked all the settings, rebuilt, redeployed (meaning removing the app from /Applications and putting the fresh one there) but I seemed stuck with having lost the protocol association. A while later, I gave it a go again, just filling everything out (name, script type, script src, URI Scheme), and for some reason it started working :/

The next day, it was gone again - "no registered handler" for pp://.

I realize this may not be a problem with Platypus itself, but possibly someone knows why fluctuations like this would be happening. The Internet had some related advice along the lines of refreshing the plists like defaults read org.something.MyHandler which haven't helped in my case. I also restarted the computer in case something had stuck.

If I inspect a built app, and see reasonable plists (in fact having entries for the wanted protocol/s), what can I do to reliably make the Mac be aware of those protocols? This may be the real question but I am not sure - hence the long text :)

Best regards
/

Edit: I use version Version 5.4.1 (1240), from Homebrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant