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

History API error: Invalid accessToken in request: xyz.F5UkPAOLTbMV4emxqgxzCb5... #1749

Closed
Dajust opened this issue Apr 21, 2024 · 4 comments · Fixed by #1750
Closed

History API error: Invalid accessToken in request: xyz.F5UkPAOLTbMV4emxqgxzCb5... #1749

Dajust opened this issue Apr 21, 2024 · 4 comments · Fixed by #1750
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@Dajust
Copy link

Dajust commented Apr 21, 2024

Since v2, I've been getting this invalid accessToken error whenever I call this channel.history() API.

Note that the same accessToken is used across all other APIs in my app and all work well, except the history API call, so yes, I think my API key is valid. I also tried with a newly created API key but to no avail.

01:04:49.540 Ably: PaginatedResource.handlePage(): Unexpected error getting resource: err = [ErrorInfo: Invalid accessToken in request: xyz.F5UkPAOLTbMV4emxqgxzCb5...; statusCode=400; code=40005; see https://help.ably.io/error/40005 ]

┆Issue is synchronized with this Jira Task by Unito

@VeskeR VeskeR added the bug Something isn't working. It's clear that this does need to be fixed. label Apr 22, 2024
@lawrence-forooghian
Copy link
Collaborator

Hi @Dajust, thanks for raising this issue. What environment are you running ably-js in? We've recently received a similar bug report for React Native (#1730). I think we didn't immediately fix it because the affected user was able to work around the issue, but it sounds like something we should be fixing as a priority.

@Dajust
Copy link
Author

Dajust commented Apr 22, 2024

Hey @lawrence-forooghian, thanks for your response. Yes, I am on React Native.

@lawrence-forooghian
Copy link
Collaborator

Thanks for the confirmation. We’re working on a fix.

VeskeR added a commit that referenced this issue Apr 30, 2024
… possible

This commit also ensures that whenever we access underlying ArrayBuffer
via `TypedArray.prototype.buffer` we use `.slice()` method with
corresponding `.byteOffset` and `.byteLength` properties to retrieve
correct section of ArrayBuffer used by the TypedArray.

Resolves #1730, Resolves #1749
VeskeR added a commit that referenced this issue Apr 30, 2024
… possible

This commit also ensures that whenever we access underlying ArrayBuffer
via `TypedArray.prototype.buffer` we use `.slice()` method with
corresponding `.byteOffset` and `.byteLength` properties to retrieve
correct section of ArrayBuffer used by the TypedArray.

Resolves #1730, Resolves #1749
@VeskeR VeskeR closed this as completed in a20f20b May 3, 2024
@VeskeR
Copy link
Contributor

VeskeR commented May 3, 2024

Hi @Dajust !
This issue has been fixed in 2.0.4 release of ably-js. Thank you for reporting this problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

Successfully merging a pull request may close this issue.

3 participants