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

[Bug]: WaitForDownloadAsync() and WaitForUploadAsync() never return #2973

Closed
carbonete opened this issue Jul 7, 2022 · 8 comments
Closed

Comments

@carbonete
Copy link

What happened?

MongDB Sync at server is down because have integration error between Realm and Atlas.

When execute WaitForDownloadAsync() and WaitForUploadAsync() they never return any error. Running endless.

Repro steps

1 - Error occurs in MongoDB between Atlas and Realm

Version

10.9.0

What SDK flavour are you using?

MongoDB Atlas (i.e. Sync, auth, functions)

What type of application is this?

Xamarin

Client OS and version

Android 8.1

Code snippets

    public async Task WaitSync()
    {
       Session session = SyncDB.RealmInstance.SyncSession;
        if (session != null && Connectivity.NetworkAccess == NetworkAccess.Internet)
        {
            try
            {
                await Task.WhenAll(session.WaitForDownloadAsync(),
                                    session.WaitForUploadAsync());
            }
            catch (Exception ex)
            {
                var t = ex;
            }
            App.AppEnvironmentService.SyncDB.GetCurrentUserExtension();
        }
    }

Stacktrace of the exception/crash you're getting

Server error 

Error:

recoverable event subscription error encountered: error getting new mongo client while creating pbs app translator: error connecting to MongoDB service cluster: failed to ping: server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: lexsemanticcluster0-shard-00-00.owqih.mesh.mongodb.net:30556, Type: Unknown, Last error: connection() error occurred during connection handshake: connection(lexsemanticcluster0-shard-00-00.owqih.mesh.mongodb.net:30556[-327526]) socket was unexpectedly closed: EOF }, { Addr: lexsemanticcluster0-shard-00-01.owqih.mesh.mongodb.net:30556, Type: Unknown, Last error: connection() error occurred during connection handshake: connection(lexsemanticcluster0-shard-00-01.owqih.mesh.mongodb.net:30556[-327532]) socket was unexpectedly closed: EOF }, { Addr: lexsemanticcluster0-shard-00-02.owqih.mesh.mongodb.net:30556, Type: Unknown, Last error: connection() error occurred during connection handshake: connection(lexsemanticcluster0-shard-00-02.owqih.mesh.mongodb.net:30556[-327523]) socket was unexpectedly closed: EOF }, ] }
Source:

Error syncing MongoDB write

Relevant log output

I'm not surre its a Mongodb Sdk message but reconnection time is high.

[0:] 2022-07-07 14:57:49.751 Detail: Connection[1]: Negotiated protocol version: 3
[0:] 2022-07-07 14:57:49.756 Debug: Connection[1]: Will emit a ping in 54586 milliseconds
[0:] 2022-07-07 14:57:49.760 Debug: Connection[1]: Session[1]: Sending: IDENT(client_file_ident=xxx, client_file_ident_salt=xxx, scan_server_version=263, scan_client_version=38, latest_server_version=263, latest_server_version_salt=xxxx)
[0:] 2022-07-07 14:57:49.764 Debug: Connection[1]: Session[1]: Sending: MARK(request_ident=2)
[0:] 2022-07-07 14:58:29.826 Detail: Connection[1]: Allowing reconnection in 2878716 milliseconds
@carbonete
Copy link
Author

Windows 10 have same problem.

@carbonete
Copy link
Author

One more think, Session State is Active. But at server i have message "Synchronization between Atlas and Device Sync has been stopped. "

@LaPeste
Copy link
Contributor

LaPeste commented Jul 11, 2022

Thank you for the report. We will look into it.

@LaPeste
Copy link
Contributor

LaPeste commented Jul 13, 2022

I know you're being followed by our support team. I'll close this issue. Feel free to reopen it if you need more support.

@LaPeste LaPeste closed this as completed Jul 13, 2022
@carbonete
Copy link
Author

@LaPeste i put this because SDK part not working well , MongoDB Support only help to try restart SYNC, and this cause a big mess, forcing to reinstall app to our user. Freeze in methods and incorrect status of Session i don't talk with support. I think this two problems is a SDK team problem.

Thanks for attention

@sync-by-unito
Copy link

sync-by-unito bot commented Jul 26, 2022

➤ Andrea Catalini commented:

To my understanding the user is being followed by the relevant team.

@nirinchev
Copy link
Member

This is likely caused by realm/realm-core#5315. There are two issues at play - one is that sync was down and this is likely followed-up by the Cloud/Support teams. The other is that those async operations don't complete (either with error or successfully) when sync is down and they should. I'm going to reopen it and indicate that it depends on the Core behavior being fixed.

@nirinchev nirinchev reopened this Jul 28, 2022
@nirinchev
Copy link
Member

Just found out we have an issue for the async operations, so I'm closing this as a duplicate of #2835.

@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants