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

Strange inconsistencies with Google Chrome on Ubuntu #718

Closed
mickleberry opened this issue Jul 28, 2021 · 17 comments
Closed

Strange inconsistencies with Google Chrome on Ubuntu #718

mickleberry opened this issue Jul 28, 2021 · 17 comments
Labels
bug Something isn't working Linux Related to the Linux operating system

Comments

@mickleberry
Copy link

Hello and thank you for your great project.

Things were going really well, but i'm now getting inconsistent output across different locations. It started in Google Docs with an extra crazy output, ie seems to copy paste the entire previous paragraph but not output the trigger replacement.

  • Typing into this text box, for example: the trigger works, but it backspaces 2 spaces into the previous word each time. This happens in some other apps too inc Googel docs (when it's not being extra crazy).
  • But other apps are fine, eg Typora, Atom. Libre Office, Only Office, Bluefish
  • The google chrome address bar has been outputting 3x the replacement text (previously would do things like eg put end letter at beginning)

Restart Daemon doesn't seem to help

Don't know what to do, should i document more detail, try and research exactly what's happening?

(Linux Mint 19)

@federico-terzi
Copy link
Collaborator

Hey @mickleberry,

I'm sorry you experienced this problem! If you run the following command, what do you see?

ps aux | grep espanso

There should be only 2 espanso processes running in the current version, and sometimes if there are more, you get those unexpected side-effects. If that's the case, I would proceed with a killall espanso and then espanso start

As a note for future readers, espanso 2 will come with 3 processes by default, so don't panic if you see more than 2 :)

Let me know if that helps

Cheers :)

@federico-terzi federico-terzi added the bug Something isn't working label Jul 29, 2021
@mickleberry
Copy link
Author

Thank you Federico, much appreciated
Here's the output from ps aux

mic 8808 0.0 0.0 461216 8824 ? Ssl 09:03 0:00 /usr/bin/espanso daemon
mic 8880 0.0 0.0 193772 10112 ? Sl 09:03 0:01 /usr/bin/espanso worker
mic 25425 0.0 0.0 14432 1056 pts/0 S+ 13:29 0:00 grep --color=auto espanso

Tried killall and restart, same result after that.

(and it's definitely a Linux thing, used my Windows install with the same config files, everything's perfectly fine)

Thanks! mc

@mickleberry
Copy link
Author

oh by the way my default.yml file has these lines pasted in to fix an earlier issue. (That fix worked at the time, and until recently)

backend: Clipboard
fast_inject: false

@federico-terzi
Copy link
Collaborator

@mickleberry I see, thank you! Are you using Chrome or Firefox to access Google Docs?

You might want to try with something similar to this thread: #248 (comment)

Perhaps, slowing down the injection might solve your problem. Let me know if that helps :)

@federico-terzi federico-terzi added the Linux Related to the Linux operating system label Aug 1, 2021
@mickleberry
Copy link
Author

Thank you!
i'm using Chrome for docs.
(Tried firefox, it's more reliable but still throwing occasional errors.)

Have tried this, but not sure whether to use "Chrome" or "google-chrome-stable" as the app label instead of Firefox. (ie process name) - slowing injection doesn't seem to work with either tho (i tried up to 20000, no effect).

Most of the time in the document itself the browser is replacing the trigger, but also backspacex3. Perhaps i need to work out how to stop Chrome backspacing...

(Google docs in chrome on my linux here has always struggled for example with a replacement that actually contains backspaces eg for brackets)

mc

@gc-ss
Copy link

gc-ss commented Aug 4, 2021

@mickleberry Thanks for this report!

I have been using espanso for years on Ubuntu and this started to happen recently which confuses me because I don't think I updated espanso ever since I installed it years ago!

backspaces 2 spaces into the previous word each time

Exactly!

ps aux | grep espanso

$   ps aux | grep espanso
gcss   7697  0.0  0.0      0     0 ?        Z    Jul29   0:00 [espanso] <defunct>
gcss   7708  0.0  0.0      0     0 ?        Z    Jul29   0:00 [espanso] <defunct>
gcss   7759  0.0  0.0      0     0 ?        Z    Jul29   0:00 [espanso] <defunct>
gcss   7769  0.0  0.0      0     0 ?        Z    Jul29   0:00 [espanso] <defunct>
gcss   7790  0.0  0.0      0     0 ?        Z    Jul29   0:00 [espanso] <defunct>
gcss   7847  0.0  0.0      0     0 ?        Z    Jul29   0:02 [espanso] <defunct>
gcss   9321  0.0  0.0 460928  6308 ?        Ssl  Jul20   0:00 /usr/bin/espanso daemon
gcss  13932  0.0  0.0      0     0 ?        Z    Jul29   0:20 [espanso] <defunct>
gcss  16777  0.0  0.1 194148 54268 ?        Sl   Jul29   2:51 /usr/bin/espanso worker --reload

As a note for future readers, espanso 2 will come with 3 processes by default, so don't panic if you see more than 2 :)

Ooo @federico-terzi any unofficial hints when espanso 2 will come out :) ?

@federico-terzi
Copy link
Collaborator

federico-terzi commented Aug 4, 2021

@mickleberry I see, thank you!

Have tried this, but not sure whether to use "Chrome" or "google-chrome-stable" as the app label instead of Firefox. (ie process name) - slowing injection doesn't seem to work with either tho (i tried up to 20000, no effect).

If 20000 had no effect, you probably got the filter wrong :) A couple of tips:

Ooo @federico-terzi any unofficial hints when espanso 2 will come out :) ?

@gc-ss It's 90% ready, hopefully by the end of september we'll have an alpha ready :)

@mickleberry
Copy link
Author

Aha! Thank you Federico...

i've worked out how to set up an app-specific yaml file, and Chrome is behaving better in the address bar. (after putting in the slower injection like you said: backspace_delay: 10 & inject_delay: 10)

I'm still getting 2-3 extra backspaces into the previous word however, whether it's address bar, google docs or a text pane in email.

Cheers,
mc

@lavignegagnon
Copy link

I confirm this also started happening to me in the past few days. It consistently happens in any text field or textarea field in Chrome 92.0.4515.107 (Ubuntu). Doesn't occur in Firefox, terminal, vim, or any other app on Ubuntu.

I haven't changed my config is months, and I only have two espanso processes running (daemon and worker). Using espanso 0.7.3.

@gc-ss
Copy link

gc-ss commented Aug 5, 2021

Appreciate this datapoint @lavignegagnon . I thought it was something with my system

I haven't changed my config is months

Exactly. Like I said - I have been using espanso for years on Ubuntu and this started to happen recently which confuses me because I don't think I updated espanso ever since I installed it years ago!

#718 (comment)

So, is the current workaround to create and apply app specific configs that have backspace_delay: 10 & inject_delay: 10 ?

@lavignegagnon
Copy link

So, is the current workaround to create and apply app specific configs that have backspace_delay: 10 & inject_delay: 10 ?

No, that didn't work for me and @mickleberry also mentioned it didn't work for them. I also tried backend: Clipboard and fast_inject: false. No dice.

I suspect this is a Chrome problem. It's the only thing that has changed in the past few days.

I can reproduce the problem with a simple HTML file with a TEXTAREA.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
  </head>
  <body>
    <textarea style="width:100%" rows="10"></textarea>
  </body>
</html>

If I start typing text in that TEXTAREA and then type a trigger, it will backspace extra characters from the previous word.

@gc-ss
Copy link

gc-ss commented Aug 5, 2021

If this is exclusively a Chrome problem, would it be fair to say that RPA/scripting engines that use Chrome like Selenium, Puppeteer would have this same issue with keys input?

@federico-terzi federico-terzi changed the title strange inconsistencies Strange inconsistencies with Google Chrome on Ubuntu Aug 6, 2021
@federico-terzi
Copy link
Collaborator

Thank you for the help guys, this might be a Chrome problem indeed. I'll investigate, let me know if you find out something else :)

@lavignegagnon
Copy link

I updated Chrome to Version 92.0.4515.131 and the problem is now resolved.

@federico-terzi
Copy link
Collaborator

@lavignegagnon Thank you for sharing!

@mickleberry
Copy link
Author

Yes! Same, updated Chrome and it's all better now, phew!
Thanks for all your help on it, glad it was google's fault in the end :)

@federico-terzi
Copy link
Collaborator

Thank you guys, I think it's now safe to close this issue. Feel free to reopen it if the problem occurs again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Linux Related to the Linux operating system
Projects
None yet
Development

No branches or pull requests

4 participants