extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[Bitly URL Shortener] Unable to get selected text from frontmost application

Open alvaroybanez opened this issue 2 years ago • 5 comments

Extension

https://www.raycast.com/blessanm86/bitly-url-shortener

Raycast Version

1.75.1

macOS Version

14.5

Description

After pasting my API token in the extension config, I keep getting the error "Unable to get selected text from frontmost application".

This extension stopped working a while ago, but I can't recall when exactly.

Steps To Reproduce

  1. When using Raycast on Macbook Pro M3
  2. With Sonoma 14.5 using Arc Version 1.43.1 (50198)
  3. I have my Bitly API token and I'm logged in with password per the extension instructions
  4. I copy the URL with a Raycast shortcut (cmd+shift+C)
  5. I run a Raycast shortcut (cmd+shift+B) to shorten the URL
  6. I get the aforementioned error

Current Behaviour

I get error "Unable to get selected text from frontmost application", and URL is not shortened.

Expected Behaviour

The URL is shortened and copied onto my clipboard.

alvaroybanez avatar May 23 '24 11:05 alvaroybanez

Thank you for opening this issue!

🔔 @blessanm86 you might want to have a look.

💡 Author and Contributors commands

The author and contributors of blessanm86/bitly-url-shortener can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopens the issue.
  • @raycastbot assign me Assigns yourself to the issue.
  • @raycastbot good first issue Adds the "Good first issue" label to the issue.

raycastbot avatar May 23 '24 11:05 raycastbot

You might be facing this issue

blessanm86 avatar May 25 '24 19:05 blessanm86

Thanks, but unfortunately not.

Raycast already had access before checking, so this does not seem to be it.

Screenshot 2024-05-25 at 23 33 40

alvaroybanez avatar May 25 '24 22:05 alvaroybanez

@alvaroybanez Im not sure why this fails as this is a raycast API. These changes were introduced by @alex-cory in the last update.

I have wrapped the relevant code in a try catch so it properly fallback to the clipboard in case of failure.

blessanm86 avatar May 26 '24 07:05 blessanm86

@blessanm86 I'm closing this, as it magically went back to working 🤷

Thanks for your help.

alvaroybanez avatar May 28 '24 18:05 alvaroybanez