x icon indicating copy to clipboard operation
x copied to clipboard

Failed to unmarshal response

Open mesb1 opened this issue 1 year ago • 27 comments

After some time of success work, it has stopped with:

Failed to unmarshal response

I tried to relogin, nothing helps. Is there any ideas how to diag?

mesb1 avatar Jul 17 '24 16:07 mesb1

Relogging should be done by running x auth -c (clear) to clear the previous configuration and start the auth process again by running x auth and continue from there.

Can you provide the CLI command that caused this error? Was it a normal text tweet? Maybe you exceeded the 280-character limit set by Twitter? I don't have error handling for that yet.

Also, Did you achieve a successful post? Or it still doesn't work on your remote machine.

devhindo avatar Jul 18 '24 11:07 devhindo

It doesn't work for my remote machine after some time. It was successfully verified, but I when post something now there is a error and nothing posted on my twitter.

mesb1 avatar Jul 18 '24 13:07 mesb1

Relogging should be done by running x -c

Not working, only: x auth -c

mesb1 avatar Jul 18 '24 13:07 mesb1

Was it a normal text tweet? Maybe you exceeded the 280-character limit set by Twitter?

Yep, just like example, only number added.

mesb1 avatar Jul 18 '24 13:07 mesb1

Did you move the .tempxcli file to the remote machine home directory? What is the OS used on your remote machine? Also can you check this and provide the full prompt and the error message

devhindo avatar Jul 18 '24 14:07 devhindo

Did you move the .tempxcli file to the remote machine home directory?

No, i was able to make your app working for some moment. Not really clear, but i did. I have shared info of what i have done inside issue #46

mesb1 avatar Jul 18 '24 17:07 mesb1

What is the OS used on your remote machine?

Almalinux 8 minimal, no gui, no any additional software, just base system, streamer, my scripts and your app.

mesb1 avatar Jul 18 '24 17:07 mesb1

It looks like last time it was working about couple of days, from 14 upto 17 of july. Posts includes some hashtags, link to streaming project and track author - name. It is about 200 symbols limits was set since i was using oysttyer.

mesb1 avatar Jul 18 '24 17:07 mesb1

For now it is working again, from this point, so let's see how it goes for the next day.

mesb1 avatar Jul 18 '24 17:07 mesb1

What is the OS used on your remote machine?

Almalinux 8 minimal, no gui, no any additional software, just base system, streamer, my scripts and your app.

That's cool

devhindo avatar Jul 18 '24 17:07 devhindo

If possible there is a sense to add a bit more debug via --debug key as it is not clear on which side it was broken, between app and 3rd party server or 3rdparty server and twitter itself.

mesb1 avatar Jul 18 '24 17:07 mesb1

Looks like i have run into problem again. It happens about 3 hours ago, app stops working again:

./x -t "testing2" Failed to unmarshal response

Also it looks like this message doesn't have start from new line. As my automated part looks like after a few fails: Failed to unmarshal responseFailed to unmarshal responseFailed to unmarshal response How can i assist with diag?

mesb1 avatar Jul 19 '24 16:07 mesb1

And now working again, tried 7 times before with no luck.

mesb1 avatar Jul 19 '24 21:07 mesb1

And same happens again.

Do we have some limitations somewhere?

mesb1 avatar Jul 20 '24 16:07 mesb1

So the X API is responsible for this. They are blocking the tweet with statusText: 'Too Many Requests' according to their free API plan

image

1500 tweets are allowed under the free plan, distributed in 30 days. That means only 50 tweets per day (and we exceeded this today, So your tweet is not getting posted. Tomorrow the counter will reset to 0 and you will be able to post again).

image

image

The only way to bypass this is to pay for their API pro plans and I don't have the capabilities to this right now as they are ridiculously overpriced.

image

Sadly this sets a limitation for this tool. I was hoping to do further development to allow scheduling future tweets and some other cool ideas but now I might reconsider as their paid plans are ridiculously overpriced.

tho I might find a workaround to post tweets using another way other than their API maybe using their implicit API used in the browser when you're posting from x.com. This could be tough but I might give it a shot anyway

Thank you for informing me ❤️. as this is the first time for this tool to reach that limit lol that's something I'm proud of but also the end of an exciting story.

Thanks.

devhindo avatar Jul 20 '24 17:07 devhindo

Oh, sounds sad. Did i get it right, this is whole limit across allthe users?

I mean for example my limit was ended, and you also will be limited even if doing only one tweet for a whole day?

mesb1 avatar Jul 20 '24 18:07 mesb1

Yeah I just tried it and I couldn't post. For all users. Funny.

devhindo avatar Jul 20 '24 18:07 devhindo

Your limit didn't end. The app itself is only allowed to post 50 tweets for all its current user. This is what Elon did when he bought Twitter. It was unlimited before.

devhindo avatar Jul 20 '24 18:07 devhindo

Well, i assume there is a sense to add some limitation to the xcli then for local or server side.

We can share 50 tweets across 10 users for 5 posts per day for example.

I will stop my autoposter for tracks and will use this for some specific things like just random posts sometimes from server.

mesb1 avatar Jul 20 '24 18:07 mesb1

If you ever decide to move for some paid options for this api we can try to continue streamer data posting.

mesb1 avatar Jul 20 '24 18:07 mesb1

By the way, is it possible to create xcli2 xcli3 xcliN app for twitterconnection for making it about 50 requests each?

mesb1 avatar Jul 20 '24 18:07 mesb1

I will stop my autoposter for tracks and will use this for some specific things like just random posts sometimes from server.

FYI: I have reordered my automation scripts to make posting twice less with combination of two tracks data in one post. So let's see how it goes hope will not hit limits too fast.

Ping me if it is a problem and I will stop it again.

mesb1 avatar Jul 22 '24 00:07 mesb1

Just realized I can do even 3 times less. Will take a look today's evening.

mesb1 avatar Jul 22 '24 09:07 mesb1

Found small issue with my script and fixed it. Posts should be a bit less also.

mesb1 avatar Aug 01 '24 21:08 mesb1

Instead of posting 3 time less, now it will post 4 time less. Also i hope in next few month we will change few internal things and posting will go less also.

Hope for some self hosted solution.

mesb1 avatar Feb 27 '25 20:02 mesb1

self-hosting is the way 👍🏻

devhindo avatar Feb 27 '25 23:02 devhindo

Implemented some changes, so posting will be a bit less (removed parts of tracks notifications)

mesb1 avatar May 17 '25 07:05 mesb1