theodor
Updating Android OS is breaking login flow
I have this app where there are a bunch of users that cannot access their account anymore after they updated their Android device to Android 16 Beta SDK 36. The login is happening on a web page that is opened within the app. I couldn’t reproduce this issue and I noticed that most of these are happening on Samsung and Nothing phone. They say they are getting an error but they didn’t disclosed it. This is the error that I get on datadog:
PlatformException(Exception encountered, read, javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
at com.android.org.conscrypt.NativeCrypto.EVP_CipherFinal_ex(Native Method)
at com.android.org.conscrypt.OpenSSLEvpCipher.doFinalInternal(OpenSSLEvpCipher.java:154)
at com.android.org.conscrypt.OpenSSLEvpCipher.engineDoFinal(OpenSSLEvpCipher.java:192)
at javax.crypto.Cipher.doFinal(Cipher.java:2074)
at com.it_nomads.fluttersecurestorage.ciphers.StorageCipher18Implementation.decrypt(Unknown Source:35)
at com.it_nomads.fluttersecurestorage.FlutterSecureStorage.decodeRawValue(Unknown Source:11)
at com.it_nomads.fluttersecurestorage.FlutterSecureStorage.read(Unknown Source:17)
at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin$MethodRunner.run(Unknown Source:249)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:273)
at android.os.Looper.loop(Looper.java:363)
at android.os.HandlerThread.run(HandlerThread.java:85)
, null)
First Post!
rachelwilson
that badpadding error on read usually means the stored value cant be decrypted anymore, the keystore key it was encrypted with got invalidated or changed by the os update. sadly that stored token is not coming back, so the practical fix is to catch the platformexception when you read on startup, wipe the secure storage, and send the user to login fresh instead of leaving them stuck. it also helps to make sure youre on a recent flutter_secure_storage version, the older cipher implementation seems to hit this more after updates on samsung devices. annoying, but at least a clean re-login gets people back in.
Popular Backend topics
Other popular topics
Backend>Questions
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /java
- /clojure
- /typescript
- /emacs
- /haskell
- /svelte
- /onivim
- /kotlin
- /react
- /c-plus-plus
- /crystal
- /tailwind
- /gleam
- /ocaml
- /elm
- /vscode
- /flutter
- /html
- /ash
- /deepseek
- /zig
- /opensuse
- /centos
- /php
- /react-native
- /scala
- /lisp
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /deno
- /django
- /kubuntu
- /nodejs
- /arch-linux
- /ubuntu
- /spring
- /revery
- /manjaro
- /julia
- /quarkus
- /diversity
- /lua
- /laravel









