diff --git a/CHANGELOG.md b/CHANGELOG.md index f1f2c77fb6..daddf56e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,15 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi * Add support for changing the App Services base URL. It allows to roam between Atlas and Edge Server. Changing the url would trigger a client reset. (Issue [#1659](https://github.com/realm/realm-kotlin/issues/1659)/[RKOTLIN-1013](https://jira.mongodb.org/browse/RKOTLIN-1023)) ### Fixed -* None. +* Fixed a bug when running a IN query (or a query of the pattern `x == 1 OR x == 2 OR x == 3`) when evaluating on a string property with an empty string in the search condition. Matches with an empty string would have been evaluated as if searching for a null string instead. (Core issue [realm/realm-core#7628](https://github.com/realm/realm-core/pull/7628) since Core v10.0.0-beta.9) +* Fixed several issues around encrypted file portability (copying a "bundled" encrypted Realm from one device to another). (Core issues [realm/realm-core#7322](https://github.com/realm/realm-core/issues/7322) and [realm/realm-core#7319](https://github.com/realm/realm-core/issues/7319)) +* Queries using query paths on Mixed values returns inconsistent results (Core issue [realm/realm-core#7587](https://github.com/realm/realm-core/issues/7587), since Core v14.0.0) +* [Sync] `App.allUsers()` included logged out users only if they were logged out while the App instance existed. It now always includes all logged out users. (Core issue [realm/realm-core#7300](https://github.com/realm/realm-core/pull/7300)) +* [Sync] Deleting the active user left the active user unset rather than selecting another logged-in user as the active user like logging out and removing users did. (Core issue [realm/realm-core#7300](https://github.com/realm/realm-core/pull/7300)) +* [Sync] Schema initialization could hit an assertion failure if the sync client applied a downloaded changeset while the Realm file was in the process of being opened (Core issue [realm/realm-core#7041](https://github.com/realm/realm-core/issues/7041), since Core v11.4.0). + +### Known issues +* Missing initial download progress notification when there is no active downloads. (Issue [realm/realm-core#7627](https://github.com/realm/realm-core/issues/7627), since 1.15.1) ### Compatibility * File format: Generates Realms with file format v24 (reads and upgrades file format v10 or later). @@ -28,7 +36,7 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi * Minimum R8: 8.0.34. ### Internal -* None. +* Updated to Realm Core 14.6.1 commit cde3adb7649d3361806dbbae0cf353b8fdc4d54e. ## 1.15.0 (2024-04-17) diff --git a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt index 663ec08b01..1fac914564 100644 --- a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt +++ b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt @@ -119,9 +119,9 @@ expect enum class ErrorCode : CodeDescription { RLM_ERR_CUSTOM_ERROR, RLM_ERR_CLIENT_USER_NOT_FOUND, RLM_ERR_CLIENT_USER_NOT_LOGGED_IN, - RLM_ERR_CLIENT_APP_DEALLOCATED, RLM_ERR_CLIENT_REDIRECT_ERROR, RLM_ERR_CLIENT_TOO_MANY_REDIRECTS, + RLM_ERR_CLIENT_USER_ALREADY_NAMED, RLM_ERR_BAD_TOKEN, RLM_ERR_MALFORMED_JSON, RLM_ERR_MISSING_JSON_KEY, diff --git a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 96945a1a68..eab6609f66 100644 --- a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -582,8 +582,8 @@ expect object RealmInterop { appId: String ) - fun realm_sync_client_config_set_base_file_path( - syncClientConfig: RealmSyncClientConfigurationPointer, + fun realm_app_config_set_base_file_path( + appConfig: RealmAppConfigurationPointer, basePath: String ) @@ -593,13 +593,13 @@ expect object RealmInterop { fun realm_set_log_level(level: CoreLogLevel) - fun realm_sync_client_config_set_metadata_mode( - syncClientConfig: RealmSyncClientConfigurationPointer, + fun realm_app_config_set_metadata_mode( + appConfig: RealmAppConfigurationPointer, metadataMode: MetadataMode ) - fun realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig: RealmSyncClientConfigurationPointer, + fun realm_app_config_set_metadata_encryption_key( + appConfig: RealmAppConfigurationPointer, encryptionKey: ByteArray ) fun realm_sync_client_config_set_user_agent_binding_info( diff --git a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt index 6f29186e39..5145aa2b8d 100644 --- a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt +++ b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt @@ -116,9 +116,9 @@ actual enum class ErrorCode(actual override val description: String?, actual ove RLM_ERR_CUSTOM_ERROR("CustomError", realm_errno_e.RLM_ERR_CUSTOM_ERROR), RLM_ERR_CLIENT_USER_NOT_FOUND("ClientUserNotFound", realm_errno_e.RLM_ERR_CLIENT_USER_NOT_FOUND), RLM_ERR_CLIENT_USER_NOT_LOGGED_IN("ClientUserNotLoggedIn", realm_errno_e.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN), - RLM_ERR_CLIENT_APP_DEALLOCATED("ClientAppDeallocated", realm_errno_e.RLM_ERR_CLIENT_APP_DEALLOCATED), RLM_ERR_CLIENT_REDIRECT_ERROR("ClientRedirectError", realm_errno_e.RLM_ERR_CLIENT_REDIRECT_ERROR), RLM_ERR_CLIENT_TOO_MANY_REDIRECTS("ClientTooManyRedirects", realm_errno_e.RLM_ERR_CLIENT_TOO_MANY_REDIRECTS), + RLM_ERR_CLIENT_USER_ALREADY_NAMED("ClientUserAlreadyNamed", realm_errno_e.RLM_ERR_CLIENT_USER_ALREADY_NAMED), RLM_ERR_BAD_TOKEN("BadToken", realm_errno_e.RLM_ERR_BAD_TOKEN), RLM_ERR_MALFORMED_JSON("MalformedJson", realm_errno_e.RLM_ERR_MALFORMED_JSON), RLM_ERR_MISSING_JSON_KEY("MissingJsonKey", realm_errno_e.RLM_ERR_MISSING_JSON_KEY), diff --git a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index a819965c2c..b9c5d68f08 100644 --- a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -17,7 +17,6 @@ package io.realm.kotlin.internal.interop import io.realm.kotlin.internal.interop.Constants.ENCRYPTION_KEY_LENGTH -import io.realm.kotlin.internal.interop.RealmInterop.cptr import io.realm.kotlin.internal.interop.sync.ApiKeyWrapper import io.realm.kotlin.internal.interop.sync.AuthProvider import io.realm.kotlin.internal.interop.sync.CoreConnectionState @@ -1099,7 +1098,7 @@ actual object RealmInterop { syncClientConfig: RealmSyncClientConfigurationPointer, basePath: String ): RealmAppPointer { - return LongPointerWrapper(realmc.realm_app_create(appConfig.cptr(), syncClientConfig.cptr()), managed = true) + return LongPointerWrapper(realmc.realm_app_create(appConfig.cptr()), managed = true) } actual fun realm_app_log_in_with_credentials( @@ -1288,11 +1287,11 @@ actual object RealmInterop { ) } - actual fun realm_sync_client_config_set_base_file_path( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_base_file_path( + appConfig: RealmAppConfigurationPointer, basePath: String ) { - realmc.realm_sync_client_config_set_base_file_path(syncClientConfig.cptr(), basePath) + realmc.realm_app_config_set_base_file_path(appConfig.cptr(), basePath) } actual fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean) { @@ -1307,22 +1306,22 @@ actual object RealmInterop { realmc.realm_set_log_level(level.priority) } - actual fun realm_sync_client_config_set_metadata_mode( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_mode( + appConfig: RealmAppConfigurationPointer, metadataMode: MetadataMode ) { - realmc.realm_sync_client_config_set_metadata_mode( - syncClientConfig.cptr(), + realmc.realm_app_config_set_metadata_mode( + appConfig.cptr(), metadataMode.nativeValue ) } - actual fun realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_encryption_key( + appConfig: RealmAppConfigurationPointer, encryptionKey: ByteArray ) { - realmc.realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig.cptr(), + realmc.realm_app_config_set_metadata_encryption_key( + appConfig.cptr(), encryptionKey ) } diff --git a/packages/cinterop/src/native/realm.def b/packages/cinterop/src/native/realm.def index 01f59930d9..925f075c04 100644 --- a/packages/cinterop/src/native/realm.def +++ b/packages/cinterop/src/native/realm.def @@ -1,5 +1,6 @@ headers = realm.h realm/error_codes.h headerFilter = realm.h realm/error_codes.h +compilerOpts = -DREALM_APP_SERVICES=1 // Relative paths in def file depends are resolved differently dependent on execution // location // https://youtrack.jetbrains.com/issue/KT-43439 diff --git a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt index 3c11d2f557..4d401a8ff3 100644 --- a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt +++ b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt @@ -120,9 +120,9 @@ actual enum class ErrorCode( RLM_ERR_CUSTOM_ERROR("CustomError", realm_errno.RLM_ERR_CUSTOM_ERROR), RLM_ERR_CLIENT_USER_NOT_FOUND("ClientUserNotFound", realm_errno.RLM_ERR_CLIENT_USER_NOT_FOUND), RLM_ERR_CLIENT_USER_NOT_LOGGED_IN("ClientUserNotLoggedIn", realm_errno.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN), - RLM_ERR_CLIENT_APP_DEALLOCATED("ClientAppDeallocated", realm_errno.RLM_ERR_CLIENT_APP_DEALLOCATED), RLM_ERR_CLIENT_REDIRECT_ERROR("ClientRedirectError", realm_errno.RLM_ERR_CLIENT_REDIRECT_ERROR), RLM_ERR_CLIENT_TOO_MANY_REDIRECTS("ClientTooManyRedirects", realm_errno.RLM_ERR_CLIENT_TOO_MANY_REDIRECTS), + RLM_ERR_CLIENT_USER_ALREADY_NAMED("ClientUserAlreadyNamed", realm_errno.RLM_ERR_CLIENT_USER_ALREADY_NAMED), RLM_ERR_BAD_TOKEN("BadToken", realm_errno.RLM_ERR_BAD_TOKEN), RLM_ERR_MALFORMED_JSON("MalformedJson", realm_errno.RLM_ERR_MALFORMED_JSON), RLM_ERR_MISSING_JSON_KEY("MissingJsonKey", realm_errno.RLM_ERR_MISSING_JSON_KEY), diff --git a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 059268f986..08494917f2 100644 --- a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -97,7 +97,6 @@ import platform.posix.strerror import platform.posix.uint64_t import platform.posix.uint8_tVar import realm_wrapper.realm_app_error_t -import realm_wrapper.realm_app_user_apikey_t import realm_wrapper.realm_binary_t import realm_wrapper.realm_class_info_t import realm_wrapper.realm_class_key_tVar @@ -123,7 +122,6 @@ import realm_wrapper.realm_results_t import realm_wrapper.realm_scheduler_t import realm_wrapper.realm_set_t import realm_wrapper.realm_string_t -import realm_wrapper.realm_sync_client_metadata_mode import realm_wrapper.realm_sync_session_resync_mode import realm_wrapper.realm_sync_session_state_e import realm_wrapper.realm_sync_session_stop_policy_e @@ -134,7 +132,6 @@ import realm_wrapper.realm_sync_socket_timer_t import realm_wrapper.realm_sync_socket_websocket_t import realm_wrapper.realm_sync_socket_write_callback_t import realm_wrapper.realm_t -import realm_wrapper.realm_user_identity import realm_wrapper.realm_user_t import realm_wrapper.realm_value_t import realm_wrapper.realm_value_type @@ -2001,7 +1998,7 @@ actual object RealmInterop { syncClientConfig: RealmSyncClientConfigurationPointer, basePath: String ): RealmAppPointer { - return CPointerWrapper(realm_wrapper.realm_app_create(appConfig.cptr(), syncClientConfig.cptr()), managed = true) + return CPointerWrapper(realm_wrapper.realm_app_create(appConfig.cptr()), managed = true) } actual fun realm_app_get_current_user(app: RealmAppPointer): RealmUserPointer? { @@ -2068,7 +2065,7 @@ actual object RealmInterop { app.cptr(), user.cptr(), name, - staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> + staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> handleAppCallback(userData, error) { apiKey!!.pointed.let { ApiKeyWrapper( @@ -2159,7 +2156,7 @@ actual object RealmInterop { app.cptr(), user.cptr(), id.realm_object_id_t(), - staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> + staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> handleAppCallback(userData, error) { apiKey!!.pointed.let { ApiKeyWrapper( @@ -2188,7 +2185,7 @@ actual object RealmInterop { realm_wrapper.realm_app_user_apikey_provider_client_fetch_apikeys( app.cptr(), user.cptr(), - staticCFunction { userData: CPointer?, apiKeys: CPointer?, count: size_t, error: CPointer? -> + staticCFunction { userData: CPointer?, apiKeys: CPointer?, count: size_t, error: CPointer? -> handleAppCallback(userData, error) { val result = arrayOfNulls(count.toInt()) for (i in 0 until count.toInt()) { @@ -2339,8 +2336,8 @@ actual object RealmInterop { actual fun realm_user_get_all_identities(user: RealmUserPointer): List { memScoped { val count = AuthProvider.values().size - val properties = allocArray(count) - val outCount = alloc() + val properties = allocArray(count) + val outCount: ULongVarOf = alloc() realm_wrapper.realm_user_get_all_identities( user.cptr(), properties, @@ -2434,11 +2431,11 @@ actual object RealmInterop { ) } - actual fun realm_sync_client_config_set_base_file_path( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_base_file_path( + appConfig: RealmAppConfigurationPointer, basePath: String ) { - realm_wrapper.realm_sync_client_config_set_base_file_path(syncClientConfig.cptr(), basePath) + realm_wrapper.realm_app_config_set_base_file_path(appConfig.cptr(), basePath) } actual fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean) { @@ -2460,24 +2457,24 @@ actual object RealmInterop { realm_wrapper.realm_set_log_level(level.priority.toUInt()) } - actual fun realm_sync_client_config_set_metadata_mode( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_mode( + appConfig: RealmAppConfigurationPointer, metadataMode: MetadataMode ) { - realm_wrapper.realm_sync_client_config_set_metadata_mode( - syncClientConfig.cptr(), - realm_sync_client_metadata_mode.byValue(metadataMode.metadataValue.toUInt()) + realm_wrapper.realm_app_config_set_metadata_mode( + appConfig.cptr(), + realm_wrapper.realm_sync_client_metadata_mode.byValue(metadataMode.metadataValue.toUInt()) ) } - actual fun realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_encryption_key( + appConfig: RealmAppConfigurationPointer, encryptionKey: ByteArray ) { memScoped { val encryptionKeyPointer = encryptionKey.refTo(0).getPointer(memScope) - realm_wrapper.realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig.cptr(), + realm_wrapper.realm_app_config_set_metadata_encryption_key( + appConfig.cptr(), encryptionKeyPointer as CPointer ) } diff --git a/packages/external/core b/packages/external/core index 316889b967..cde3adb764 160000 --- a/packages/external/core +++ b/packages/external/core @@ -1 +1 @@ -Subproject commit 316889b967f845fbc10b4422f96c7eadd47136f2 +Subproject commit cde3adb7649d3361806dbbae0cf353b8fdc4d54e diff --git a/packages/jni-swig-stub/realm.i b/packages/jni-swig-stub/realm.i index 9ea8b25428..8028cd1651 100644 --- a/packages/jni-swig-stub/realm.i +++ b/packages/jni-swig-stub/realm.i @@ -1,5 +1,7 @@ %module(directors="1") realmc +#define REALM_APP_SERVICES 1 + %{ #include "realm.h" #include @@ -523,6 +525,8 @@ $result = SWIG_JavaArrayOutLonglong(jenv, (long long *)result, 2); %ignore "realm_dictionary_add_notification_callback"; %ignore "realm_results_add_notification_callback"; +%ignore "realm_app_config_get_sync_client_config"; + // Swig doesn't understand __attribute__ so eliminate it #define __attribute__(x) diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt index 08a6b9285d..0943b8c668 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt @@ -132,7 +132,7 @@ public class AppConfigurationImpl @OptIn(ExperimentalKBsonSerializerApi::class) bundleId: String, networkTransport: NetworkTransport ): RealmAppConfigurationPointer { - return RealmInterop.realm_app_config_new( + val appConfigPtr = RealmInterop.realm_app_config_new( appId = appId, baseUrl = baseUrl, networkTransport = RealmInterop.realm_network_transport_new(networkTransport), @@ -146,6 +146,15 @@ public class AppConfigurationImpl @OptIn(ExperimentalKBsonSerializerApi::class) frameworkVersion = RUNTIME_VERSION ) ) + RealmInterop.realm_app_config_set_base_file_path(appConfigPtr, syncRootDirectory) + RealmInterop.realm_app_config_set_metadata_mode(appConfigPtr, metadataMode) + encryptionKey?.let { + RealmInterop.realm_app_config_set_metadata_encryption_key( + appConfigPtr, + it + ) + } + return appConfigPtr } private fun initializeSyncClientConfig( @@ -157,21 +166,6 @@ public class AppConfigurationImpl @OptIn(ExperimentalKBsonSerializerApi::class) .also { syncClientConfig -> // Initialize client configuration first RealmInterop.realm_sync_client_config_set_default_binding_thread_observer(syncClientConfig, appId) - RealmInterop.realm_sync_client_config_set_metadata_mode( - syncClientConfig, - metadataMode - ) - RealmInterop.realm_sync_client_config_set_base_file_path( - syncClientConfig, - syncRootDirectory - ) - - encryptionKey?.let { - RealmInterop.realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig, - it - ) - } sdkInfo?.let { RealmInterop.realm_sync_client_config_set_user_agent_binding_info( diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt index fb72304c78..b86783b6f0 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt @@ -156,11 +156,8 @@ internal fun convertAppError(appError: AppError): Throwable { ErrorCode.RLM_ERR_CLIENT_USER_NOT_FOUND -> { IllegalStateException(msg) } - ErrorCode.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN -> { - InvalidCredentialsException(msg) - } - ErrorCode.RLM_ERR_CLIENT_APP_DEALLOCATED -> { - AppException(msg) + ErrorCode.RLM_ERR_CLIENT_USER_ALREADY_NAMED -> { + CredentialsCannotBeLinkedException(msg) } else -> { AppException(msg) diff --git a/packages/test-base/build.gradle.kts b/packages/test-base/build.gradle.kts index e56161f7d7..f8eedddd70 100644 --- a/packages/test-base/build.gradle.kts +++ b/packages/test-base/build.gradle.kts @@ -247,7 +247,7 @@ kotlin { } targets.filterIsInstance().forEach { simulatorTargets -> simulatorTargets.testRuns.forEach { testRun -> - testRun.deviceId = project.findProperty("iosDevice")?.toString() ?: "iPhone 12" + testRun.deviceId = project.findProperty("iosDevice")?.toString() ?: "iPhone 14" } } sourceSets { diff --git a/packages/test-sync/build.gradle.kts b/packages/test-sync/build.gradle.kts index 81070f4e04..f24c626ba6 100644 --- a/packages/test-sync/build.gradle.kts +++ b/packages/test-sync/build.gradle.kts @@ -258,7 +258,7 @@ kotlin { } targets.filterIsInstance().forEach { simulatorTargets -> simulatorTargets.testRuns.forEach { testRun -> - testRun.deviceId = project.findProperty("iosDevice")?.toString() ?: "iPhone 12" + testRun.deviceId = project.findProperty("iosDevice")?.toString() ?: "iPhone 14" } } sourceSets { diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt index c92ffc82dc..576ab58307 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt @@ -555,7 +555,7 @@ class AppTests { @Test @OptIn(ExperimentalEdgeServerApi::class) fun changeBaseUrl_invalidUrl() { - assertFailsWithMessage("URL missing scheme separator") { + assertFailsWithMessage("URL missing scheme") { runBlocking { app.updateBaseUrl("hello world") } diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt index 51437d237c..a57e0bdbf5 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt @@ -54,6 +54,7 @@ import kotlinx.coroutines.withTimeout import org.mongodb.kbson.ObjectId import kotlin.test.AfterTest import kotlin.test.BeforeTest +import kotlin.test.Ignore import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith @@ -84,6 +85,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun downloadProgressListener_changesOnly() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { uploadRealm -> // Verify that we: @@ -173,6 +175,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun worksAfterExceptions() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { realm -> realm.writeSampleData(TEST_SIZE, timeout = TIMEOUT) @@ -195,6 +198,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun worksAfterCancel() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { realm -> realm.writeSampleData(TEST_SIZE, timeout = TIMEOUT) @@ -225,6 +229,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun triggerImmediatelyWhenRegistered() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { realm -> withTimeout(10.seconds) { diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt index 417c4c5516..34b69a847d 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt @@ -488,7 +488,7 @@ class UserTests { emailUser1.linkCredentials(Credentials.anonymous()) }.let { assertTrue( - it.message!!.contains("linking an anonymous identity is not allowed"), + it.message!!.contains("Cannot add anonymous credentials to an existing user"), it.message ) }