Issues with clipboard contents

Heya,

I'm having an issue with some of our users where the snippet is failing to load the clipboard contents into a url that's being generated. Rather than the clipboard contents it will insert this message: "[Error - No match found.]".

Long story short, we copy a customer token, then generate multiple links in one snippet, inserting the token via the clipboard into the url.

We'll see this sometimes when the copied token accidentally grabs a blank space. But that will break all of the links. In our case the token may work in one link but not the other. When manually assembling the url, the url is valid. And the same token will work for some users but not others.

Being that it is selective to users I'm thinking it's some sort of configuration issue. Just odd that if the copied token fails in one of the links, it would succeed in another within the same snippet. May just be a Chromebook thing as well. Just wanted to see if anyone had run into the issue in case I'm missing something.

The "No match found." error indicates you are using extractregex() on the clipboard contents and the regex is failing to match on the clipboard contents.

When the issue happens to a user, it would be great if they could save the contents of their clipboard at that point and then you can debug the regex against the clipboard on a site like https://regex101.com/ to find out why it's failing.

Happy to help you debug it here too if you are comfortable posting a version of the regex and clipboard contents.

You could also have your snippet to provide a message to your users telling them to send you the info when the error occurs.

For example, if you have something like:

{token=extractregex("clipboard contents", "(\d+)")}
URL is: http://example.com/{=token}

You could have it do something like:

{token=extractregex("clipboard contents", "(\d+)")}
{if: iserror(token)}
++++++
Sorry! We couldn't find the token. Please email me so we can figure out what went wrong. Make sure to send me your current clipboard contents which is included here:

{clipboard}
+++++++
{endif}
URL is: http://example.com/{=token}

Thank you! I'll try that error logging.

Our call for the token is this:

{link: http://example.com/{=extractregex({clipboard}, "B$_(.+)")}?payments_section=transactions&section=sq-cash-issued-bank-accounts}

And the clipboard contents are in this format:
B$_C_token
where token is numbers and letters.

I've been able to catch it a couple times when it's happening and the weird thing is I will copy the same token on my computer and have no issue pulling it up.
I'm pretty sure it has something to do with Chrome OS and particular configurations as it seems to happen to certain users and not others. But that's a whole other worm hole :blush: