Closed sodamnfoolish closed 1 month ago
Sorry for the late reply.
Thanks for the hotfix. I did discover the cause of the issue, unfortunately, I've been a lot busy lately so couldn't find the time to work on it. I'll try to merge the hotfix from your fork, which will will buy me time for working on a solution.
Thanks for the contribution and feedback. Means a lot.
Hey! I'm playing around with this package (thank you btw!) and I'm facing the same problem with the search
method.
Debugging I found that in the constructor of the Tweet
class is checking for tweet.quoted_status_result
to assign the value for quoted
:
this.quoted = tweet.quoted_status_result ? new Tweet(tweet.quoted_status_result.result) : undefined;
But I got a case where tweet.quoted_status_result
was an empty object {}
so it was trying to do new Tweet({})
ending in the previous error because the property result
wasn't found in quoted_status_result
:
Logs:
[Rettiwt-API] [2024-10-16T19:53:51.363Z] [AUTHORIZATION] {"authenticated":true}
[Rettiwt-API] [2024-10-16T19:53:51.363Z] [VALIDATE] {"target":"FETCH_ARGS"}
[Rettiwt-API] [2024-10-16T19:53:51.363Z] [GET] {"target":"HTTPS_AGENT"}
[Rettiwt-API] [2024-10-16T19:53:51.363Z] [GET] {"target":"USER_CREDENTIAL"}
[Rettiwt-API] [2024-10-16T19:53:52.127Z] [DESERIALIZE] {"id":"1844376999810433054"}
[Rettiwt-API] [2024-10-16T19:53:52.127Z] [DESERIALIZE] {"id":"1844369358476439922"}
[Rettiwt-API] [2024-10-16T19:53:52.127Z] [DESERIALIZE] {"id":"1844364557973848458"}
...\fetch-tweet\node_modules\rettiwt-api\dist\models\data\Tweet.js:21
this.id = tweet.rest_id;
^
TypeError: Cannot read properties of undefined (reading 'rest_id')```
Issue has been fixed. Please upgrade rettiwt-api
to v4.1.2
.
There was a "Maximum call stack exceeded" error while deserializing tweet(s) in v4.1.2
.
Please upgrade to v4.1.3
instead.
hey, looks like sometimes twitter sends invalid response on user.replies.
on 4.1.0 version got
Cannot read properties of undefined (reading 'rest_id')
on latest one gotOne or more validation error(s) occured, check details field.
found that sometimes tweet.quoted_status_result is
{}
on this line