Jump to content

Snippets not working intermittently


Recommended Posts

I've been having problems with snippets not working intermittently. When they fail to work, they either only expand part of the snippet (i.e., they don't insert all of the text in the snippet), or instead of expanding the snippet, they just paste whatever is currently on the clipboard. Sometimes if I try it a second time, it works, however, that's not guaranteed. I saw a similar post from another person and I believe his password manager was to blame, but I don't use the same one. I do use Pastebot for a clipboard manager and 1Password as a password manager, so perhaps they have something to do with it? I've attached a screenshot with the specifics of my MacBook. 

Edited by p3av8r
Added information about my MacBook.
Link to comment

@p3av8r Welcome to the forum :)

 

Could you please test text expansion in TextEdit specifically? When you try to expand your snippets in TextEdit, what behaviour do you see exactly?

 

Does the issue of partial expansion / pasting the current clipboard happen only in a particular app, browser window, etc? If you can narrow down the exact scenario where the issue happens, you may find that it's in a non-native app or browser that's being weighted down by plugins that slow it down.

 

You can try slowing down key events:

https://www.alfredapp.com/help/troubleshooting/snippets/#partial

 

Let me know how you get on.

 

Cheers,
Vero

Link to comment

Thanks for the quick reply and for the recommendation about slowing down key events. Of course, at this moment, all the snippets are working properly, but I will try these troubleshooting tips the next time I experience the problem. I most frequently see the problem when composing an email in the Gmail web client in Safari as most of my snippets were created specifically for use in emails (e.g., different email signatures, my address and telephone number, etc.). I'm not 100% sure it happens in other apps since I use it so infrequently in other apps, but I'll test that as well next time I have the problem. I do have a fair amount of plugins in Safari, so that may be an issue as well.

Link to comment

I second this. I've been facing this issue as well for the past few weeks, where the snippet won't expand at all. I have to try it multiple times before it works. The snippet does not expand at all, so its not a partial expansion. I usually notice this in browser address bar (brave browser and firefox). It happens like 50% of the time. Doesn't expand even with all browser extensions disabled.

 

What else can I do to resolve this?

Edited by andy4222
Link to comment

@andy4222 When the snippets aren't expanding, did you check whether you're seeing the secure input error message highlighted here?

 

https://www.alfredapp.com/help/troubleshooting/snippets/#secure-input

 

It's likely that if snippets are working normally the rest of the time, in that time where they don't expand, the error message would indicate which app or service on your Mac is enabling secure input. During that time, Alfred (and any other app that relies on knowing your keystrokes) will be blind to what you're typing, and no snippets will be expanded.

 

Once you can establish what app, plugin, etc is causing that, disabling or uninstalling it should resolve it for you :)

 

Cheers,
Vero

Link to comment
18 hours ago, p3av8r said:

I do have a fair amount of plugins in Safari, so that may be an issue as well.

 

@p3av8r That'll be the next step then, establishing which plugin is likely interfering.

 

I use Alfred's snippets in Gmail in Safari (no browser extensions) on Big Sur hundreds of times a day, so I'm confident that when nothing external is interfering, your snippets should work perfectly. :)

 

Cheers,
Vero

Link to comment
  • 11 months later...

I know this is an old thread. But I too am experiencing this - and have been for several years. 

 

## Example 

 

If I type my snippet: `url@someclientsname` - then it should expand to the clients URL, such as: www.some-clients-website.com

But every now and then, it doesn't expand.

 

 

## My observations and findings 

 

 - Quickfixes: 95% of the time, it works if I simply delete my snippet and type it again. Sometimes I have to do it twice or three times for it to work. If that doesn't fix it (the 5% of times), then if I CMD+Tab away from the program and then CMD+Tab back into the program, then my snippet works. 

 - Programs: I've seen it happens in all kinds of programs: Chrome, Obsidian, Sublime text, PhpStorm, iTerm, etc. 

  - Memory usage: I have a gut-feeling, that if my computer is under stress (using a lot of memory), that that correlates with the snippets failing to expand. I tried installing iStatistica Pro and looking into the Application Monitor, but I haven't seen clear evidence yet. 

  - Secure input enabled: I also heard the theory about 'Secure input enabled' and went above and beyond to figure out, if that could be an explanation. Conclusion: I'm pretty sure that it isn't. See the elaborated explanation below for more info.

 - Upon login: Whenever I just unlock, open or log in to my computer, sometimes (5-15% of the time), the snippet doesn't expand until I've done the CMD+Tab-trick (see above). 

 - Password Manager (1password): I'm using 1password as my password manager. And there is an increased chance of the snippet failing to expand after I've fetched a password from the "Quick-fetch password"-functionality from 1password (Shortcut: Shift + CMD + \ ). It's about 30-50% of the time, after I've fetched a 1password-password, that the snippets fail. And if it fails, then one of the quickfixes from above will fix it (always).  

 - Safari: Another hunch is that Safari 'hangs on' to Secure Login and keeps it enabled for longer that Chrome. But I can't prove that directly either.  

 

 

## Disproving the "Secure input enabled"-theory

 

I could read this in several places. And even though it does tick a bunch of boxes, my gut-feeling told me, that it wasn't it. 

The problem with proving this, is to see when Secure Login is enabled, since it would entail going to a terminal and writing a command to see if Secure input, was enabled. And to do so, there we be a good chance that while doing so, one of disable Secure Input. 

 

So I installed a program called TextBar, where I can execute scripts continuously and output the result in my Menu Bar. That way I can, at all times, see if Secure Input is enabled and see which program did it. Here are my two scripts:

 

Determining if secure input is enabled:

#!/bin/bash

SID=`ioreg -l -w 0 | grep SecureInput`
if [[ "$SID" != '' ]]; then
	echo ' Secure Input is Active '
else
	echo ' Not active '
fi

 

Determining which program enabled secure input: 

#!/bin/bash

culprit=`ioreg -l -w 0 | grep SecureInput | sed 's/ //g'`
if [ -z "$culprit" ]
then
	echo ' No culprit '
else
	echo " ${culprit:0:20} "
fi

 

But after having those running every second for months, I cannot see any program causing the problem. Every time a snippet fails, I check my menu bar, to see if Secure Login is the one failing the snippet to expand - and it almost never is. 

Previously I had a feeling that it was related to the login of my computer, that didn't disable Secure Input. And I can see now (with my script), that if I log in, that it keeps the Secure Input enabled for 2-3 seconds, but now consistently Secure Input is being disabled. QED. 🙂 

Edited by zeth
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...