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

Potential problem with Platform networking #1641

Closed
cmelchior opened this issue Jan 25, 2024 · 2 comments
Closed

Potential problem with Platform networking #1641

cmelchior opened this issue Jan 25, 2024 · 2 comments

Comments

@cmelchior
Copy link
Contributor

cmelchior commented Jan 25, 2024

This seems to be the root cause of some of the problems we are seeing with our Sync Tests on Jenkins.

It can be reproduced in the following way:

  1. Checkout `cm/fix-progress-test, from Fix race condition in ProgressListenerTest #1633
  2. Modify AsymmetricSyncTests setup to enable platform networking:
    @BeforeTest
    fun setup() {
        app = TestApp(this::class.simpleName, appName = TEST_APP_FLEX, builder = { builder ->
            builder.usePlatformNetworking(false)
            builder
        })
        val (email, password) = TestHelper.randomEmail() to "password1234"
        val user = runBlocking {
            app.createUserAndLogIn(email, password)
        }
        config = SyncConfiguration.Builder(
            user,
            schema = FLEXIBLE_SYNC_SCHEMA
        ).errorHandler { session, error ->
            println(error)
        }.initialSubscriptions {
            it.query<DeviceParent>().subscribe()
        }.build()
        realm = Realm.open(config)
    }
  1. Start the local test server using ./start_local_test_server.sh
  2. Run AsymmetricSyncTests.asymmetricSchema() from inside Android Studio.
  3. This will now fail with a timeout for uploadAllLocalChanges().
  4. Rerunning the test will now succeed. Rerunning step 3 and 4 with platform networking disabled will work for this test.
  5. Running the AsymmetricSyncTest.insert() from a fresh server with Platform networking disabled will instead result in an AutoClientResetFailed(1028) error being thrown. More details are reported here: Update server version on all entries in the sync history during client reset with recovery realm-core#7291 (review)

So right now it is a bit unclear if this is a problem with the server, the Sync Client, Client Reset, Platform Networking or all of the above. But something is clearly not working as intended

Copy link

sync-by-unito bot commented Jan 26, 2024

➤ cmelchior commented:

This is currently blocking a release from our main branch. We might need to try to roll back commits until it will start working again, but that will probably be quite disruptive. But the Core/Server team is currently looking at logs, so hopefully they can figure out what is wrong.

@nirinchev
Copy link
Member

This was fixed in #1645.

@sync-by-unito sync-by-unito bot changed the title Potential problem with Platform networking Potential problem with Platform networking Feb 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants