JavaScript | Web and Node.js | React Native
4.9.3 JavaScript & React Native Specific Changes
Fixed: renamed a misspelled property in thePeer
type to the correct spelling dittoSdkVersion
from the previous, incorrect spelling dittoSDKVersion
. (#SDKS-176)4.9.3 Common Changes
Changed: Added more actionable information to common connection handshake issues. (#15298) Fixed: Fixed: Some Android devices could fail to export logs to the portal due to a file permissions error (#15582)No JavaScript Specific Changes
4.9.1 JavaScript & React Native Specific Changes
Changed: Enhanced the efficiency of our memory management processes on React Native. (#15126) Changed: Optimized JSI runtime object management for greater efficiency and responsiveness on React Native. (#15170)4.9.1 Common Changes
Fixed: iOS 18 crashes related to Bluetooth LE are now resolved. (#15351) Fixed: Disk usage stats are now reported in small peer info on android devices4.9.0 JavaScript Release Notes
Added: login() method to Authenticator which enables access to userInfo provided by the configured authentication webhook. (#12354) Added: new methods PendingIDSpecificOperation.updateV2(), and WriteTransactionPendingIDSpecificOperation.updateV2() to replace the deprecated update() methods. These methods do not throw when the document with the given ID can not be found, and call the given closure with null instead. Additionally, these methods throw when given an unsupported async closure argument. (#14504) Added: (React Native) React Native apps can now also set a logging callback using Logger.setCustomLogCallback(). This API was previously not available in React Native environments. (#14658) Added: CFBundleShortVersionString inside the React Native framework. (#14845) Changed: Error messages and documentation for APIs not supported in React Native environments. Some parts of the SDK’s API, in particular the original query builder APIs, are not supported and throw errors when called from a React Native app. In these cases, error message wording and documentation has been improved to make it easier to find the right replacement APIs to use instead. (#14612) Changed**: (React Native)** Transitioned from static to shared libraries to improve load times and reduce overall application size. This change requires updates to build configurations to ensure dynamic linking is correctly handled. See our integration guide for detailed instructions on updating your project settings. (#15018) Fixed: Passing an unsupported async closure to any cursor operation’s update() method now logs a warning. This includes PendingIDSpecificOperation.update(), PendingCursorOperation.update(), WriteTransactionPendingIDSpecificOperation.update(), and WriteTransactionPendingCursorOperation.update(). (#14504) Fixed**: (React Native)** Sporadic Android BLE crash when syncing with other peers. (#15018) Deprecated: Method loginWithToken() from Authenticator. Use the newly added login() method instead. (#12354) Deprecated: PendingIDSpecificOperation.update(), and WriteTransactionPendingIDSpecificOperation.update() whose behavior did not match their documentation. Use each class’s new updateV2() method instead. (#14504) Removed:4.9.0 Logging Clarity Improvements
This release comes with a number of logging clarity improvements. The goal of these changes are to make Ditto logs more consumable and actionable for end users. While there are wide ranging changes one of the principal goals of this work is to make our INFO level logs contain the right information to understand the state and health of the Ditto SDK.
-
More information is included when physical connections start and end (such as the type of connection and the remote peer’s key)
-
Devices that try to connect to themselves now say “device has connected to itself” instead of an error about the remote site ID being the same as the local peer
-
Authentication client logs have been made more human readable. In particular:
-
Recoverable errors are logged together with information about the recovery actions that are being undertaken
-
Several abbreviations have been replaced with human-readable descriptions
-
Errors are printed using their descriptions rather than by dumping debug representations
-
Abbreviated jargon has been replaced with clearer wording in various log lines
-
“phy ended” has become “physical connection ended”
-
“error getting char” has become “required Ditto BLE characteristic not found”
-
“error getting radio state” has become “error getting Windows Bluetooth radio state”
-
Peer events that represent a transport starting or stopping are now logged with the message “transport started”/”transport ended” rather than as a raw peer_event=… log
-
Reduced the noisiness of “starting” log lines around Ditto initialization time
-
Noise from long peer keys in logs has been reduced in some places by replacing them with their truncated form
-
Noise from duplicated peer ID/peer key information in replication logs has been reduced by consolidating the information
-
“starting compression and export” is now followed by a “completed export” log at the same level
-
Successful SQLite WAL recovery logs were further lowered from INFO to DEBUG