Giter VIP home page Giter VIP logo

Comments (4)

mrichar1 avatar mrichar1 commented on July 23, 2024

Hi,

Thanks for reporting this! There haven't really been any code changes between the 1.0.0 release and the previous untagged master, so I'm not sure if this is a side-effect of packaging, or if you were just using an older version from master and one of the other commits since then has caused this to occur.

Can you let me know if this error is coming from the client, or the server? And please run both with -lDEBUG and append those results too. Thanks!

from clipster.

magnetophon avatar magnetophon commented on July 23, 2024

This might have been there for a longer time; I just didn't notice, cause I don't usually start clipster from the cli.

This is coming from the server: clipster -d -lDEBUG.
I get what looks like normal debug output, but when I run
clipster -o -n 0 -0 | rofi -i -dmenu -sep '\x00' -eh 2 -p paste: | tr -d '\n' | clipster
(from a WM key) for the second time, I get the following in the clipster -d -lDEBUG terminal:
Traceback (most recent call last): File "/nix/store/vxwz45d3wqs1l28s7dax8vsfia9gvcx5-python3-3.5.3-env/lib/python3.5/site-packages/gi/overrides/GLib.py", line 735, in <lambda> func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data) File "/nix/store/8yclnhbfzz5xkgqsspdhkz3hf7qcqaid-clipster-1.0.0/bin/.clipster-wrapped", line 514, in socket_recv self.process_msg(conn) File "/nix/store/8yclnhbfzz5xkgqsspdhkz3hf7qcqaid-clipster-1.0.0/bin/.clipster-wrapped", line 544, in process_msg conn.sendall(json.dumps(self.boards[board][-count:][::-1]).encode('utf-8')) BrokenPipeError: [Errno 32] Broken pipe

from clipster.

mrichar1 avatar mrichar1 commented on July 23, 2024

Thanks for this extra info!

So it turned out that you were triggering an unexpected case with your pipes, where STDIN being passed to the final clipster command was empty - the equivalent of running e.g. /bin/true | clipster

The message protocol being used was ambiguous, and not distinguishing between 'no content' (a signal to send clipboard history) and .empty content'. So the server was trying to return the latest clipboard items, even though the client wasn't expecting them, and had hung up (hence the broken pipe).

I've changed the protocol to differentiate between no content and empty content, and have the server behave accordingly. I've also added handling for socket errors on the server, since these can probably be triggered in a number of ways, and tidied up some other bits and pieces while I was in there.

Now released a (hopefully!) working version tagged as 1.0.1

Please let me know if this fixes your problems! (There may still be a problem with the final clipster in your command chain receiving empty data, but that's probably a separate issue...)

from clipster.

magnetophon avatar magnetophon commented on July 23, 2024

Seems to be fixed now. Thanks!

from clipster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.