theodor

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

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.

Where Next?

Popular Backend topics Top

dimitarvp
As a part of my new job I’ll have to learn to manage a local k8s cluster. The tools used are microk8s, tilt and helm. I’ll appreciate an...
New
Fl4m3Ph03n1x
Background I am trying to get a Github Action working with Windows and Bakeware because I am trying to create a release using it. Howeve...
New
JimmyCarterSon
I am confused about the Schema setup, I am setting up a new application and I want to seed files in it as well. I tried to mix to create...
New
osbre
Hello everyone I’m trying to implement a “magic link” or “one-time login link” functionality I wonder what a secure way to implement it...
New
GermaVinsmoke
Does anyone know beginner friendly Elixir/Phoenix Open source projects? For learning purpose :slightly_smiling_face:
New
Ora2pgnewbie
Wanted to check if there is a UI available to use Ora2pg tool.
New
harwind
In C, how they are different? char str[] = "xyz"; // statement //and char str[4] = "xyz"; // statement The first, i...
/c
New
Fl4m3Ph03n1x
Background When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error: * assembling mark...
New
Fl4m3Ph03n1x
Background I have an umbrella project, where I run mix test from the root. In one of the apps, I am mocking the File module using the Mo...
New
jaeyson
Hi! I have clarifications (please correct me, as I mostly mix/confuse this details) with the following: The term RAG here where it read...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
AstonJ
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
PragmaticBookshelf
Explore the power of Ash Framework by modeling and building the domain for a real-world web application. Rebecca Le @sevenseacat and ...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New
PragmaticBookshelf
As digital systems increasingly run the world, mastery of the recurring patterns of software development risk is the key to fast and effe...
New