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][/api/plugins/gitlab/connections/{connectionId}/remote-scopes] Bug title - can't get the results with page 2 #8234

Open
2 of 3 tasks
usst830514 opened this issue Dec 8, 2024 · 2 comments
Labels
severity/p2 This bug doesn’t affect the functionality or isn’t evident type/bug This issue is a bug

Comments

@usst830514
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Url: /api/plugins/gitlab/connections/{connectionId}/remote-scopes
Query: groupId: xxx
Method: GET
When I accessed the api above, I got the response body with nextPageToken(eyJwYWdlIjoyLCJwZXJfcGFnZSI6MTAwLCJzdGVwIjoicHJvamVjdCJ9).
The decoded content of nextPageToken is {"page":2,"per_page":100,"step":"project"}.
But when I continued accessing the api above with extra queryParam - pageToken: eyJwYWdlIjoyLCJwZXJfcGFnZSI6MTAwLCJzdGVwIjoicHJvamVjdCJ9, I got the same result with the first result

What do you expect to happen

I want to get the result with page 2, but also get the result with page 1

How to reproduce

Also see "What happened"

Anything else

nothing

Version

v1.0.1

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@usst830514 usst830514 added the type/bug This issue is a bug label Dec 8, 2024
Copy link

dosubot bot commented Dec 8, 2024

Hello @usst830514! I'm here to help you with any software bugs, questions, or becoming a contributor. Let's work together to resolve the issue you're facing.

The issue you're experiencing, where the same page of results is returned despite using a different pageToken, could be due to how the pageToken is processed. If the pageToken is invalid or cannot be decoded properly, the function responsible for handling it defaults to returning the first page. This could explain why you're seeing the same results for both page 1 and page 2.

The function getPageDataFromPageTokenWithTag decodes the pageToken from Base64 and unmarshals it into a struct. If there's an error during this process, it defaults to the first page [1].

To troubleshoot this issue, ensure that the pageToken is correctly encoded and passed to the API. You might also want to check if there are any errors in the decoding or unmarshalling process that could be causing the default behavior.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the severity/p2 This bug doesn’t affect the functionality or isn’t evident label Dec 8, 2024
@odorT
Copy link

odorT commented Dec 15, 2024

I am also facing similar problem with the latest version : 1.0.2 beta5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/p2 This bug doesn’t affect the functionality or isn’t evident type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants