-
Notifications
You must be signed in to change notification settings - Fork 862
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
SearchIndexAsync invalid nextToken #3566
Comments
I asked in the discussion, but could you share how you're handling the pagination? If you follow this pattern I believe you should not be running into this error:
|
I don't need to have a while, because API it's used from third portal. So, I need response and if nextToken exits, from web application ask pagination. |
Is it possible whoever is invoking your API is passing a next token for a different request? The SDK does not modify the token at all, and that error message you're seeing is coming from the service. As of now, I'm afraid we don't have enough information to help you. |
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled. |
Any news? |
I see you opened a support case (for reference, the number is As mentioned in the other comments, there's not enough information on this issue at the moment, so please follow the support case so that we can help you. |
Comments on closed issues are hard for our team to see. |
Describe the bug
I want to share my problem.
I have simple request C# for SearchIndexAsync aws SDK. First time receive response with 'nextToken' field for request other page. I use nextToken value, but receive 'Invalid nextToken'
I perform same request by aws cli and it's working fine.
My code:
Example:
_iotClient is IAmazonIoT
Exception
AmazonIoTClient 58|2024-12-02T15:36:19.097Z|ERROR|InvalidRequestException making request SearchIndexRequest to https://iot.eu-central-1.amazonaws.com/. Attempt 2. --> Amazon.IoT.Model.InvalidRequestException: Invalid nextToken
API response with this nextToken, when I perform first request:
"nextToken": "AQJnif/ptPp6otTULTCYZu3eV0Be458dLpq/pnT+pHC4bZjcDbBIiRNCLJ9PH7x9xCCIqQDMU0k4gbr+a3CHoMxs+yFnId9gdG2f+FnYFQc3xgSyj7jAyxNdXbN9izAC7KjfAgjs5Xw4smIK50bz3SBbGhrOc6u9eDK3A7qWXpUnsBzr4yh76ds5mfr/WeouzanV+aDz+RR/Gg=="
Update:
Response Log. I add 'xxxx' for privacy response
AmazonIoTClient 67|2024-12-02T15:38:31.771Z|DEBUG|Received response (truncated to 1024 bytes): [{"nextToken":"AQJnif/ptPp6otTULTCYZu3eV0Be458dLpq/pnT+pHC4bZjcDbBIiRNCLJ9PH7x9xCCIqQDMU0k4gbr+a3CHoMxs+yFnId9gdG2f+FnYFQc3xgSyj7jAyxNdXbN9izAC7KjfAgjs5Xw4smIK50bz3SBbGhrOc6u9eDK3A7qWXpUnsBzr4yh76ds5mfr/WeouzanV+aDz+RR/Gg==","thingGroups":null,"things":[{"attributes":{"xxxxx":"xxxxx","domain":"xx","id":"xxxxxx","ring":"xxx","type":"xxxx","vin":"xxxxxx"},"connectivity":{"connected":false,"disconnectReason":null,"timestamp":0},"deviceDefender":null,"shadow":"","thingGroupNames":["xxxxx","xxxxx","xxxxxx"],"thingId":"00001f4c-25f8-4d59-9906-6b0c26508c60","thingNam]
Regression Issue
Expected Behavior
Response like this
Current Behavior
AmazonIoTClient 58|2024-12-02T15:36:19.097Z|ERROR|InvalidRequestException making request SearchIndexRequest to https://iot.eu-central-1.amazonaws.com/. Attempt 2. --> Amazon.IoT.Model.InvalidRequestException: Invalid nextToken
Reproduction Steps
Example:
_iotClient is IAmazonIoT
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Targeted .NET Platform
.NET 8.0
Operating System and version
AWS Lambda
The text was updated successfully, but these errors were encountered: