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

IllegalStateException in Crypto CBCCipher's decrypt method #741

Closed
QuintinWillison opened this issue Jan 27, 2022 · 0 comments · Fixed by #746
Closed

IllegalStateException in Crypto CBCCipher's decrypt method #741

QuintinWillison opened this issue Jan 27, 2022 · 0 comments · Fixed by #746
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@QuintinWillison
Copy link
Contributor

QuintinWillison commented Jan 27, 2022

We've had this reported by a customer using our Flutter Plugin.

I've reported this issue in this repository, however, as the call stack falls entirely within code from this SDK.

Fatal Exception: java.lang.IllegalStateException
Cipher not initialized
javax.crypto.Cipher.checkCipherState (Cipher.java:1640)
javax.crypto.Cipher.doFinal (Cipher.java:2104)
io.ably.lib.util.Crypto$CBCCipher.decrypt (Crypto.java:255)
io.ably.lib.types.BaseMessage.decode (BaseMessage.java:134)
io.ably.lib.types.BaseMessage.decode (BaseMessage.java:80)
io.ably.lib.types.MessageSerializer$MessageBodyHandler.handleResponseBody (MessageSerializer.java:172)
io.ably.lib.types.MessageSerializer$MessageBodyHandler.handleResponseBody (MessageSerializer.java:157)
io.ably.lib.http.BasePaginatedQuery.handleResponse (BasePaginatedQuery.java:159)
io.ably.lib.http.BasePaginatedQuery.handleResponse (BasePaginatedQuery.java:25)
io.ably.lib.http.HttpCore.handleResponse (HttpCore.java:293)
io.ably.lib.http.HttpCore.httpExecute (HttpCore.java:270)
io.ably.lib.http.HttpCore.httpExecute (HttpCore.java:165)
io.ably.lib.http.HttpCore.httpExecuteWithRetry (HttpCore.java:83)
io.ably.lib.http.HttpScheduler$AsyncRequest.httpExecuteWithRetry (HttpScheduler.java:312)
io.ably.lib.http.HttpScheduler$AblyRequestWithFallback.run (HttpScheduler.java:205)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
java.lang.Thread.run (Thread.java:919)

They have tens of thousands of Android app users and thus far have just seen one instance of this in their reported crash logs.

See this internal Slack message, which contains a link to the Firebase console for this Crashlytics entry, to which some the Ably internal team have access.

Other details:

  • Device: Realme realme 3
  • OS: Android 10
  • Device state: background

┆Issue is synchronized with this Jira Bug by Unito

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.
1 participant