PLhery / node-twitter-api-v2

Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.
https://www.npmjs.com/package/twitter-api-v2
Apache License 2.0
1.29k stars 176 forks source link

Request failed with code 403 - You attempted to reply to a Tweet that is deleted or not visible to you. (Twitter code 385) #366

Open tarasowski opened 2 years ago

tarasowski commented 2 years ago

Describe the bug These error happens randomly. I'm trying to send a thread and sometimes I receive this error. Feels like there are some race conditions. Most of the time the first tweet gets sent, the others not.

To Reproduce Please indicate all steps that lead to this bug:

  1. OAuth2
  2. await client.v1.tweetThread

Expected behavior Should send a thread without errors

Version

alkihis commented 2 years ago

This is an issue of Twitter API and not the lib right? The library just takes the ID of posted tweet and gives it to twitter to send the next tweet.

tarasowski commented 2 years ago

This is what I'm getting as a response: "Request failed with code 403 - You attempted to reply to a Tweet that is deleted or not visible to you. (Twitter code 385) "

alkihis commented 1 year ago

Any updates for this issue? Is this still happening? I'm not sure the lib is responsible for this.

tarasowski commented 1 year ago

Yes it was again happening. Actually it was happening with the client.v1.tweetThread. What I did I implemented it manually and added a delay of 5 sec between each tweet. Now it works but I'm not using the tweetThread method anymore.

alkihis commented 1 year ago

Thanks for your reply! It may be a delay issue on Twitter side (cache management?), because the lib is doing the things right. I will look for a possible patch to avoid this issue.

tarasowski commented 1 year ago

Thanks! Also what I noticed is that it wasn`t posting all tweets in a row, so basically it missed the sequence.