Realm Error No Subscription for WRITE: When doing multiple subscriptions of different type

I am trying to configure the realm with the help of the below function. Initially, there was only EmailAccount class after adding ApplicationAccount class while writing to EmailAccount cluster it is working but for ApplicationAccount it is saying Cannot write to class ApplicationAccount when no flexible sync subscription has been created.

How to solve this ??

override fun configureTheRealm() {
        if (user != null) {
            val config = SyncConfiguration.Builder(user, setOf(EmailAccount::class, ApplicationAccount::class))
                .initialSubscriptions { sub ->
                        query = sub.query<EmailAccount>("ownerId == $0",,
                        name = "User's EmailAccounts"
                        query = sub.query<ApplicationAccount>("ownerId == $0",,
                        name = "User's Application Account"
            realm =
            Log.d("USERID", "$user")

Hmm, that is a bit surprising. It could point to a problem with the subscriptions somehow.

What is the output of realm.subscriptions.errorMessage?

Is there anything I am missing? please help me