Releases: realm/realm-dotnet
12.4.1
12.4.1 (2024-09-16)
Fixed
- Fixed a possible disruption of sync traffic under heavy load when using managed web sockets where malformed binary messages cause the server to drop the connection and force the client to reconnect and upload again. (Issue #3671).
Compatibility
- Realm Studio: 15.0.0 or later.
Internal
- Using Core x.y.z.
20.0.0
20.0.0 (2024-09-09)
Breaking Changes
- Removed all functionality related to App Services/Atlas Device Sync.
Compatibility
- Realm Studio: 15.0.0 or later.
Internal
- Using Core 20.0.1.
12.4.0
12.4.0 (2024-08-25)
Enhancements
- Introduce a
ReconnectBackoffOptions
property onSyncTimeoutOptions
that allows control over the delay the sync client applies before attempting to reconnect. (PR #3661). - Role and permissions changes no longer require a client reset to update the local realm. (Core 14.11.0)
- On Windows devices Device Sync will additionally look up SSL certificates in the Windows Trusted Root Certification Authorities certificate store when establishing a connection. (Core 14.11.0)
- Sync log statements now include the app services connection id in their prefix (e.g
Connection[1:<connection id>] Session[1]: log message
) to make correlating sync activity to server logs easier during troubleshooting. (Core 14.11.2) - Improve sync bootstrap performance by reducing the number of table selections in the replication logs for embedded objects. (Core 14.12.0)
- Released a read lock which was pinned for the duration of a mutable subscription even after commit. This frees resources earlier, and may improve performance of sync bootstraps where the starting state is large. (Core 14.12.0)
- Client reset cycle detection now checks if the previous recovery attempt was made by the same core version, and if not attempts recovery again. (Core 14.12.0)
- Updated bundled OpenSSL version to 3.3.1. (Core 14.12.0)
Fixed
- Sync download progress was only updated when bootstraps completed, making it always be 0 before the first completion and then forever 1. (Core 14.11.0)
- Sync client can crash if a session is resumed while the session is being suspended. (Core 14.11.0)
- If a sync session is interrupted by a disconnect or restart while downloading a bootstrap, stale data from the previous bootstrap may be included when the session reconnects and downloads the bootstrap. This can lead to objects stored in the database that do not match the actual state of the server and potentially leading to compensating writes. (Core 14.11.0)
- Fixed unnecessary server roundtrips when there is no download to acknowledge. (Core 14.11.0)
- App subscription callback was getting fired before the user profile was retrieved on login, leading to an empty user profile when using the callback. (Core 14.11.1)
- Sync client may report duplicate compensating write errors. (Core 14.11.2)
- Fixed an "invalid column key" exception when using a RQL "BETWEEN" query on an int or timestamp property across links. (Core 14.12.0)
- Fixed conflict resolution bug related to ArrayErase and Clear instructions, which could sometimes cause an "Invalid prior_size" exception to prevent synchronization. (Core 14.12.0)
- Fixed bug which would prevent eventual consistency during conflict resolution. Affected clients would experience data divergence and potentially consistency errors as a result. (Core 14.12.0)
- Fixed issues loading the native Realm libraries on Linux ARMv7 systems when they linked against our bundled OpenSSL resulting in errors like
unexpected reloc type 0x03
. (Core 14.12.0) Realm.Copy()
would sometimes incorrectly throw an exception claiming that there were unuploaded local changes when the source Realm is a synchronized Realm. (Core 14.12.0)
Compatibility
- Realm Studio: 15.0.0 or later.
Internal
- Using Core 14.12.0.
12.3.0
12.3.0 (2024-07-17)
Deprecations
- The
Logger
has been deprecated in favor ofRealmLogger
, whichLogger
currently derives from. (PR #3634)- The
Logger.LogLevel
set
andget
accessors have been deprecated. Please useRealmLogger.SetLogLevel()
andRealmLogger.GetLogLevel()
(see Enhancements below). - The
Logger.Function(Action<LogLevel, string> logFunction)
have been deprecated. Please useRealmLogger.Function(Action<LogLevel, LogCategory, string> logFunction)
(see Enhancements below).
- The
Enhancements
- Allow
ShouldCompactOnLaunch
to be set onSyncConfiguration
, not onlyRealmConfiguration
. (Issue #3617) - Reduce the size of the local transaction log produced by creating objects, improving the performance of insertion-heavy transactions (Core 14.10.0).
- Performance has been improved for range queries on integers and timestamps. Requires that you use the "BETWEEN" operation in
Realm.All<T>().Filter(...)
. (Core 14.10.1) - Allowed
ShouldCompactOnLaunch
to be set onSyncConfiguration
, not onlyRealmConfiguration
. (Issue #3617) - Introduced a
LogCategory
and allowed for more control over which category of messages should be logged and at which criticality level. (PR #3634)- Allowed setting and getting a
LogLevel
for a givenLogCategory
. The hierarchy of categories starts atLogCategory.Realm
.RealmLogger.SetLogLevel(LogLevel.Warn, LogCategory.Realm.Sync); RealmLogger.GetLogLevel(LogCategory.Realm.Sync.Client.Session); // LogLevel.Warn
- Added a function logger that accepts a callback that will receive the
LogLevel
,LogCategory
, and the message when invoked.RealmLogger.Default = RealmLogger.Function((level, category, message) => /* custom implementation */);
- Added a
RealmLogger.Log()
overload taking a category. The pre-existingLog()
API will implicitly log atLogCategory.Realm.SDK
.RealmLogger.Default.Log(LogLevel.Warn, LogCategory.Realm, "A warning message");
- Allowed setting and getting a
- On Windows devices Device Sync will additionally look up SSL certificates in the Windows Trusted Root Certification Authorities certificate store when establishing a connection. (Core 14.11.0)
- Role and permissions changes no longer require a client reset to update the local realm. (Core 14.11.0)
Fixed
- A
ForCurrentlyOutstandingWork
progress notifier would not immediately call its callback after registration. Instead you would have to wait for some data to be received to get your first update - if you were already caught up when you registered the notifier you could end up waiting a long time for the server to deliver a download that would call/expire your notifier. (Core 14.8.0) - After compacting, a file upgrade would be triggered. This could cause loss of data if
ShouldDeleteIfMigrationNeeded
is set totrue
. (Issue #3583, Core 14.9.0) - Passing in a deleted object as a substitution argument to
.Filter()
would throw a confusing error with a message starting withinvalid RQL for table
. It now throws a more descriptive error instead. (Issue #3619) - Fix some client resets (such as migrating to flexible sync) potentially failing with AutoClientResetFailed if a new client reset condition (such as rolling back a flexible sync migration) occurred before the first one completed. (Core 14.10.0)
- Encrypted files on Windows had a maximum size of 2GB even on x64 due to internal usage of
off_t
, which is a 32-bit type on 64-bit Windows. (Core 14.10.0) - The encryption code no longer behaves differently depending on the system page size, which should entirely eliminate a recurring source of bugs related to copying encrypted Realm files between platforms with different page sizes. One known outstanding bug was (RNET-1141), where opening files on a system with a larger page size than the writing system would attempt to read sections of the file which had never been written to. (Core 14.10.0)
- There were several complicated scenarios which could result in stale reads from encrypted files in multiprocess scenarios. These were very difficult to hit and would typically lead to a crash, either due to an assertion failure or DecryptionFailure being thrown. (Core 14.10.0)
- Encrypted files have some benign data races where we can memcpy a block of memory while another thread is writing to a limited range of it. It is logically impossible to ever read from that range when this happens, but Thread Sanitizer quite reasonably complains about this. We now perform a slower operations when running with TSan which avoids this benign race. (Core 14.10.0)
- Tokenizing strings for full-text search could pass values outside the range [-1, 255] to
isspace()
, which is undefined behavior. (Core 14.10.0) - Opening an Flexible Sync Realm asynchronously may not wait to download all data. (Core 14.10.1)
- Clearing a List of
RealmValue
in an upgraded file would lead to an assertion failing. (Core 14.10.1) - You could get unexpected merge results when assigning to a nested collection. (Core 14.10.2)
- Fixed removing backlinks from the wrong objects if the link came from a nested list, nested dictionary, top-level dictionary, or list of
RealmValue
, and the source table had more than 256 objects. This could manifest asarray_backlink.cpp:112: Assertion failed: int64_t(value >> 1) == key.value
when removing an object. (Core 14.10.3) - Fixed the collapse/rejoin of clusters which contained nested collections with links. This could manifest as
array.cpp:319: Array::move() Assertion failed: begin <= end [2, 1]
when removing an object. (Core 14.10.3) Session.WaitForUpload()
was inconsistent in how it handled commits which did not produce any changesets to upload. Previously it would sometimes complete immediately if all commits waiting to be uploaded were empty, and at other times it would wait for a server roundtrip. It will now always complete immediately. (Core 14.10.3)- When a property is remapped, calling
.Filter("... SORT/DISTINCT(mapped-to-name)")
with the internal name could throw an error likeCannot sort on key path 'NAME': property 'PersonObject.NAME' does not exist
. (Core 14.10.4) - Sync client can crash if a session is resumed while the session is being suspended. (Core 14.11.0)
- If a sync session is interrupted by a disconnect or restart while downloading a bootstrap, stale data from the previous bootstrap may be included when the session reconnects and downloads the bootstrap. This can lead to objects stored in the database that do not match the actual state of the server and potentially leading to compensating writes. (Core 14.11.0)
- Fixed unnecessary server roundtrips when there is no download to acknowledge. (Core 14.11.0)
Compatibility
- Realm Studio: 15.0.0 or later.
Internal
- Using Core v14.10.3.
12.2.0
12.2.0 (2024-05-22)
Enhancements
-
Added support for
Migration.FindInNewRealm
which is a helper that allows you to lookup the object in the post-migration Realm that corresponds to an object from the pre-migration Realm. (Issue #3600) -
Added
[System.Reflection.Obfuscation]
on the generatedRealmSchema
field to improve compatibility with obfuscation tools that change field and property names of generated classes. (Issue #3574) -
Added support for list and dictionaries of
RealmValue
(IList<RealmValue>
andIDictionary<string, RealmValue>
) to be contained in aRealmValue
. Lists and dictionaries can contain an arbitrary number of collections themselves. It is possible to convert an existing collection to aRealmValue
using the new static methodsRealmValue.List
andRealmValue.Dictionary
or using the implicit operators if converting from common types likeList
,RealmValue[]
orDictionary
. Finally, it is possible to obtain the contained collections by using the new conversion methodAsList
andAsDictionary
. For example:var list = new List<RealmValue> { 1, true, "stringVal" }; var rvo = realm.Write(() => { return realm.Add(new RealmValueObject { RealmValueProperty = list}); }); var retrievedList = rvo.RealmValueProperty.AsList();
(PR #3441)
Fixed
- Accessing
App.CurrentUser
from within aUser.Changed
notification would deadlock. (Core 14.7.0) - Inserting the same link to the same key in a dictionary more than once would incorrectly create multiple backlinks to the object. This did not appear to cause any crashes later, but would have affected the value returned by
RealmObject.BacklinksCount
and queries involving backlinks counts. (Core 14.7.0) - Fixed an issue that would cause
RealmObject.DynamicApi.GetList/Set/Dictionary
to fail when the collection contains primitive values. (Issue #3597)
Compatibility
- Realm Studio: 15.0.0 or later.
Internal
- Using Core 14.7.0.
12.1.0
12.1.0 (2024-05-01)
Enhancements
- Added an experimental API to update the base url for an application at runtime -
App.UpdateBaseUriAsync()
. This intended to be used for roaming between edge server and cloud. (Issue #3521)
Fixed
- The returned value from
MongoClient.Collection.FindOneAsync
is now a nullable document to more explicitly convey thatnull
may be returned in case no object matched the filter. (PR #3586) - Fixed crash when integrating removal of already removed dictionary key. (Core 14.5.2)
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 14.6.0)- Fixed several issues around encrypted file portability (copying a "bundled" encrypted Realm from one device to another): (Core 14.6.0)
- Fixed
Assertion failed: new_size % (1ULL << m_page_shift) == 0
when opening an encrypted Realm less than 64Mb that was generated on a platform with a different page size than the current platform. - Fixed a
DecryptionFailed
exception thrown when opening a small (<4k of data) Realm generated on a device with a page size of 4k if it was bundled and opened on a device with a larger page size. - Fixed an issue during a subsequent open of an encrypted Realm for some rare allocation patterns when the top ref was within ~50 bytes of the end of a page. This could manifest as a DecryptionFailed exception or as an assertion:
encrypted_file_mapping.hpp:183: Assertion failed: local_ndx < m_page_state.size()
.
- Fixed
- 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 14.6.0)
- Improve perfomance of "chained OR equality" queries for UUID/ObjectId types and RQL parsed "IN" queries on string/int/uuid/objectid types. (Core 14.6.0)
- 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 14.6.1)
Compatibility
- Realm Studio: 15.0.0 or later.
Internal
- Using Core 14.6.1.
12.0.0
12.0.0 (2024-04-17)
File format version bumped. Old files will be automatically upgraded but cannot be downgraded and opened with older versions of the .NET SDK.
Breaking Changes
- Added automatic serialization and deserialization of Realm classes when using methods on
MongoClient.Collection
, without the need to annotate classes withMongoDB.Bson
attributes. This feature required to change the default serialization for various types (includingDateTimeOffset
). If you prefer to use the previous serialization, you need to callRealm.SetLegacySerialization
before any kind of serialization is done, otherwise it may not work as epxected. #3459 SyncProgress.TransferredBytes
andSyncProgress.TransferableBytes
have been removed in favour ofSyncProgress.ProgressEstimate
, a double value between 0.0 and 1.0 that expresses the percentage estimate of the current progress. (Issue #3478)- Support for upgrading from Realm files produced by RealmCore v5.23.9 (Realm .NET v5.0.1) or earlier is no longer supported. (Core 14.0.0)
String
andbyte[]
are now strongly typed for comparisons and queries. This change is especially relevant when querying for a string constant on aRealmValue
property, as now only strings will be returned. If searching for binary data is desired, then that type must be specified by the constant. In RQL (.Filter()
) the new way to specify a binary constant is to useRealmValueProp = bin('xyz')
orRealmValueProp = binary('xyz')
. (Core 14.0.0)- Sorting order of strings has changed to use standard unicode codepoint order instead of grouping similar english letters together. A noticeable change will be from "aAbBzZ" to "ABZabz". (Core 14.0.0)
- In RQL (
Filter()
), if you want to query using@type
operation, you must useobjectlink
to match links to objects.object
is reserved for dictionary types. (Core 14.0.0) - Opening realm with file format 23 or lower (Realm .NET versions earlier than 12.0.0) in read-only mode will crash. (Core 14.0.0)
Enhancements
-
Reduced memory usage of
RealmValue
. (PR #3441) -
Add support for passing a key paths collection (
KeyPathsCollection
) when usingIRealmCollection.SubscribeForNotifications
. Passing aKeyPathsCollection
allows to specify which changes in properties should raise a notification.A
KeyPathsCollection
can be obtained by:- building it explicitly by using the methods
KeyPathsCollection.Of
orKeyPathsCollection.Of<T>
; - building it implicitly with the conversion from a
List
or array ofKeyPath
or strings; - getting one of the static values
Full
andShallow
for full and shallow notifications respectively.
A
KeyPath
can be obtained by implicit conversion from a string or built from an expression using theKeyPath.ForExpression<T>
method.For example:
var query = realm.All<Person>(); KeyPath kp1 = "Email"; KeyPath kp2 = KeyPath.ForExpression<Person>(p => p.Name); KeyPathsCollection kpc; //Equivalent declarations kpc = KeyPathsCollection.Of("Email", "Name"); kpc = KeyPathsCollection.Of<Person>(p => p.Email, p => p.Name); kpc = new List<KeyPath> {"Email", "Name"}; kpc = new List<KeyPath> {kp1, kp2}; query.SubscribeForNotifications(NotificationCallback, kpc);
(PR #3501 )
- building it explicitly by using the methods
-
Added the
MongoClient.GetCollection<T>
method to get a collection of documents from MongoDB that can be deserialized in Realm objects. This methods works the same asMongoClient.GetDatabase(dbName).GetCollection(collectionName)
, but the database name and collection name are automatically derived from the Realm object class. #3414 -
Improved performance of RQL (
.Filter()
) queries on a non-linked string property using: >, >=, <, <=, operators and fixed behaviour that a null string should be evaulated as less than everything, previously nulls were not matched. (Core 13.27.0) -
Updated bundled OpenSSL version to 3.2.0. (Core 13.27.0)
-
Storage of Decimal128 properties has been optimised so that the individual values will take up 0 bits (if all nulls), 32 bits, 64 bits or 128 bits depending on what is needed. (Core 14.0.0)
-
Add support for collection indexes in RQL (
Filter()
) queries.
For example:var people = realm.All<Person>(); //People whose first dog is called "Fluffy" var query1 = people.Filter("ListOfDogs[FIRST].Name = $0", "Fluffy") //People whose last dog is called "Fluffy" var query2 = people.Filter("ListOfDogs[LAST].Name = $0", "Fluffy") //People whose second dog is called "Fluffy" var query3 = people.Filter("ListOfDogs[2].Name = $0", "Fluffy") //People that have a dog called "Fluffy" var query4 = people.Filter("ListOfDogs[*].Name = $0", "Fluffy") //People that have 3 dogs var query5 = people.Filter("ListOfDogs[SIZE] = $0", 3)
(Core 14.0.0)
-
Added support for indexed
RealmValue
properties. (PR #3544) -
Improve performance of object notifiers with complex schemas and very simple changes to process by as much as 20%. (Core 14.2.0)
-
Improve performance with very large number of notifiers as much as 75%. (Core 14.2.0)
-
Improve file compaction performance on platforms with page sizes greater than 4k (for example arm64 Apple platforms) for files less than 256 pages in size. (Core 14.4.0)
-
The default base url in
AppConfiguration
has been updated to point toservices.cloud.mongodb.com
. See https://www.mongodb.com/docs/atlas/app-services/domain-migration/ for more information. (Issue #3551)
Fixed
- Fixed RQL (
.Filter()
) queries likeindexed_property == NONE {x}
which mistakenly matched on only x instead of not x. This only applies when an indexed property with equality (==, or IN) matches withNONE
on a list of one item. If the constant list contained more than one value then it was working correctly. (Core 13.27.0) - Uploading the changesets recovered during an automatic client reset recovery may lead to 'Bad server version' errors and a new client reset. (Core 13.27.0)
- Fixed crash in fulltext index using prefix search with no matches. (Core 13.27.0)
- Fixed a crash with Assertion
failed: m_initiated
during sync session startup. (Core 13.27.0) - Fixed a TSAN violation where the user thread could race to read m_finalized with the sync event loop. (Core 13.27.0)
- Fix a minor race condition when backing up Realm files before a client reset which could have lead to overwriting an existing file. (Core 13.27.0)
- Boolean property
ChangeSet.IsCleared
that is true when the collection gets cleared is now also raised forIDictionary
, aligning it toISet
andIList
. (Core 14.0.0) - Fixed equality queries on
RealmValue
properties with an index. (Core 14.0.0) - Fixed a crash that would happen when more than 8388606 links were pointing to a specific object.
- Fixed wrong results when querying for
NULL
value inIDictionary
. (Core 14.0.0) - A Realm generated on a non-apple ARM 64 device and copied to another platform (and vice-versa) were non-portable due to a sorting order difference. This impacts strings or binaries that have their first difference at a non-ascii character. These items may not be found in a set, or in an indexed column if the strings had a long common prefix (> 200 characters). (Core 14.0.0)
- Fixed an issue when removing items from a LnkLst that could result in invalidated links becoming visable which could cause crashes or exceptions when accessing those list items later on. This affects sync Realms where another client had previously removed a link in a linklist that has over 1000 links in it, and then further local removals from the same list caused the list to have fewer than 1000 items. (Core 14.2.0)
- Fix a spurious crash related to opening a Realm on background thread while the process was in the middle of exiting. (Core 14.3.0)
- Fix opening realm with cached user while offline results in fatal error and session does not retry connection. (Core 14.4.0)
- Fix an assertion failure "m_lock_info && m_lock_info->m_file.get_path() == m_filename" that appears to be related to opening a Realm while the file is in the process of being closed on another thread. (Core 14.5.0)
- Fixed diverging history due to a bug in the replication code when setting default null values (embedded objects included). (Core 14.5.0)
- Null pointer exception may be triggered when logging out and async commits callbacks not executed. (Core 14.5.0)
Compatibility
- Realm Studio: 15.0.0 or later.
Internal
- Using Core 14.5.1.
11.7.0
11.7.0 (2024-02-05)
Enhancements
- Automatic client reset recovery now does a better job of recovering changes when changesets were downloaded from the server after the unuploaded local changes were committed. If the local Realm happened to be fully up to date with the server prior to the client reset, automatic recovery should now always produce exactly the same state as if no client reset was involved. (Core 13.24.1)
- Exceptions thrown during bootstrap application will now be surfaced to the user rather than terminating the program with an unhandled exception. (Core 13.25.0)
- Allow the using
>
,>=
,<
,<=
operators inRealm.Filter()
queries for string constants. This is a case sensitive lexicographical comparison. Improved performance of RQL (.Filter()
) queries on a non-linked string property using: >, >=, <, <=, operators and fixed behaviour that a null string should be evaluated as less than everything, previously nulls were not matched. (Core 13.26.0-14-gdf25f)
Fixed
- Automatic client reset recovery would duplicate insertions in a list when recovering a write which made an unrecoverable change to a list (i.e. modifying or deleting a pre-existing entry), followed by a subscription change, followed by a write which added an entry to the list. (Core 13.24.0)
- During a client reset recovery a Set of links could be missing items, or an exception could be thrown that prevents recovery. (Core 13.24.0)
- During a client reset with recovery when recovering a move or set operation on a
IList<RealmObject>
orIList<RealmValue>
that operated on indices that were not also added in the recovery, links to an object which had been deleted by another client while offline would be recreated by the recovering client. But the objects of these links would only have the primary key populated and all other fields would be default values. Now, instead of creating these zombie objects, the lists being recovered skip such deleted links. (Core 13.24.0) - Errors encountered while reapplying local changes for client reset recovery on partition-based sync Realms would result in the client reset attempt not being recorded, possibly resulting in an endless loop of attempting and failing to automatically recover the client reset. (Core 13.24.0)
- Changesets have wrong timestamps if the local clock lags behind 2015-01-01T00:00:00Z. The sync client now throws an exception if that happens. (Core 13.24.1)
- If the very first open of a flexible sync Realm triggered a client reset, the configuration had an initial subscriptions callback, both before and after reset callbacks, and the initial subscription callback began a read transaction without ending it (which is normally going to be the case), opening the frozen Realm for the after reset callback would trigger a BadVersion exception. (Core 13.24.1)
- Automatic client reset recovery on flexible sync Realms would apply recovered changes in multiple write transactions, releasing the write lock in between. (Core 13.24.1)
- Having a class name of length 57 would make client reset crash as a limit of 56 was wrongly enforced. (Core 13.24.1)
- Fixed several causes of "decryption failed" exceptions that could happen when opening multiple encrypted Realm files in the same process while using Apple/linux and storing the Realms on an exFAT file system. (Core 13.24.1)
- Fixed several errors that could cause a crash of the sync client. (Core 13.25.0)
- Bad performance of initial Sync download involving many backlinks. (Core 13.25.1)
- Explicitly bumped the minimum version of System.Net.Security to 4.3.2 as 4.3.0 has been marked as vulnerable (more details can be found in the deprecation notice on the NuGet page).
- Handle EOPNOTSUPP when using posix_fallocate() and fallback to manually consume space. This should enable android users to open a Realm on restrictive filesystems. (Core 13.26.0)
- Application may crash with incoming_changesets.size() != 0 when a download message is mistaken for a bootstrap message. This can happen if the synchronization session is paused and resumed at a specific time. (Core 13.26.0)
- Fixed errors complaining about missing symbols such as
__atomic_is_lock_free
on ARMv7 Linux (Core 13.26.0) - Uploading the changesets recovered during an automatic client reset recovery may lead to 'Bad server version' errors and a new client reset. (Core 13.26.0-14-gdf25f)
- Fixed invalid data in error reason string when registering a subscription change notification after the subscription has already failed. (Core 13.26.0-14-gdf25f)
Compatibility
- Realm Studio: 13.0.0 or later.
Internal
- Using Core v13.26.0-14-gdf25f.
11.6.1
11.6.1 (2023-11-17)
Fixed
- Fixed FLX subscriptions not being sent to the server if the session was interrupted during bootstrapping. (Core 13.23.3)
- Fixed FLX subscriptions not being sent to the server if an upload message was sent immediately after a subscription was committed but before the sync client checks for new subscriptions. (Core 13.23.3)
- Fixed application crash with 'KeyNotFound' exception when subscriptions are marked complete after a client reset. (Core 13.23.3)
- A crash at a very specific time during a DiscardLocal client reset on a FLX Realm could leave subscriptions in an invalid state. (Core 13.23.4)
- Fixed an error "Invalid schema change (UPLOAD): cannot process AddColumn instruction for non-existent table" when using automatic client reset with recovery in dev mode to recover schema changes made locally while offline. (Core 13.23.4)
Compatibility
- Realm Studio: 13.0.0 or later.
Internal
- Using Core 13.23.4.
11.6.0
11.6.0 (2023-11-03)
Enhancements
-
Added the
App.EmailPasswordAuth.RetryCustomConfirmationAsync
method to be able to run again the confirmation function on the server for a given email. (Issue #3463) -
Added
User.Changed
event that can be used to notify subscribers that something about the user changed - typically this would be the user state or the access token. (Issue #3429) -
Added support for customizing the ignore attribute applied on certain generated properties of Realm models. The configuration option is called
realm.custom_ignore_attribute
and can be set in a global configuration file (more information about global configuration files can be found in the .NET documentation). The Realm generator will treat this as an opaque string, that will be appended to theIgnoreDataMember
andXmlIgnore
attributes already applied on these members. The attributes must be fully qualified unless the namespace they reside in is added to a global usings file. For example, this is how you would addJsonIgnore
fromSystem.Text.Json
:realm.custom_ignore_attribute = [System.Text.Json.Serialization.JsonIgnore]
(Issue #2579)
-
The Realm source generator will now error out in case a collection in the model classes is assigned to a non-null value either in a property initializer or in a constructor. Realm collections are initialized internally and assigning non-null values to the property is not supported, where the
null!
assignment is only useful to silence nullable reference type warnings, in reality the collection will never be null. (Issue #3455) -
Made WebSocket error logging more verbose when using
AppConfiguration.UseManagedWebSockets = true
. #3459
Fixed
- Added an error that is raised when interface based Realm classes are used with a language version lower than 8.0. At the same time, removed the use of
not
in the generated code, so that it's compatible with a minumum C# version of 8.0. (Issue #3265) - Logging into a single user using multiple auth providers created a separate SyncUser per auth provider. This mostly worked, but had some quirks:
- Sync sessions would not necessarily be associated with the specific SyncUser used to create them. As a result, querying a user for its sessions could give incorrect results, and logging one user out could close the wrong sessions.
- Existing local synchronized Realm files created using version of Realm from August - November 2020 would sometimes not be opened correctly and would instead be redownloaded.
- Removing one of the SyncUsers would delete all local Realm files for all SyncUsers for that user.
- Deleting the server-side user via one of the SyncUsers left the other SyncUsers in an invalid state.
- A SyncUser which was originally created via anonymous login and then linked to an identity would still be treated as an anonymous users and removed entirely on logout.
(Core 13.21.0)
- If a user was logged out while an access token refresh was in progress, the refresh completing would mark the user as logged in again and the user would be in an inconsistent state (Core 13.21.0).
- If querying over a geospatial dataset that had some objects with a type property set to something other than 'Point' (case insensitive) an exception would have been thrown. Instead of disrupting the query, those objects are now just ignored. (Core 13.21.0)
- Receiving a write_not_allowed error from the server would have led to a crash. (Core 13.22.0)
- Updating subscriptions did not trigger Realm autorefreshes, sometimes resulting in async refresh hanging until another write was performed by something else. (Core 13.23.1)
- Fix interprocess locking for concurrent realm file access resulting in a interprocess deadlock on FAT32/exFAT filesystems. (Core 13.23.1)
Compatibility
- Realm Studio: 13.0.0 or later.
Internal
- Using Core 13.20.1.