Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in GetPostsStateless API Request #356

Open
AdonousTech opened this issue May 23, 2022 · 0 comments
Open

Bug in GetPostsStateless API Request #356

AdonousTech opened this issue May 23, 2022 · 0 comments

Comments

@AdonousTech
Copy link

AdonousTech commented May 23, 2022

GetPostsStateless is not working properly when iterated. For example, look at the following nginx requests below. Notice the size of the payloads all are within a somewhat normal range, until the last request. Notice the size of the payload returned on the last request (10312051). That last request is the equivalent of about 1900 posts.

Basically, every time I page to the 5th or 6 "page" of results, it refuses to respect the NumToFetch param and simply returns thousands of posts 🤷🏾‍♂️!

I verified the issue is specifically related to the value passed into PostHashHex. If I start a call with a PostHashHex say 300 items deep in the global, the error will happen on the 1st call.

`nginx | 172.31.14.51 - - [23/May/2022:12:44:10 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 118044 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:10 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 145907 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:15 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 135363 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:20 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 144301 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:28 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 150703 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:31 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 119172 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:34 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 107212 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:39 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 4460 "-" "Mozilla/5.0
nginx | 172.31.14.51 - - [23/May/2022:12:44:45 +0000] "POST /api/v0/get-posts-stateless HTTP/1.1" 200 10312051 "-" "Mozilla/5.0

Also, you can see the same issue from a different angle. The screenshot below is the browser console. Notice again the size of the last response payload @ 10.3mb!

Screenshot 2022-05-23 054723

The object below is the request payload for every call. Again, depending on the PostHashHex passed in, it does not respect the NumToFetch value.

{PostHashHex: "8425dd56335283ec0a8ff17a7d5b77aee423d19e703881910327075975ed3f47",}
AddGlobalFeedBool: true
FetchSubcomments: false
GetPostsByDESO: false
GetPostsForFollowFeed: false
GetPostsForGlobalWhitelist: true
MediaRequired: false
NumToFetch: 25
OrderBy: ""
PostContent: ""
PostHashHex: "**8425dd56335283ec0a8ff17a7d5b77aee423d19e703881910327075975ed3f47**"
PostsByDESOMinutesLookback: 0
ReaderPublicKeyBase58Check: "BC1YLgQMDskGR7m7V3uRqh62wFCZsPgVWH5BFHijArSRLJyPCVo9AuR"
StartTstampSecs: null```

Any ideas what's causing this? This seems pretty important, as we need this working to enable a better scrolling experience for users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@AdonousTech and others