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

New
jaimeiniesta
I maintain a project that lists hundreds of thousands of web pages, and I’d like to show a screenshot for each web page. There are alread...
New
mrmurphy
I’ve run into a situation where I’ve got a list of posts inside of a container that uses phx-update=“prepend”, and the posts on the socke...
New
bsek43
Hello everyone, I’ve started learning Elixir and Phoenix few months ago and while I mostly grasped Elixir’s functional concepts and Phoe...
New
sampu
I have a use case where a client is invoking a Rest endpoint via a load balancer, which in turn invokes a third party endpoint which is r...
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
conradwt
Hi, I’m building an application that will have support for both the web and mobile. At this time, I’m using PhxGenAuth for authenticatio...
New
Fl4m3Ph03n1x
Background I have a module that uses TypedStruct to create structs. This is the code: defmodule Shared.Data.Authorization do @moduledo...
New
ogoldberg
Any recommendations on good resources for learning Elixir, Phoenix, and Ash?
New
pillaiindu
What is the difference between using :references and :belongs_to in the following command? bin/rails generate scaffold LineItem product:...
New

Other popular topics Top

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
PragmaticBookshelf
Free and open source software is the default choice for the technologies that run our world, and it’s built and maintained by people like...
New
PragmaticBookshelf
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
AstonJ
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New
RobertRichards
Hair Salon Games for Girls Fun Girls Hair Saloon game is mainly developed for kids. This game allows users to select virtual avatars to ...
New
PragmaticBookshelf
Lint your docs like code: turn any style guide into enforceable rules with Vale and publish clear, consistent content every time. ...
New
pragdave
Build robust LLM-powered apps, chatbots, and agents while mastering AI engineering principles that will help you outlast the tools and th...
New