realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.8k stars 576 forks source link

Getting error: Another authentication operation is already in progress, when installing new app after upgrading to 12.12.1 #6840

Open ampopdev opened 3 months ago

ampopdev commented 3 months ago

How frequently does the bug occur?

Always

Description

After upgrading from realm 12.6.2 -> 12.12.1 and @realm/react from 0.5.2 -> 0.9 (fetching all dep and pods), when app opens it returns an error: Another authentication operation is already in progress and freezes.

This is my root component and was working fine in version 12.6.2:

<UserProvider fallback={LoginComponent}>
      <RealmProvider
        sync={{
          flexible: true,
          clientReset: {
            mode: ClientResetMode.RecoverOrDiscardUnsyncedChanges,
          },
          newRealmFileBehavior: {
            type: OpenRealmBehaviorType.DownloadBeforeOpen,
          },
          existingRealmFileBehavior: {
            type: OpenRealmBehaviorType.OpenImmediately,
          },
        }}
        schema={allSchemas}
        closeOnUnmount={false}
      >
        <TabNavigator />
      </RealmProvider>
    </UserProvider>

Stacktrace & log output

Console Warning
Possible unhandled promise rejection (id: 0):
"Another authentication operation is already in progress"

Can you reproduce the bug?

Always

Reproduction Steps

Upgrade from 12.6.2 -> 12.12.1 and uninstall old app and perform a new build

Version

12.12.1

What services are you using?

Atlas Device Sync

Are you using encryption?

No

Platform OS and version(s)

iOS 17.4 and Android API 33

Build environment

Which debugger for React Native: .. System: OS: macOS 14.3.1 CPU: (10) arm64 Apple M1 Pro Memory: 78.27 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 22.1.0 path: /opt/homebrew/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v21.7.1/bin/yarn npm: version: 10.7.0 path: /opt/homebrew/bin/npm Watchman: version: 2024.05.06.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

Cocoapods version

1.15.2

sync-by-unito[bot] commented 3 months ago

➤ PM Bot commented:

Jira ticket: RJS-2886