balta2ar / brotab

Control your browser's tabs from the command line
MIT License
405 stars 29 forks source link

Use the nativemessaging extension #45

Closed thiagoa closed 2 years ago

thiagoa commented 4 years ago

I'm using Pop!_OS 20.10 with the latest Chrome and noticed that the activate_tab functionality has stopped working. Upon inspecting the brotab mediator, I noticed that the native messaging communication, which is manually implemented using stdin/stdout, was throwing a BrokenPipe error when flushing the buffers. I've fixed it simply by using the nativemessaging package, see this commit:

https://github.com/thiagoa/brotab/commit/0e9fa11b691585d5c60ac488b93df76251907b82

I did not bother to identify the actual problem but it seems to me that offloading this responsibility to a dedicated package seems to be a more reliable approach, or else the manual implementation could be fixed.

balta2ar commented 4 years ago

If you look at the implementation of that package (https://github.com/Rayquaza01/nativemessaging/blob/master/nativemessaging/__init__.py), you can see that it does exactly what I'm doing :)

BrokenPipe could be a result of some earlier error or timeout. Can you reliably reproduce it and upload /tmp/brotab*.log when that happens?

balta2ar commented 2 years ago

might be outdated