Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RealmProvider fallback taking too much time to load #6534

Closed
agarwalnitesh opened this issue Mar 5, 2024 · 3 comments
Closed

RealmProvider fallback taking too much time to load #6534

agarwalnitesh opened this issue Mar 5, 2024 · 3 comments
Labels
Encryption:Off More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. O-Community Repro:Sometimes SDK-Use:Sync T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@agarwalnitesh
Copy link

agarwalnitesh commented Mar 5, 2024

How frequently does the bug occur?

Unexpectedly on Production for 5% of users

Description

Hi

I’m using @realm/react with flexible sync. My problem is after I login the app is stuck on the spinner from the fallback prop of the RealmProvider. However if I close and open the app again it still showing the loader till 8-10 minutes in some case, also this is not happening to all user it only happening to 5% of user, and occurrence pattern is unrecognizable.

Here is my code:

import React from 'react';
import {AppProvider, UserProvider, createRealmContext} from '@realm/react';

import LoginComponent from './App/Components/Views/Login';
import DemoComponent from './App/Components/Views/Demo';
import LoadingSpinner from './App/Shared/LoadingSpinner';
import {TemplateCategorySchema} from './App/RealmModels/schema';

function App(): JSX.Element {
const realmConfig: Realm.Configuration = {
  schema: [ TemplateCategorySchema ],
};
const { RealmProvider } = createRealmContext(realmConfig);

return (
  <AppProvider id={'dynamicforms-qa-jqtpx'}>
      <UserProvider fallback={LoginComponent}>
        <RealmProvider
          sync={{
            flexible: true,
          }}
          fallback={() => <LoadingSpinner />}>
          <DemoComponent />
        </RealmProvider>
      </UserProvider>
    </AppProvider>
)
}
export default App;

For some users spinner stays for minutes even if user close and reopen app issue persist for some time.

Please recommend what I'm missing here, also it is very helpful if you have any idea of the root cause.

Stacktrace & log output

No response

Can you reproduce the bug?

Sometimes

Reproduction Steps

This is happening for some of user it is not getting reproduce in debugging phase

Version

0.3.2

What services are you using?

Atlas Device Sync

Are you using encryption?

No

Platform OS and version(s)

iOS iPhone 14Pro

Build environment

This is happening on Production environment

Cocoapods version

1.15.0

Copy link

sync-by-unito bot commented Mar 5, 2024

➤ PM Bot commented:

Jira ticket: RJS-2749

@kneth
Copy link
Member

kneth commented Mar 5, 2024

It looks like you are waiting for the download to complete. You might find one of our examples useful to avoid the spinner: https://github.com/realm/realm-js/blob/main/examples/rn-todo-list/frontend/app/AppSync.tsx#L62-L77

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Mar 5, 2024
@nirinchev nirinchev added the More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. label Mar 20, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@github-actions github-actions bot closed this as completed Apr 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Encryption:Off More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. O-Community Repro:Sometimes SDK-Use:Sync T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

No branches or pull requests

3 participants