profile
viewpoint

realm/realm-cocoa 13964

Realm is a mobile database: a replacement for Core Data & SQLite

realm/jazzy 6564

Soulful docs for Swift & Objective-C

realm/realm-dotnet 874

Realm is a mobile database: a replacement for SQLite & ORMs

realm/realm-core 795

Core database component for the Realm Mobile Database SDKs

realm/realm-browser-osx 501

DEPRECATED - Realm Browser for Mac OS X has been replaced by realm-studio which is cross platform.

realm/realm-android-adapters 401

Adapters for combining Realm Java with Android UI components and framework classes

realm/realm-cocoa-converter 186

A library that provides the ability to import/export Realm files from a variety of data container formats.

realm/github-gantt 128

Generate Gantt Charts From Github Issues!

realm/EventKit 59

A template conference app, featuring real-time schedule and data changes & running on Realm 🚀

realm/my-first-realm-app 32

ToDo demo app using Realm and Realm Object Server to synchronize tasks.

PR opened realm/realm-js

Reviewers
Realm Web: Custom data base64 fixed T-Bug

What, How & Why?

This closes an issue where decoding of the access JWT could result in invalid characters in the custom data of a user.

☑️ ToDos

  • [x] 📝 Changelog entry
  • [x] 📝 Compatibility label is updated or copied from previous entry
  • [ ] 🚦 Tests
  • [x] 📝 Public documentation PR created or is not necessary
  • [x] 💥 Breaking label has been applied or is not necessary
+44736 -13625

0 comment

290 changed files

pr created time in an hour

push eventrealm/realm-js

Kræn Hansen

commit sha 2425d72c46a71d0c66da6be977575e2f0b886f9f

Adding a note in the changelog

view details

push time in an hour

create barnchrealm/realm-js

branch : kh/web/custom-data-base64-fixed

created branch time in an hour

push eventrealm/realm-js

Kræn Hansen

commit sha 2e8ad3837c84904aec231b4eb6c91d3944854796

Update services.d.ts

view details

push time in 5 hours

issue commentrealm/realm-java

Error on deletion

This occurred only after upgrading from 6.1.0 to 7.0.1.

The crash itself happened after downloading a bunch of entities from a remote API and then using Realm’s insertOrUpdate(). Unfortunately, I don’t have more information myself :/

Yes, I have a similar case. Users mentioned that it crashes when they sync some data in a background task (could be a few hundred items).

GaelCO

comment created time in 6 hours

startedrealm/SwiftLint

started time in 6 hours

Pull request review commentrealm/realm-cocoa

Add Apple authentication helper

 public typealias Credentials = RLMCredentials /// application backend. /// This interface provides access to login and authentication. public typealias App = RLMApp++@available(OSX 10.15, watchOS 6.0, iOS 13.0, iOSApplicationExtension 13.0, OSXApplicationExtension 10.15, tvOS 13.0, *)+/// Use this delegate to be provided a callback once authentication with Apple has succeed or failed+public typealias ASLoginDelegate = RLMASLoginDelegate++@available(OSX 10.15, watchOS 6.0, iOS 13.0, iOSApplicationExtension 13.0, OSXApplicationExtension 10.15, tvOS 13.0, *)+extension App {+    /**+     Sets the ASAuthorizationControllerDelegate to be handled by `App`+     - Parameter controller: The ASAuthorizationController in which you want `App` to consume its delegate.++     Usage:+     ```let app = App(id: "my-app-id")+     let appleIDProvider = ASAuthorizationAppleIDProvider()+     let request = appleIDProvider.createRequest()+     request.requestedScopes = [.fullName, .email]++     let authorizationController = ASAuthorizationController(authorizationRequests: [request])+     app.setASAuthorizationControllerDelegate(controller: authorizationController)+     authorizationController.presentationContextProvider = self+     authorizationController.performRequests()```+    */+    public func setASAuthorizationControllerDelegate(controller: ASAuthorizationController) {

I think it's important to inform the user that the purpose of this call is to set the delegate, and that no other manipulation is performed on the controller.

leemaguire

comment created time in 7 hours

push eventrealm/realm-cocoa

Lee Maguire

commit sha 1a3caa92747b6dd70fcdd7135ec63326cee84012

Add swift name for ASLoginDelegate

view details

push time in 7 hours

issue openedrealm/realm-js

Realm crashes while in write transaction

<!---

Questions: If you have questions about HOW TO use Realm, please ask on StackOverflow: http://stackoverflow.com/questions/ask?tags=realm We monitor the realm tag.

Feature Request: Just fill in the first two sections below.

Bugs: To help you as fast as possible with an issue please describe your issue and the steps you have taken to reproduce it in as much detail as possible.

-->

Goals & Expected Results

Be able to write data in realm. <!--- What are you trying to achieve? -->

Actual Results

Realm crashes with the following: <!--- What happened instead? --> <!--- e.g. the stack trace of a crash -->

../src/realm/util/encrypted_file_mapping.hpp:147: [realm-core-6.0.6] Assertion failed: addr >= m_addr with (addr, m_addr) =  [true, true]

0   realm.node                          0x0000000106dc27dc _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28

1   realm.node                          0x0000000106dc2d37 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 471

2   realm.node                          0x0000000106dad1e4 _ZN5realm4util19terminate_with_infoIJRPKvRKPvEEEvPKciS9_S9_DpOT_ + 84

3   realm.node                          0x0000000106dad093 _ZN5realm4util20EncryptedFileMapping12read_barrierEPKvmPFmPKcE + 419

4   realm.node                          0x0000000106cc8984 _ZN5realm4util26do_encryption_read_barrierEPKvmPFmPKcEPNS0_20EncryptedFileMappingE + 68

5   realm.node                          0x0000000106cc5466 _ZN5realm12ArrayKeyBaseILi1EE13init_from_refEm + 86

6   realm.node                          0x0000000106cc37ef _ZNK5realm7Cluster9init_leafENS_6ColKeyEPNS_12ArrayPayloadE + 159

7   realm.node                          0x0000000106ab7757 _ZN5realm7LinkMap11set_clusterEPKNS_7ClusterE + 471

8   realm.node                          0x0000000106d40478 _ZN5realm10ParentNode5matchERNS_8ConstObjE + 344

9   realm.node                          0x0000000106b7038c _ZNK5realm5Query8find_allERNS_14ConstTableViewEmmm + 620

10  realm.node                          0x0000000106d9b015 _ZN5realm14ConstTableView7do_syncEv + 469

11  realm.node                          0x0000000106b70621 _ZN5realm5Query8find_allEmmm + 97

12  realm.node                          0x0000000106b70b25 _ZN5realm5Query8find_allERKNS_18DescriptorOrderingE + 261

13  realm.node                          0x00000001068ff42a _ZN5realm7Results27do_evaluate_query_if_neededEb + 218

14  realm.node                          0x000000010690852d _ZNO5realm7Results8snapshotEv + 147

15  realm.node                          0x0000000106908463 _ZNKR5realm7Results8snapshotEv + 59

16  realm.node                          0x00000001068b8364 _ZN5realm2js12ResultsClassINS_4node5TypesEE8snapshotEN4Napi3EnvENS5_6ObjectERNS0_9ArgumentsIS3_EERNS0_11ReturnValueIS3_EE + 70

17  realm.node                          0x00000001068b398d _ZN5realm2js4wrapIXadL_ZNS0_12ResultsClassINS_4node5TypesEE8snapshotEN4Napi3EnvENS6_6ObjectERNS0_9ArgumentsIS4_EERNS0_11ReturnValueIS4_EEEEEENS6_5ValueERKNS6_12CallbackInfoE + 260

18  realm.node                          0x0000000106839413 _ZZN4Napi10ObjectWrapIN5realm4node13WrappedObjectINS1_2js12ResultsClassINS2_5TypesEEEEEE29InstanceMethodCallbackWrapperEP10napi_env__P20napi_callback_info__ENKUlvE_clEv + 139

19  realm.node                          0x0000000106839343 _ZN4Napi10ObjectWrapIN5realm4node13WrappedObjectINS1_2js12ResultsClassINS2_5TypesEEEEEE29InstanceMethodCallbackWrapperEP10napi_env__P20napi_callback_info__ + 39

20  node                                0x000000010005eaba _ZN6v8impl12_GLOBAL__N_123FunctionCallbackWrapper6InvokeERKN2v820FunctionCallbackInfoINS2_5ValueEEE + 122

21  node                                0x000000010024a2e8 _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE + 616

22  node                                0x00000001002498a9 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE + 521

23  node                                0x0000000100249012 _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_16BuiltinArgumentsEPNS0_7IsolateE + 258

24  node                                0x00000001009ce1f9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57

25  ???                                 0x000027ffeff89470 0x0 + 43980196189296!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.Abort trap: 6

Steps to Reproduce

Try to write data to a cloud realm. <!--- What are steps we can follow to reproduce this issue? -->

Version of Realm and Tooling

  • Realm JS SDK Version: 6.0.2
  • Node or React Native: 12.18.1
  • Client OS & Version: MacOS 10.15.5, Windows 10 pro 64 bit
  • Which debugger for React Native: None

created time in 7 hours

push eventrealm/realm-cocoa

Lee Maguire

commit sha 6e81a10ecc2f339c2dfc63db64c41445d3f4bc04

Remove extra newlines

view details

push time in 8 hours

Pull request review commentrealm/realm-cocoa

Add Apple authentication helper

 to obtain a reference to an RLMApp. @end  NS_ASSUME_NONNULL_END++#pragma mark - Sign In With Apple Extension

Resolved offline

leemaguire

comment created time in 8 hours

startedrealm/realm-dotnet

started time in 8 hours

startedrealm/realm-cocoa

started time in 12 hours

startedrealm/realm-java

started time in 12 hours

issue closedrealm/realm-java

Host realm on maven central

Would it be possible to host realm also on maven central? jcenter / bintray has been having some problems lately and mavenCentral is more reliable. This is similar to #434

closed time in 13 hours

vanniktech

issue commentrealm/realm-java

Host realm on maven central

No longer using realm.

vanniktech

comment created time in 13 hours

pull request commentrealm/SwiftLint

Update IndentationWidthRule.swift

<!-- 1 Error: Could not build branch 1 Warning: Please include a CHANGELOG ent... 0 Messages 1 Markdown --> <table> <thead> <tr> <th width="50"></th> <th width="100%" data-danger-table="true" data-kind="Error"> 1 Error </th> </tr> </thead> <tbody> <tr> <td>:no_entry_sign:</td> <td data-sticky="false">Could not build branch</td> </tr> </tbody> </table> <table> <thead> <tr> <th width="50"></th> <th width="100%" data-danger-table="true" data-kind="Warning"> 1 Warning </th> </tr> </thead> <tbody> <tr> <td>:warning:</td> <td data-sticky="false">Please include a CHANGELOG entry to credit yourself! <br /> You can find it at <a href="https://github.com/realm/SwiftLint/blob/master/CHANGELOG.md">CHANGELOG.md</a>.</td> </tr> </tbody> </table>

Here's an example of your CHANGELOG entry:

* Update IndentationWidthRule.swift.  
  [gao-sun](https://github.com/gao-sun)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

<p align="right" data-meta="generated_by_danger"> Generated by :no_entry_sign: <a href="https://danger.systems/">Danger</a> </p>

gao-sun

comment created time in 15 hours

PR opened realm/SwiftLint

Update IndentationWidthRule.swift

to honor severity configuration

+3 -3

0 comment

1 changed file

pr created time in 15 hours

fork gao-sun/SwiftLint

A tool to enforce Swift style and conventions.

https://realm.github.io/SwiftLint

fork in 15 hours

PR opened realm/realm-js

JSON serialization: Use primary key as reference-id when possible.
  • Use primary key as reference-id when possible.
  • Added integration-tests for Person/Dog structure with added ObjectId as primary keys.
+369 -41

0 comment

4 changed files

pr created time in 15 hours

create barnchrealm/realm-js

branch : sa/v10/realm-tojson-primary-keys

created branch time in 15 hours

startedrealm/SwiftLint

started time in 16 hours

startedrealm/realm-java

started time in 19 hours

startedrealm/realm-java

started time in a day

startedrealm/realm-object-server

started time in a day

Pull request review commentrealm/realm-cocoa

AppClip Example

+////////////////////////////////////////////////////////////////////////////+//+// Copyright 2020 Realm Inc.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.+//+////////////////////////////////////////////////////////////////////////////++import SwiftUI+import RealmSwift++@main+struct AppClipApp: SwiftUI.App {+    var body: some Scene {+        WindowGroup {+            // This is ContentView.swift shared from AppClipParent+            ContentView(objects: demoObjects().list)+        }+    }++    private func demoObjects() -> DemoObjects {+        let config = Realm.Configuration(fileURL: FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: Constants.groupId)!.appendingPathComponent("default.realm"))

Why not make FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: Constants.groupId)!.appendingPathComponent("default.realm") as part of a constant struct?

ericjordanmossman

comment created time in a day

startedrealm/SwiftLint

started time in a day

startedrealm/realm-cocoa

started time in a day

startedrealm/SwiftLint

started time in a day

issue commentrealm/realm-cocoa

Assertion failed: ref != 0 with (ref, get_file_path_for_assertions())

Here is my initialization code in AppDelegate. We are currently on schema 20, we haven't changed our schema in a while and it was the same between Realm versions updates in my app from v4.4.0 and v5.0.3 (when problems began) and now v5.2.0.

    let config = Realm.Configuration(
        // Set the new schema version. This must be greater than the previously used
        // version (if you've never set a schema version before, the version is 0).
        schemaVersion: 20,
        
        // Set the block which will be called automatically when opening a Realm with
        // a schema version lower than the one set above
        migrationBlock: { migration, oldSchemaVersion in
            // We haven’t migrated anything yet, so oldSchemaVersion == 0
            if (oldSchemaVersion < 6) {
                migration.enumerateObjects(ofType: Sound.className()) { (oldObject, newObject) in
                        newObject!["soundTypeRaw"] = 0
                        newObject!["trackID"] = ""
                    }
            }
            
            if (oldSchemaVersion < 11) {
                migration.enumerateObjects(ofType: AppSettingsRealm.className()) { (oldObject, newObject) in
                    newObject!["groupSingleTapRaw"] = TapGroupAction.open.rawValue
                    newObject!["groupDoubleTapRaw"] = TapGroupAction.none.rawValue
                    newObject!["groupTripleTapRaw"] = TapGroupAction.none.rawValue
                }
            }

            if (oldSchemaVersion < 12) {
                migration.enumerateObjects(ofType: AppSettingsRealm.className()) { (oldObject, newObject) in
                    newObject!["songCellSizeRaw"] = SongCellSize.normal.rawValue
                }
            }

            if (oldSchemaVersion < 14) {
                UserDefaults.standard.set(false, forKey: WHATS_NEW_GROUP_TAP_ACTIONS_KEY)
            }

            if (oldSchemaVersion < 15) {
                migration.enumerateObjects(ofType: AppSettingsRealm.className()) { (oldObject, newObject) in
                    newObject!["songCellColorRaw"] = SongCellColor.baseRed.rawValue
                }
            }

            if (oldSchemaVersion < 16) {
                migration.enumerateObjects(ofType: Playback.className()) { (oldObject, newObject) in
                    newObject!["songCellColorRaw"] = SongCellColor.baseDefault.rawValue
                }
            }

            // Nothing to do!
            // Realm will automatically detect new properties and removed properties
            // And will update the schema on disk automatically

        }
    )
    
    // Tell Realm to use this new configuration object for the default Realm
    Realm.Configuration.defaultConfiguration = config
    
    // Now that we've told Realm how to handle the schema change, opening the file
    // will automatically perform the migration
    let realm = try! Realm()
WickedChicken42

comment created time in a day

issue openedrealm/realm-cocoa

Assertion failed: ref != 0 with (ref, get_file_path_for_assertions())

Realm is crashing, consequently taking my app with it, during initialization when attempting to open the Realm database with the following error.

This began happening to some of our users when my app was upgraded to use Realm v5.0.3 and remains with additional update to v5.2.0.

Goals

Goals: Don't crash

Expected Results

Realm will open the default.realm database my app uses so the app can run.

Actual Results

From the Output Console (not in debug): /Users/realm/workspace/realm_realm-core_release_6.0.8/src/realm/alloc_slab.cpp:522: [realm-core-6.0.8] Assertion failed: ref != 0 with (ref, get_file_path_for_assertions()) = [0, "/var/mobile/Containers/Data/Application/963F13C3-0655-4E7D-8729-08A375989861/Documents/default.realm"] 0 Realm 0x0000000101b72e04 _ZN5realm4util9terminateEPKcS2_l + 480 1 Realm 0x0000000101b732a0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 388 2 Realm 0x0000000101a80b4c _ZNK5realm9SlabAlloc28get_file_path_for_assertionsEv + 0 3 Realm 0x0000000101a824c4 _ZN5realm9SlabAlloc7do_freeEmPc + 1464 4 Realm 0x0000000101aadd54 _ZNK5realm5Group17get_to_dot_parentEm + 1512 5 Realm 0x0000000101a1ab20 ZN5realm5Array9get_threeEPKcmRmS3_S3 + 560 6 Realm 0x0000000101b334b0 _Z<…>

Xcode Debug Output window: /Users/realm/workspace/realm_realm-core_release_6.0.8/src/realm/alloc_slab.cpp:522: [realm-core-6.0.8] Assertion failed: ref != 0 with (ref, get_file_path_for_assertions()) = [0, "/var/mobile/Containers/Data/Application/557C397B-5F5F-4CAB-80C4-412DD916F9FC/Documents/default.realm"] 0 Realm 0x0000000101bc7f14 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28 1 Realm 0x0000000101bc83b0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 388 2 Realm 0x0000000101ad33f0 _ZNK5realm9SlabAlloc28get_file_path_for_assertionsEv + 0 3 Realm 0x0000000101ad4d58 _ZN5realm9SlabAlloc7do_freeEmPc + 1464 4 Realm 0x0000000101b0015c _ZN5realm16WrappedAllocator7do_freeEmPc + 24 5 Realm 0x0000000101ad9ea4 _ZN5realm5Array12destroy_deepENS_6MemRefERNS_9AllocatorE + 60 6 Realm 0x0000000101b88264 _ZN5realm5Table15migrate_indexesENS_6ColKeyENS_4util11FunctionRefIFvvEEE + 588 7 Realm 0x0000000101afa508 _ZN5realm11Transaction19upgrade_file_formatEi + 1224 8 Realm 0x0000000101b0430c _ZN5realm2DB19upgrade_file_formatEbiii + 292 9 Realm 0x0000000101b01fb8 _ZN5realm2DB7do_openERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbNS_9DBOptionsE + 3516 10 Realm 0x0000000101b0492c _ZN5realm2DB4openERNS_11ReplicationENS_9DBOptionsE + 244 11 Realm 0x0000000101b090e4 _ZN5realm2DB6createERNS_11ReplicationENS_9DBOptionsE + 392 12 Realm 0x00000001016ba44c _ZN5realm5_impl16RealmCoordinator7open_dbEv + 972 13 Realm 0x00000001016b96a0 _ZN5realm5_impl16RealmCoordinator12do_get_realmENS_5Realm6ConfigERNSt3__110shared_ptrIS2_EENS_4util8OptionalINS_9VersionIDEEERNS8_17CheckedUniqueLockE + 72 14 Realm 0x00000001016b9538 _ZN5realm5_impl16RealmCoordinator9get_realmENS_5Realm6ConfigENS_4util8OptionalINS_9VersionIDEEE + 268 15 Realm 0x000000010190b55c _ZN5realm5Realm16get_shared_realmENS0_6ConfigE + 152 16 Realm 0x0000000101855da8 +[RLMRealm realmWithConfiguration:queue:error:] + 1760 17 RealmSwift 0x0000000102c53548 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 156 18 RealmSwift 0x0000000102c8a9f0 $s10RealmSwift0A0V5queueACSo012OS_dispatch_C0CSg_tKcfC + 140 19 sports-audio-dj 0x0000000100dd2414 $s15sports_audio_dj11AppDelegateC24handleRealmConfigChangesyyF + 560 20 sports-audio-dj 0x0000000100dd0e20 $s15sports_audio_dj11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtF + 72 21 sports-audio-dj 0x0000000100dd0f90 $s15sports_audio_dj11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtFTo + 232 22 UIKitCore 0x00000001913dfc74 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10636404 23 UIKitCore 0x00000001913e1a00 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10643968 24 UIKitCore 0x00000001913e729c BD57BD6E-12B4-3F92-85CA-754932DA499D + 10666652 25 UIKitCore 0x0000000190b8bb70 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1903472 26 UIKitCore 0x000000019103c2dc _UIScenePerformActionsWithLifecycleActionMask + 100 27 UIKitCore 0x0000000190b8c654 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1906260 28 UIKitCore 0x0000000190b8c0a8 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1904808 29 UIKitCore 0x0000000190b8c480 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1905792 30 UIKitCore 0x0000000190b8bd40 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1903936 31 UIKitCore 0x0000000190b901dc BD57BD6E-12B4-3F92-85CA-754932DA499D + 1921500 32 UIKitCore 0x0000000190f603a0 BD57BD6E-12B4-3F92-85CA-754932DA499D + 5919648 33 UIKitCore 0x0000000191055720 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244 34 UIKitCore 0x0000000190b8ff38 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1920824 35 UIKitCore 0x000000019105561c _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 100 36 UIKitCore 0x0000000190b8fda0 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1920416 37 UIKitCore 0x00000001909fff74 BD57BD6E-12B4-3F92-85CA-754932DA499D + 282484 38 UIKitCore 0x00000001909feb14 BD57BD6E-12B4-3F92-85CA-754932DA499D + 277268 39 UIKitCore 0x00000001909ffcac BD57BD6E-12B4-3F92-85CA-754932DA499D + 281772 40 UIKitCore 0x00000001913e54e8 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10659048 41 UIKitCore 0x0000000190f8568c BD57BD6E-12B4-3F92-85CA-754932DA499D + 6071948 42 FrontBoardServices 0x00000001924b961c 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 50716 43 FrontBoardServices 0x00000001924de194 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 201108 44 FrontBoardServices 0x00000001924c3bfc 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 93180 45 FrontBoardServices 0x00000001924dde50 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 200272 46 libdispatch.dylib 0x0000000102e13730 _dispatch_client_callout + 16 47 libdispatch.dylib 0x0000000102e16bb0 _dispatch_block_invoke_direct + 232 48 FrontBoardServices 0x0000000192502850 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 350288 49 FrontBoardServices 0x000000019250251c 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 349468 50 FrontBoardServices 0x0000000192502a44 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 350788 51 CoreFoundation 0x000000018d2c0c18 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 691224 52 CoreFoundation 0x000000018d2c0b70 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 691056 53 CoreFoundation 0x000000018d2c02f8 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 688888 54 CoreFoundation 0x000000018d2bb328 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 668456 55 CoreFoundation 0x000000018d2bace8 CFRunLoopRunSpecific + 424 56 GraphicsServices 0x000000019740538c GSEventRunModal + 160 57 UIKitCore 0x00000001913e9444 UIApplicationMain + 1932 58 sports-audio-dj 0x0000000100dd368c main + 80 59 libdyld.dylib 0x000000018d1428f0 3D6D64B4-CB2B-3CC4-A7E9-02774DF7AE74 + 6384!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.2020-07-11 13:51:18.529024-0600 sports-audio-dj[328:12455] /Users/realm/workspace/realm_realm-core_release_6.0.8/src/realm/alloc_slab.cpp:522: [realm-core-6.0.8] Assertion failed: ref != 0 with (ref, get_file_path_for_assertions()) = [0, "/var/mobile/Containers/Data/Application/557C397B-5F5F-4CAB-80C4-412DD916F9FC/Documents/default.realm"] 0 Realm 0x0000000101bc7f14 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28 1 Realm 0x0000000101bc83b0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 388 2 Realm 0x0000000101ad33f0 _ZNK5realm9SlabAlloc28get_file_path_for_assertionsEv + 0 3 Realm 0x0000000101ad4d58 _ZN5realm9SlabAlloc7do_freeEmPc + 1464 4 Realm 0x0000000101b0015c _ZN5realm16WrappedAllocator7do_freeEmPc + 24 5 Realm 0x0000000101ad9ea4 _ZN5realm5Array12destroy_deepENS_6MemRefERNS_9AllocatorE + 60 6 Realm 0x0000000101b88264 _ZN5realm5Table15migrate_indexesENS_6ColKeyENS_4util11FunctionRefIFvvEEE + 588 7 Realm 0x0000000101afa508 _ZN5realm11Transaction19upgrade_file_formatEi + 1224 8 Realm 0x0000000101b0430c _ZN5realm2DB19upgrade_file_formatEbiii + 292 9 Realm 0x0000000101b01fb8 _ZN5realm2DB7do_openERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbNS_9DBOptionsE + 3516 10 Realm 0x0000000101b0492c _ZN5realm2DB4openERNS_11ReplicationENS_9DBOptionsE + 244 11 Realm 0x0000000101b090e4 _ZN5realm2DB6createERNS_11ReplicationENS_9DBOptionsE + 392 12 Realm 0x00000001016ba44c _ZN5realm5_impl16RealmCoordinator7open_dbEv + 972 13 Realm 0x00000001016b96a0 _ZN5realm5_impl16RealmCoordinator12do_get_realmENS_5Realm6ConfigERNSt3__110shared_ptrIS2_EENS_4util8OptionalINS_9VersionIDEEERNS8_17CheckedUniqueLockE + 72 14 Realm 0x00000001016b9538 _ZN5realm5_impl16RealmCoordinator9get_realmENS_5Realm6ConfigENS_4util8OptionalINS_9VersionIDEEE + 268 15 Realm 0x000000010190b55c _ZN5realm5Realm16get_shared_realmENS0_6ConfigE + 152 16 Realm 0x0000000101855da8 +[RLMRealm realmWithConfiguration:queue:error:] + 1760 17 RealmSwift 0x0000000102c53548 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 156 18 RealmSwift 0x0000000102c8a9f0 $s10RealmSwift0A0V5queueACSo012OS_dispatch_C0CSg_tKcfC + 140 19 sports-audio-dj 0x0000000100dd2414 $s15sports_audio_dj11AppDelegateC24handleRealmConfigChangesyyF + 560 20 sports-audio-dj 0x0000000100dd0e20 $s15sports_audio_dj11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtF + 72 21 sports-audio-dj 0x0000000100dd0f90 $s15sports_audio_dj11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtFTo + 232 22 UIKitCore 0x00000001913dfc74 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10636404 23 UIKitCore 0x00000001913e1a00 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10643968 24 UIKitCore 0x00000001913e729c BD57BD6E-12B4-3F92-85CA-754932DA499D + 10666652 25 UIKitCore 0x0000000190b8bb70 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1903472 26 UIKitCore 0x000000019103c2dc _UIScenePerformActionsWithLifecycleActionMask + 100 27 UIKitCore 0x0000000190b8c654 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1906260 28 UIKitCore 0x0000000190b8c0a8 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1904808 29 UIKitCore 0x0000000190b8c480 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1905792 30 UIKitCore 0x0000000190b8bd40 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1903936 31 UIKitCore 0x0000000190b901dc BD57BD6E-12B4-3F92-85CA-754932DA499D + 1921500 32 UIKitCore 0x0000000190f603a0 BD57BD6E-12B4-3F92-85CA-754932DA499D + 5919648 33 UIKitCore 0x0000000191055720 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244 34 UIKitCore 0x0000000190b8ff38 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1920824 35 UIKitCore 0x000000019105561c _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 100 36 UIKitCore 0x0000000190b8fda0 BD57BD6E-12B4-3F92-85CA-754932DA499D + 1920416 37 UIKitCore 0x00000001909fff74 BD57BD6E-12B4-3F92-85CA-754932DA499D + 282484 38 UIKitCore 0x00000001909feb14 BD57BD6E-12B4-3F92-85CA-754932DA499D + 277268 39 UIKitCore 0x00000001909ffcac BD57BD6E-12B4-3F92-85CA-754932DA499D + 281772 40 UIKitCore 0x00000001913e54e8 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10659048 41 UIKitCore 0x0000000190f8568c BD57BD6E-12B4-3F92-85CA-754932DA499D + 6071948 42 FrontBoardServices 0x00000001924b961c 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 50716 43 FrontBoardServices 0x00000001924de194 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 201108 44 FrontBoardServices 0x00000001924c3bfc 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 93180 45 FrontBoardServices 0x00000001924dde50 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 200272 46 libdispatch.dylib 0x0000000102e13730 _dispatch_client_callout + 16 47 libdispatch.dylib 0x0000000102e16bb0 _dispatch_block_invoke_direct + 232 48 FrontBoardServices 0x0000000192502850 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 350288 49 FrontBoardServices 0x000000019250251c 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 349468 50 FrontBoardServices 0x0000000192502a44 6A942CC3-4B73-3477-AF9F-95C8EDCB8C85 + 350788 51 CoreFoundation 0x000000018d2c0c18 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 691224 52 CoreFoundation 0x000000018d2c0b70 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 691056 53 CoreFoundation 0x000000018d2c02f8 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 688888 54 CoreFoundation 0x000000018d2bb328 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 668456 55 CoreFoundation 0x000000018d2bace8 CFRunLoopRunSpecific + 424 56 GraphicsServices 0x000000019740538c GSEventRunModal + 160 57 UIKitCore 0x00000001913e9444 UIApplicationMain + 1932 58 sports-audio-dj 0x0000000100dd368c main + 80 59 libdyld.dylib 0x000000018d1428f0 3D6D64B4-CB2B-3CC4-A7E9-02774DF7AE74 + 6384!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io. (lldb)

Steps to Reproduce

I start my iOS app and during Realm initialization Realm errors out.

Code Sample

Here is the Realm Code where the error is happening following my call to bool server_synchronization_mode = m_config.sync_config || m_config.force_sync_history; try { if (m_config.immutable()) { if (m_config.realm_data.is_null()) { m_read_only_group = std::make_shared<Group>(m_config.path, m_config.encryption_key.data(), Group::mode_ReadOnly); } else { // Create in-memory read-only realm from existing buffer (without taking ownership of the buffer) m_read_only_group = std::make_unique<Group>(m_config.realm_data, false); } return; }

    if (server_synchronization_mode) {

#if REALM_ENABLE_SYNC m_history = sync::make_client_replication(m_config.path); #else REALM_TERMINATE("Realm was not built with sync enabled"); #endif } else { m_history = make_in_realm_history(m_config.path); }

    DBOptions options;
    options.durability = m_config.in_memory
                       ? DBOptions::Durability::MemOnly
                       : DBOptions::Durability::Full;

    if (!m_config.fifo_files_fallback_path.empty()) {
        options.temp_dir = util::normalize_dir(m_config.fifo_files_fallback_path);
    }
    options.encryption_key = m_config.encryption_key.data();
    options.allow_file_format_upgrade = !m_config.disable_format_upgrade
                                     && m_config.schema_mode != SchemaMode::ResetFile;
    m_db = DB::create(*m_history, options);  *** ERROR BREAK LINE ***
}

Version of Realm and Tooling

Realm framework version: Realm/RealmSwift v5.2.0

Realm Object Server version: N/A

Xcode version: 11.5

iOS/OSX version: 13.5.1

Dependency manager + version: ?

created time in a day

issue commentrealm/realm-js

[v3.7.0-alpha.2] CreatedAt must be of type 'date', got 'object'

I am also facing this issue with Realm 5.0.5 and jest 24.9.0

bimusiek

comment created time in a day

PR opened realm/realm-js

Reviewers
Realm Web: Fixing duplication of user ids T-Bug

What, How & Why?

This closes an issue occurring when logging in with the same user multiple times: The list of all users would grow and the user object wouldn't be reused.

☑️ ToDos

  • [x] 📝 Changelog entry
  • [x] 📝 Compatibility label is updated or copied from previous entry
  • [x] 🚦 Tests
  • [x] 📝 Public documentation PR created or is not necessary
  • [x] 💥 Breaking label has been applied or is not necessary
+44856 -13625

0 comment

291 changed files

pr created time in a day

push eventrealm/realm-js

Kræn Hansen

commit sha 053e2daf0750e217a1b0b1d89483b76b26747712

Reuse user objects when re-authenticating

view details

push time in a day

create barnchrealm/realm-js

branch : kh/v10/duplicate-user-ids-fixed

created branch time in a day

startedrealm/jazzy

started time in a day

startedrealm/realm-sync-samples

started time in a day

startedrealm/SwiftLint

started time in a day

startedrealm/jazzy

started time in a day

issue commentrealm/SwiftLint

How to exclude files with a certain name? (implement recursive globs)

Any updates for this issue?

ZsoltMolnarrr

comment created time in a day

startedrealm/SwiftLint

started time in 2 days

issue commentrealm/realm-cocoa

Realm Results<Object> to conform ObervableObject

Hi @tgoyne this works thanks. But still do you have any plans to do so? Because you make RealmSwift.List and Object conform to ObservableObject and not Results.

Also you use publisher to update which gets called anytime the collection change, will there be any performance difference when using publisher compared to your own Notification.

One last question can publisher tell which rows are added or removed(detailed changes)?

Sorry for asking so many questions but there are no documents what so ever and just one blog on MongoDB which basically covers frozen objects only.

Thanks 🙂

jovanpreet

comment created time in 2 days

issue commentrealm/realm-cocoa

Crash when adding an object

Turns out it crashes more often than only that call.

javruben

comment created time in 2 days

pull request commentrealm/jazzy

Swift SymbolGraph importer

Couple-three betas maybe? The branch mostly works with Xcode 12b2 if you want to try it out.

johnfairh

comment created time in 2 days

startedrealm/jazzy

started time in 2 days

startedrealm/realm-js

started time in 2 days

startedrealm/SwiftLint

started time in 2 days

startedrealm/SwiftLint

started time in 2 days

startedrealm/realm-java

started time in 2 days

startedrealm/SwiftLint

started time in 2 days

push eventrealm/realm-cocoa

Jason Flax

commit sha 3618d20f73c0d608e9dbfaa9d48ccf6fe469732f

Add admin sdk, clean up test process

view details

Jason Flax

commit sha 433b0884cf8dc6925262519a8d098daa7df19ac3

Add admin push service

view details

Thomas Goyne

commit sha c6dbf4dfda75f696e589fd684dd313e434e1a3b3

Use precise lifetime for TimeoutProxyServer

view details

Thomas Goyne

commit sha 3b87a7a67be99d9dfe75b311228d5084e0d95523

Remove incorrect project changes

view details

Thomas Goyne

commit sha 868c18eafaafce3b0d32c1e67706021fdbdc8ea9

Add missing items in setup_baas.rb's output paths

view details

Thomas Goyne

commit sha acbac966c59dee5f22d4f4019970c0aa42ca6ea8

Merge pull request #6612 from realm/jf/admin_test_cleanup Add admin sdk, clean up test process

view details

push time in 2 days

delete branch realm/realm-cocoa

delete branch : jf/admin_test_cleanup

delete time in 2 days

PR merged realm/realm-cocoa

Reviewers
Add admin sdk, clean up test process

This PR effectively sandboxes Stitch (the backend server), and drops some of the external dependencies. It notably replaces the JS admin SDK with a Swift version, and replaces the ruby based proxy server with a Swift version. The Mongo and Stitch processes will also be managed directly from the test suite as opposed to being spawned externally. This will enable quicker set up and tear down, and a simpler cleaning path.

Stitch will also be precompiled and ran as a binary.

This also gives us Big Sur compatibility (as far as I can tell, they've significantly beefed up the permissions model).

+1150 -941

0 comment

27 changed files

jsflax

pr closed time in 2 days

issue commentrealm/realm-cocoa

{ERROR} [PERSISTENCE] mmap() failed:Cannot allocate memory size: 25346048 offset: 67108864

I tried investigating this today and yesterday. I saw similar spikes memory during update when:

  • using an unmanaged object to update. so in realm.add(object, update. modified), object.realm is nil, but matches a primary key of an existing object.
  • not when using managed objects.
  • specifically updating direct relationships that created downstream orphaned objects. Using lists or just updating non-relationship properties in a zero-sum update didn't seem to cause the same spikes.
  • using a deep, not wide object graph. I mainly tested with 2^6 classes, where each parent had two children, total depth of 6.

I couldn't personally induce mmap() failed:Cannot allocate memory size when using a physical device in either 4.4.1 or 5.2.0, though.

Could someone share a sample data model they're using and which properties are being updated? If someone could share an example project, that'd greatly help.

pkrmf

comment created time in 2 days

PR opened realm/realm-js

Reviewers
API keys revisited Breaking T-Enhancement

What, How & Why?

This closes #3050, #2972 and the api key part of #2973.

☑️ ToDos

  • [x] 📝 Changelog entry
  • [x] 📝 Compatibility label is updated or copied from previous entry
  • [x] 🚦 Tests
  • [x] 📝 Public documentation PR created or is not necessary
  • [x] 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • [x] typescript definitions file is updated
  • [x] jsdoc files updated
  • [x] Chrome debug API is updated if API is available on React Native
+248 -85

0 comment

20 changed files

pr created time in 2 days

create barnchrealm/realm-js

branch : kh/v10/api-keys-revisited

created branch time in 2 days

startedrealm/realm-cocoa

started time in 2 days

pull request commentrealm/realm-object-store

Added Realm::shutdown_sync() which waits for Realm file to be closed

@tgoyne, I made the changes we discussed. Ready for another pass on review.

kspangsege

comment created time in 2 days

push eventrealm/realm-object-store

Kristian Spangsege

commit sha 17a61c8681f888ba447e861fc637f17dcc19c14d

Added Realm::shutdown_sync() which waits for Realm file to be closed on behalf of underlying sync session (sync::Session)

view details

push time in 2 days

issue commentrealm/realm-cocoa

Abstract Class / Polymorphism Support

6 years is a long time to be "on the roadmap", maybe it's time to get this one done?

Kirow

comment created time in 2 days

pull request commentrealm/realm-object-store

Added Realm::shutdown_sync() which waits for Realm file to be closed

SyncUser::session_for_on_disk_path() gives access to the session without going through the Realm.

kspangsege

comment created time in 2 days

pull request commentrealm/realm-object-store

Added Realm::shutdown_sync() which waits for Realm file to be closed

What do you think of a name like shutdown_and_wait()? It isn't obvious to me that something named shutdown_sync() would block until it's done.

Sound good to me. I'll make that change.

kspangsege

comment created time in 2 days

pull request commentrealm/realm-object-store

Added Realm::shutdown_sync() which waits for Realm file to be closed

I don't think the Realm/RealmCoordinator functions are needed here; the SDK has access to the SyncSession and calling it directly on that makes more sense to me.

Ok, interesting. I wonder how. I concluded that they did not, because RealmCoordinator::m_sync_session is private, and nothing seems to leak it out of the coordinator.

Anyway, if you are sure, I'll remove the changes to RealmCoordinator and Realm classes.

Can you confirm your certainty about this?

kspangsege

comment created time in 2 days

startedrealm/realm-object-server

started time in 2 days

push eventrealm/realm-cocoa

Jason Flax

commit sha 3618d20f73c0d608e9dbfaa9d48ccf6fe469732f

Add admin sdk, clean up test process

view details

Jason Flax

commit sha 433b0884cf8dc6925262519a8d098daa7df19ac3

Add admin push service

view details

Thomas Goyne

commit sha c6dbf4dfda75f696e589fd684dd313e434e1a3b3

Use precise lifetime for TimeoutProxyServer

view details

Thomas Goyne

commit sha 3b87a7a67be99d9dfe75b311228d5084e0d95523

Remove incorrect project changes

view details

Thomas Goyne

commit sha 868c18eafaafce3b0d32c1e67706021fdbdc8ea9

Add missing items in setup_baas.rb's output paths

view details

push time in 2 days

startedrealm/realm-java

started time in 2 days

startedrealm/SwiftLint

started time in 2 days

issue openedrealm/realm-js

Align Realm JS and Realm Web API Key credentials

We've discussed merging the concept of server and a user API keys in the SDKs and the current implementation publishes two different methods for server and user API keys.

The current types suggests a single Credentials.apiKey which Realm JS does not implement in its current capacity.

created time in 2 days

issue openedrealm/realm-cocoa

Realm init crash - realm::Table::migrate_indexes - app update from RealmSwift 3.21.0 to 5.2.0

Goals

Initialize Realm on app update without crashing.

Expected Results

After updating to our latest release, users are able to launch app and initialize Realm without crashing.

Actual Results

About 4% of users updating to our most recent release are crashing on launch. They will crash 100% of the time if they fall into this bucket. Our prior release was integrated with RealmSwift 3.21.0 and we updated to RealmSwift 5.2.0. No migrations as part of this update.

Stack Trace:

0  libsystem_kernel.dylib         0x18334b0dc __pthread_kill + 8
1  libsystem_pthread.dylib        0x1833c4094 pthread_kill$VARIANT$mp + 380
2  libsystem_c.dylib              0x1832a3ea8 abort + 140
3  Our App                  0x101707ff4 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char) + 190000
4  Our App                  0x101708164 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 190368
5  Our App                  0x1017082dc realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 190744
6  Our App                  0x10128cc94 realm::util::FunctionRef<void (realm::BPlusTreeNode*, unsigned long)>::FunctionRef<realm::BPlusTree<float>::set(unsigned long, float)::'lambda'(realm::BPlusTreeNode*, unsigned long)&>(float&&)::'lambda'(void*, realm::BPlusTreeNode*, unsigned long)::__invoke(void*, realm::BPlusTreeNode*, unsigned long) + 63 (function_ref.hpp:63)
7  Our App                  0x1015cdf3c realm::Array::move(unsigned long, unsigned long, unsigned long) + 2316628
8  Our App                  0x1016d1b78 realm::Table::migrate_indexes(realm::ColKey, realm::util::FunctionRef<void ()>) + 143392
9  Our App                  0x10165f92c realm::Transaction::upgrade_file_format(int) + 562396
10 Our App                  0x1016684c0 realm::DB::upgrade_file_format(bool, int, int, int) + 598128
11 Our App                  0x101666248 realm::DB::do_open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, realm::DBOptions) + 589304
12 Our App                  0x101668ae0 realm::DB::open(realm::Replication&, realm::DBOptions) + 599696
13 Our App                  0x10166c918 realm::DB::create(realm::Replication&, realm::DBOptions) + 615624
14 Our App                  0x1012a98b0 realm::_impl::RealmCoordinator::open_db() + 133184
15 Our App                  0x1012a8bfc realm::_impl::RealmCoordinator::do_get_realm(realm::Realm::Config, std::__1::shared_ptr<realm::Realm>&, realm::util::Optional<realm::VersionID>, realm::util::CheckedUniqueLock&) + 129932
16 Our App                  0x1012a8a90 realm::_impl::RealmCoordinator::get_realm(realm::Realm::Config, realm::util::Optional<realm::VersionID>) + 129568
17 Our App                  0x10137cef0 realm::Realm::get_shared_realm(realm::Realm::Config) + 187 (shared_realm.hpp:187)
18 Our App                  0x10134cccc +[RLMRealm realmWithConfiguration:queue:error:] + 4216 (memory:4216)
19 Our App                  0x1013c43c8 Realm.init(queue:) + 179680 (<compiler-generated>:179680)
20 Our App                  0x100f78a3c NotificationsRepository.loadNotifications(refresh:) + 31 (NotificationsRepository.swift:31)
21 Our App                  0x100f3355c partial apply for thunk for @escaping @callee_guaranteed () -> (@owned Observable<[Notification]>, @error @owned Error) + 4305007964 (<compiler-generated>:4305007964)
22 Our App                  0x1014b0d78 MapSwitchSink.performMap(_:) + 198 (Switch.swift:198)
23 Our App                  0x1014b044c SwitchSink.on(_:) + 79 (Switch.swift:79)
24 Our App                  0x1014b08e8 protocol witness for ObserverType.on(_:) in conformance SwitchSink<A, B, C> + 1147648 (<compiler-generated>:1147648)
25 Our App                  0x10148fbd0 partial apply + 1013224 (<compiler-generated>:1013224)
26 Our App                  0x1014a6d88 thunk for @escaping @callee_guaranteed (@in_guaranteed Event<A>) -> () + 1107872 (<compiler-generated>:1107872)
27 Our App                  0x10149556c PublishSubject.on(_:) + 14 (Bag+Rx.swift:14)
28 Our App                  0x101496694 protocol witness for ObserverType.on(_:) in conformance PublishSubject<A> + 1040556 (<compiler-generated>:1040556)
29 Our App                  0x10148f964 ObserverType.onNext(_:) + 30 (ObserverType.swift:30)
30 Our App                  0x100f478d8 AppDelegate.initLoadRemoteData() + 171 (AppDelegate.swift:171)
31 Our App                  0x100f4724c AppDelegate.application(_:didFinishLaunchingWithOptions:) + 75 (AppDelegate.swift:75)
32 Our App                  0x100f4740c @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 4305089548 (<compiler-generated>:4305089548)
33 UIKitCore                      0x1aff940f0 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 412
34 UIKitCore                      0x1aff95854 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3352
35 UIKitCore                      0x1aff9afe0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1540
36 UIKitCore                      0x1af85e2a4 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 776
37 UIKitCore                      0x1af86683c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160
38 UIKitCore                      0x1af85df28 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
39 UIKitCore                      0x1af85e818 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1064
40 UIKitCore                      0x1af85cb64 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 744
41 UIKitCore                      0x1af85c82c -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 428
42 UIKitCore                      0x1af86136c __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220
43 UIKitCore                      0x1af862150 _performActionsWithDelayForTransitionContext + 112
44 UIKitCore                      0x1af861224 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 244
45 UIKitCore                      0x1af865f24 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 360
46 UIKitCore                      0x1aff995e8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540
47 UIKitCore                      0x1afb95e04 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 360
48 FrontBoardServices             0x18612b9fc -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 440
49 FrontBoardServices             0x18613540c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 256
50 FrontBoardServices             0x186134c14 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 64
51 libdispatch.dylib              0x1831ed7d4 _dispatch_client_callout + 16
52 libdispatch.dylib              0x1831925dc _dispatch_block_invoke_direct$VARIANT$mp + 224
53 FrontBoardServices             0x186166040 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
54 FrontBoardServices             0x186165cdc -[FBSSerialQueue _performNext] + 408
55 FrontBoardServices             0x186166294 -[FBSSerialQueue _performNextFromRunLoopSource] + 52
56 CoreFoundation                 0x183740f1c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
57 CoreFoundation                 0x183740e9c __CFRunLoopDoSource0 + 88
58 CoreFoundation                 0x183740784 __CFRunLoopDoSources0 + 176
59 CoreFoundation                 0x18373b6c0 __CFRunLoopRun + 1004
60 CoreFoundation                 0x18373afb4 CFRunLoopRunSpecific + 436
61 GraphicsServices               0x18593c79c GSEventRunModal + 104
62 UIKitCore                      0x1aff9cc38 UIApplicationMain + 212
63 Our App                  0x100ef075c main + 19 (SelectItemViewModel.swift:19)
64 libdyld.dylib                  0x1831fe8e0 start + 4

Steps to Reproduce

Launch app after updating. Haven't been able to reproduce locally.

Code Sample

App is crashing the first time we hit this line:

let realm = try! Realm()

This is our Realm Configuration in use:

var config = Realm.Configuration(
            schemaVersion: 105,
            migrationBlock: { migration, oldSchemaVersion in
                if (oldSchemaVersion < 105) {
                    migration.deleteData(forType: Notification.className())
                }
})
config.fileURL = config.fileURL!.deletingLastPathComponent().appendingPathComponent("db5.realm")
Realm.Configuration.defaultConfiguration = config

Version of Realm and Tooling

Realm framework version: 5.2.0 Xcode version: 11.5 iOS/OSX version: iOS 13.5.1 Dependency manager + version: Cocoapods 1.9.3

created time in 2 days

push eventrealm/realm-core

James Stone

commit sha 005b941a9756325a246ce5a074824fba2c716dd1

remove unused method

view details

push time in 2 days

pull request commentrealm/realm-core

Parser support for ObjectId vs Timestamp literals

@jedelbo @RedBeard0531 could you please take another look? I made some significant changes to handle the type conversion, mainly to address this previous problem:

I think we should either do the conversion in the other direction, or have an OID ctor that fills in either 0x00 or 0xff depending on the comparison and whether it is inclusive or exclusive. Importantly, equality needs to acutally be a range query from OID(ts, 0x00) to OID(ts, 0xff)

If a Timestamp vs ObjectId comparison is detected, the behaviour is to do the comparison as if between two timestamps. This creates the expected behaviour that equality matches the range of ObjectIds from OID(ts, 0x00) to OID(ts, 0xff). While I believe this to be correct, it also create some subtleties because an ObjectId only stores the seconds part of a Timestamp so the comparison assumes that the nanoseconds part is zero. This means that ObjectId(Timestamp(1, 1)) != Timestamp(1, 1) but ObjectId(Timestamp(1, 0)) == Timestamp(1, 0) I wanted to point out this behaviour to double check, but I consider it an edge case. I'd expect the typical types of queries to be range based like ObjectId(Timestamp(1, 0)) >= Timestamp(1, 0) which will work as expected.

ironage

comment created time in 2 days

push eventrealm/realm-cocoa

Thomas Goyne

commit sha e3190ed2347deacb9bdb1f301ce068ec551469f7

Use precise lifetime for TimeoutProxyServer

view details

push time in 2 days

startedrealm/realm-java

started time in 2 days

push eventrealm/realm-cocoa

Thomas Goyne

commit sha d3f1254a52e8126cc04ff8f94ec22cfd64fdf876

Fix some headers which were duplicated in the project file

view details

Thomas Goyne

commit sha 29fc096299db0a2834d5d6f30e27b023fa0bec04

Fix the Swift name for several sync functions

view details

Jason Flax

commit sha 9f1935fa708d3a7811dd8f761eccaeaed875ff5c

Add admin sdk, clean up test process

view details

Jason Flax

commit sha 735971d623a016848c9b1c229edfbdc60017bcf8

Revert OS; remove proxy.rb

view details

Jason Flax

commit sha fe6477bbc731fab7b79e60e11231784ae6ca93d6

Revert bson change

view details

Jason Flax

commit sha dac7c260249a94015429f95fd3e7cc49620642b2

Update ObjectServerTests to 10.13

view details

Jason Flax

commit sha 0ecc3fe7b581fe19a6bf4eee816ecbb34acec981

Remove whitespace

view details

Jason Flax

commit sha 3c7380f92c2d1f35330f5a2a89c1a57f753c35ea

remove whitespace

view details

Jason Flax

commit sha 403f11cab846fbaf8ffe80c640bd6dc06e95dac8

Adjust setup script to download baas to appropriate gopath

view details

Jason Flax

commit sha 7a196b46858bf48d7ff2f22c03fed567a266d156

Appease linter

view details

Jason Flax

commit sha 8b8963484c80d3df6a15c5407c775c840e117fe5

add gopath

view details

Jason Flax

commit sha fceada13dcb9e85ca20426c165dd5dec6d39740a

change go_root var

view details

Jason Flax

commit sha 0d41ef3e04cbc4b1bb5bd0ee0b3de7573e31842c

clean up headers

view details

Jason Flax

commit sha def7ae2dbcf424cd4911fe6687f1d7f608c01e11

revert resetSyncManager logout functionality

view details

Jason Flax

commit sha 669923ee4a135b72e006f54767fc11c697a05854

Add admin push service

view details

push time in 2 days

push eventrealm/realm-core

James Stone

commit sha 2cbfcdf74bf8b8e0b45bbdd7b4b302ab6a3ef9eb

Update test_util_logger.cpp

view details

push time in 2 days

IssuesEvent

issue closedrealm/SwiftLint

Functions w/ Only Multiple Trailing Closures Trigger "No Space in Method Call" (Swift 5.3)

New Issue Checklist

Describe the bug

When using Swift 5.3's multiple trailing closure syntax (disabling the rule for multiple_closures_with_trailing_closure), a function call with only multiple trailing closures as arguments will trigger "No Space in Method Call Violation."

Common examples of such functions are:

  1. SwiftUI Button initializer:
Button { // No Space in Method Call Violation
    print("Button tapped")
} label: {
    Text("Button")
}
  1. Combine sink Operator:
Just(1)
    .sink { completion in // No Space in Method Call Violation
        print(completion)
    } receiveValue: { value in
        print(value)
    }
    .store(in: &disposeBag)

Function calls that begin with non-closure parameters followed by multiple trailing closures work just fine. For example:

UIView.animate(withDuration: 0.5) { // All clear, no violation
    print("animating")
} completion: { _ in
    print("done")
}

Removing the space properly triggers "Opening Brace Spacing Violation" (see swiftlint autocorrect output below).

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Loading configuration from '.swiftlint.yml'
Linting Swift files at paths
Linting 'ContentView.swift' (1/2)
Linting 'LintTestApp.swift' (2/2)
.../LintTest/ContentView.swift:17:15: warning: No Space in Method Call Violation: Don't add a space between the method name and the parentheses. (no_space_in_method_call)
Done linting! Found 1 violations, 0 serious in 2 files.
$ swiftlint autocorrect
Loading configuration from '.swiftlint.yml'
Correcting Swift files at paths
Correcting 'AnimationView.swift' (1/4)
Correcting 'LintViewModel.swift' (2/4)
Correcting 'ContentView.swift' (3/4)
Correcting 'LintTestApp.swift' (4/4)
.../LintTest/LintTest/ContentView.swift:17:15 Corrected No Space in Method Call
.../LintTest/LintTest/ContentView.swift:17:15 Corrected Opening Brace Spacing
.../LintTest/LintTest/LintViewModel.swift:20:18 Corrected No Space in Method Call
.../LintTest/LintTest/LintViewModel.swift:20:18 Corrected Opening Brace Spacing
Done correcting 4 files!

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.39.2
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
  • Paste your configuration file:
disabled_rules:
  - multiple_closures_with_trailing_closure

# Implicitly relevant:
# - no_space_in_method_call
# - opening_brace
  • Are you using nested configurations? No.
  • Which Xcode version are you using (check xcodebuild -version)? Xcode 12.0 Build version 12A6159 (Beta 1)
  • Do you have a sample that shows the issue?
Button { // No Space in Method Call Violation
    print("Button tapped")
} label: {
    Text("Button")
}

Additional Comments

Looking into fixing this by adjusting NoSpaceInMethodCallRule.swift. Once the issue is resolved, it may be worth considering disabling the multiple_closures_with_trailing_closure rule by default. While the new syntax isn't universally loved, it mitigates the call site ambiguity that motivated the rule's creation.

closed time in 2 days

giladronat

push eventrealm/realm-core

James Stone

commit sha 8bdd06316498bbe3f3e6894a0d8ce8f76b22774f

clean up

view details

push time in 2 days

push eventrealm/realm-core

James Stone

commit sha 7ef914ac2b7510a93a3e0c20a1b67fe09147af0a

timestamp property vs objectid value queries

view details

push time in 2 days

Pull request review commentrealm/realm-js

Fix network transport threading

 struct JavaScriptNetworkTransport : public JavaScriptNetworkTransportWrapper<T>     using Object = js::Object<T>;     using Value = js::Value<T>; -    JavaScriptNetworkTransport(ContextType ctx)  : JavaScriptNetworkTransportWrapper<T>(ctx) , m_ctx(ctx) {-        realm_constructor = Value::validated_to_object(m_ctx, Object::get_global(m_ctx, "Realm"));-        network_transport = Object::get_property(m_ctx, realm_constructor, "_networkTransport");-    };+    using SendRequestHandler = void(ContextType m_ctx, const app::Request request, std::function<void(const app::Response)> completion_callback); -    void send_request_to_server(const app::Request request, std::function<void(const app::Response)> completion_callback) override {-        // Create a response handler-        ObjectType response_handler = ResponseHandlerClass<T>::create_instance(m_ctx, std::move(completion_callback));--        // Create a JavaScript version of the request-        ObjectType request_object = Object::create_empty(m_ctx);-        Object::set_property(m_ctx, request_object, "method", Value::from_string(m_ctx, fromHttpMethod(request.method)));-        Object::set_property(m_ctx, request_object, "url", Value::from_string(m_ctx, request.url));-        Object::set_property(m_ctx, request_object, "timeoutMs", Value::from_number(m_ctx, request.timeout_ms));-        if (!request.body.empty()) {-            Object::set_property(m_ctx, request_object, "body", Value::from_string(m_ctx, request.body));-        }-        ObjectType headers_object = Object::create_empty(m_ctx);-        for (auto header : request.headers) {-            Object::set_property(m_ctx, headers_object, header.first, Value::from_string(m_ctx, header.second));-        }-        Object::set_property(m_ctx, request_object, "headers", headers_object);+    JavaScriptNetworkTransport(ContextType ctx) : m_ctx(ctx) {}; -        ValueType arguments[] = {-            request_object,-            response_handler,-        };+    static void init(ContextType ctx) {+        //this initializes the EventLoopDispatcher on the main JS thread+        get_send_request_handler();+    } -        Object::call_method(m_ctx, Value::to_object(m_ctx, network_transport), "fetchWithCallbacks", 2, arguments);+    void send_request_to_server(const app::Request request, std::function<void(const app::Response)> completion_callback) override {+        auto send_request_handler = get_send_request_handler();

I changed this to auto& as part of resolving the conflict in my watch() PR when rebasing. https://github.com/realm/realm-js/pull/3004/files#diff-174249016341759699d0ec6689002912

blagoev

comment created time in 2 days

push eventrealm/realm-js

Mathias Stearn

commit sha 749e664a86fccd62d917ea82b60489be22e33cd6

refix typo post-rebase

view details

push time in 2 days

push eventrealm/realm-js

blagoev

commit sha eebbc97272ff60fbe0f58ef50cbf62dbb8c5c3b8

Fix network transport threading (#3031) * always use the main js thread when sending network requests using the EventLoopDispatcher update OS to latest v10 * update changelog

view details

Steffen Agger

commit sha e5e236e0199054c3aa4dcd172d30c53ab2eea4f8

toJSON correction matching master (#3034) * toJSON returns any instead of object in TS declaration * toJSON correction added to changelog

view details

blagoev

commit sha 12169eff7fde01c0e3e5faccc2524743b0b09f2e

avoid unnecessary coping of EventLoopDispatcher (#3038)

view details

blagoev

commit sha d23bcc90768285976cceade89724cedc271a3a1a

[10.0.0-beta.8] Bump version

view details

Kræn Hansen

commit sha 78f59b6015c3f4bfe5fb59c953bafa8e5f14903b

Update package.json Removed the .tgz of Realm Network Transport from the Realm Web package.json

view details

Kræn Hansen

commit sha a19de794307742a6b0a386ec27c2e5858ddd7a00

Update CONTRIBUTING.md Adding instructions on authenticating towards the GitHub container registry

view details

Kenneth Geisshirt

commit sha d7531310105709aa25365eb9f211acb5bbb97276

sendResetPasswordEmail() must parse arguments correctly (#3043)

view details

Kenneth Geisshirt

commit sha ada6d80077c1711c230f624fa409729ba32b31c3

Generate API doc for Realm.Sync too (#3040)

view details

Kenneth Geisshirt

commit sha eabb78dfce0cf12dff168deb72a2ba2d6325a9b0

Log out using App::log_out() (#3030)

view details

Mathias Stearn

commit sha a43ac68ef92ef3ed94f4ab026e753b2e5057e3bb

fix failing MongoDBRealmSync test

view details

Kræn Hansen

commit sha 70b24faef596b4d8d0e37fddb83906f97a5b7b83

Using realm-network-transport v0.6.0 fixing "process.versions is not an Object" (#3046) * Upgraded realm-network-transport * Adding an entry in the changelog

view details

Kræn Hansen

commit sha fb9f1d1549a51f03e0f232fc3e0edef4a7b7eb6f

Merge Realm JS and Realm Web types (#2950) * Updating package locks from release * Merging types and adjusting configs * Fixed linting issues * Merged the auth provider types * Updated types related to auth providers * Fixing the functions factory types * Fixed integration tests based on updated types * Made options optional when using the HTTP service * Delete the commented App class declaration * Merge types and update code accordingly * Package-lock got updated * Fixed logging out a logged out user * Commented out the App#logOut method * Adding removeUser to the tests * Update types/app.d.ts Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com> * Removed "| void" * resendConfirmation → resendConfirmationEmail * Removed logOut method from the `App` * Fixed App constructor type * Using unshift instead of splice where applicable * Adopted API to the latest proposal * Fixed the realm-network-transport types * Updating integration tests * ApiKeyAuth renames (#3047) * Renamed UserAPIKeyProvider to ApiKeyAuth * Renaming instance methods * Moved from user.auth.apiKeys to user.apiKeys * Renamed js_user_apikey_provider.hpp to js_api_key_auth.hpp * Updated the jsdocs * Adding apiKeys to the browser proxy * Adding a note in the changelog * EmailPasswordAuth renames (#3048) * Renamed to js_email_password_auth.hpp, email-password-auth-methods.js and api-key-auth-methods.js * Adding a note in the changelog * Updated docs * Renamed to EmailPasswordAuth * Moved push service to a seperate interface * Implemented a throwing push for a user * Incorporated feedback * v10 refactoring (#2996) * registerEmail -> registerUser * Realm.User.identity -> Realm.User.id. Realm.User.token -> Realm.User.accessToken. Add Realm.User.refreshToken. * Turn Realm.App.{currentUser, allUsers} to an instance property * Add Realm.Auth.EmailPassword.callResetPasswordFunction * Wrongly merged * Removed UserProfile from index.d.ts and updated pictureUrl Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com>

view details

Kræn Hansen

commit sha 8d14d21f9e0a3116735c903655af65d32dabb974

Realm Web: Fixed TypeScript bundle (#2960) * Fixed bundle.d.ts * Bumped version to 0.3.0 * Fixed install instructions in the README.md * Updated package-locks * Adding a changelog * bson library is broken from 4.0.1 * Adding an entry to the changelog * Updated the changelog * Print errors and warnings from the browser

view details

Kræn Hansen

commit sha c53dcc324b1d2a57a9ee103544ad525ca5a7cb76

Realm Web: Persist and retrieve users (#2990) * Adding the ability to store and restore users * Fixed the failing tests * Adding a restore integration test * Adding an entry to the changelog * Reimplemented clearing of storage * Incorporated review comments * Fixed clearing the local storage * Fixed a bug in UserStorage * Removed unused import * Removed notice from the README.md * Updated naming according to comment

view details

Kræn Hansen

commit sha fb94f7c03aa5e2956c9ac166f09abac60ea06f78

Realm Web: Refactored `AuthenticatedTransport` (#2994) * Refactored transports (moving user argument) * Fixed tests * Updated docs

view details

Kræn Hansen

commit sha 042138836af1efbaf3667e6599babdc3af683c13

Realm Web: Fetch location metadata (#3000) * Implemented an AppTransport * Fetching location metadata * Updated the changelog and readme * Fixed a typo in the docs comment

view details

Kræn Hansen

commit sha 0430d008771f18b57d034a70413ccd90c2af68b5

Realm Web: Minor refactors (#3001) * Moving serialization to FunctionsFactory and its create to be static * Removed "Remote" prefix from the mongodb classes * Updated the readme and changelog * Adding dots to the end of docs sentencens * Expecting an empty statusText * Fixed the comment * Bumped version and published * Updated the changelog * Fixing a bug and adding it to the changelog * Updated `update` type arguments

view details

Kræn Hansen

commit sha be795e1e47a5cbc7805ee74e2b35663c839259d3

Realm Web: More credentials (#3019) * Implemented and tested Google and Facebook credentials * Adding custom function credentials * Adding JWT credentials * Deriving customData from the access token * Implemented Apple ID credentials * Adding an entry in the changelog * Fixed credentials integration tests * Incorporated feedback and updated docs strings

view details

Kræn Hansen

commit sha cc11c8829d29a775a1412b1a6687bb904bcac58e

Realm Web: Refresh access token (#3020) * Refresh access token when a request fails with "invalid session" * Fixed the broken tests * Published realm-network-transport * Adding a note to the changelog * Published Realm Web 0.6.0 * Published realm-network-transport 0.6.0 * Fixed the tests * Updated realm-network-transport * Incorporated feedback

view details

Mathias Stearn

commit sha 4cf209f6d305e163e538c3b02225e69c8ec024aa

Factor out common code for handling callbacks into wrapper functions This gets us closer to the ideal of each C++ function only expressing its core business logic without excess noise.

view details

push time in 2 days

issue commentrealm/realm-java

Error on deletion

This occurred only after upgrading from 6.1.0 to 7.0.1.

The crash itself happened after downloading a bunch of entities from a remote API and then using Realm’s insertOrUpdate(). Unfortunately, I don’t have more information myself :/

GaelCO

comment created time in 2 days

push eventrealm/realm-js

Mathias Stearn

commit sha 4cf209f6d305e163e538c3b02225e69c8ec024aa

Factor out common code for handling callbacks into wrapper functions This gets us closer to the ideal of each C++ function only expressing its core business logic without excess noise.

view details

push time in 2 days

delete branch realm/realm-js

delete branch : ms/apperr_helper

delete time in 2 days

PR merged realm/realm-js

Reviewers
Factor out common code for handling callbacks into wrapper functions

What, How & Why?

This gets us closer to the ideal of each C++ function only expressing its core business logic without excess noise.

☑️ ToDos

Since this is just an internal refactor, I don't think any of the default ToDos really apply. Let me know if you disagree.

<!-- Add your own todos here -->

  • ~[ ] 📝 Changelog entry~
  • ~[ ] 📝 Compatibility label is updated or copied from previous entry~
  • ~[ ] 🚦 Tests~
  • ~[ ] 📝 Public documentation PR created or is not necessary~
  • ~[ ] 💥 Breaking label has been applied or is not necessary~

If this PR adds or changes public API's:

  • ~[ ] typescript definitions file is updated~
  • ~[ ] jsdoc files updated~
  • ~[ ] Chrome debug API is updated if API is available on React Native~
+139 -288

3 comments

9 changed files

RedBeard0531

pr closed time in 2 days

push eventrealm/realm-js

Mathias Stearn

commit sha ed315dbea0e099895543bd0b923d4a395387c736

Factor out common code for handling callbacks into wrapper functions This gets us closer to the ideal of each C++ function only expressing its core business logic without excess noise.

view details

push time in 2 days

push eventrealm/realm-js

Kræn Hansen

commit sha fb9f1d1549a51f03e0f232fc3e0edef4a7b7eb6f

Merge Realm JS and Realm Web types (#2950) * Updating package locks from release * Merging types and adjusting configs * Fixed linting issues * Merged the auth provider types * Updated types related to auth providers * Fixing the functions factory types * Fixed integration tests based on updated types * Made options optional when using the HTTP service * Delete the commented App class declaration * Merge types and update code accordingly * Package-lock got updated * Fixed logging out a logged out user * Commented out the App#logOut method * Adding removeUser to the tests * Update types/app.d.ts Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com> * Removed "| void" * resendConfirmation → resendConfirmationEmail * Removed logOut method from the `App` * Fixed App constructor type * Using unshift instead of splice where applicable * Adopted API to the latest proposal * Fixed the realm-network-transport types * Updating integration tests * ApiKeyAuth renames (#3047) * Renamed UserAPIKeyProvider to ApiKeyAuth * Renaming instance methods * Moved from user.auth.apiKeys to user.apiKeys * Renamed js_user_apikey_provider.hpp to js_api_key_auth.hpp * Updated the jsdocs * Adding apiKeys to the browser proxy * Adding a note in the changelog * EmailPasswordAuth renames (#3048) * Renamed to js_email_password_auth.hpp, email-password-auth-methods.js and api-key-auth-methods.js * Adding a note in the changelog * Updated docs * Renamed to EmailPasswordAuth * Moved push service to a seperate interface * Implemented a throwing push for a user * Incorporated feedback * v10 refactoring (#2996) * registerEmail -> registerUser * Realm.User.identity -> Realm.User.id. Realm.User.token -> Realm.User.accessToken. Add Realm.User.refreshToken. * Turn Realm.App.{currentUser, allUsers} to an instance property * Add Realm.Auth.EmailPassword.callResetPasswordFunction * Wrongly merged * Removed UserProfile from index.d.ts and updated pictureUrl Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com>

view details

Kræn Hansen

commit sha 8d14d21f9e0a3116735c903655af65d32dabb974

Realm Web: Fixed TypeScript bundle (#2960) * Fixed bundle.d.ts * Bumped version to 0.3.0 * Fixed install instructions in the README.md * Updated package-locks * Adding a changelog * bson library is broken from 4.0.1 * Adding an entry to the changelog * Updated the changelog * Print errors and warnings from the browser

view details

Kræn Hansen

commit sha c53dcc324b1d2a57a9ee103544ad525ca5a7cb76

Realm Web: Persist and retrieve users (#2990) * Adding the ability to store and restore users * Fixed the failing tests * Adding a restore integration test * Adding an entry to the changelog * Reimplemented clearing of storage * Incorporated review comments * Fixed clearing the local storage * Fixed a bug in UserStorage * Removed unused import * Removed notice from the README.md * Updated naming according to comment

view details

Kræn Hansen

commit sha fb94f7c03aa5e2956c9ac166f09abac60ea06f78

Realm Web: Refactored `AuthenticatedTransport` (#2994) * Refactored transports (moving user argument) * Fixed tests * Updated docs

view details

Kræn Hansen

commit sha 042138836af1efbaf3667e6599babdc3af683c13

Realm Web: Fetch location metadata (#3000) * Implemented an AppTransport * Fetching location metadata * Updated the changelog and readme * Fixed a typo in the docs comment

view details

Kræn Hansen

commit sha 0430d008771f18b57d034a70413ccd90c2af68b5

Realm Web: Minor refactors (#3001) * Moving serialization to FunctionsFactory and its create to be static * Removed "Remote" prefix from the mongodb classes * Updated the readme and changelog * Adding dots to the end of docs sentencens * Expecting an empty statusText * Fixed the comment * Bumped version and published * Updated the changelog * Fixing a bug and adding it to the changelog * Updated `update` type arguments

view details

Kræn Hansen

commit sha be795e1e47a5cbc7805ee74e2b35663c839259d3

Realm Web: More credentials (#3019) * Implemented and tested Google and Facebook credentials * Adding custom function credentials * Adding JWT credentials * Deriving customData from the access token * Implemented Apple ID credentials * Adding an entry in the changelog * Fixed credentials integration tests * Incorporated feedback and updated docs strings

view details

Kræn Hansen

commit sha cc11c8829d29a775a1412b1a6687bb904bcac58e

Realm Web: Refresh access token (#3020) * Refresh access token when a request fails with "invalid session" * Fixed the broken tests * Published realm-network-transport * Adding a note to the changelog * Published Realm Web 0.6.0 * Published realm-network-transport 0.6.0 * Fixed the tests * Updated realm-network-transport * Incorporated feedback

view details

Mathias Stearn

commit sha 3c5c0fa3e92ed776fb96b330e6d60499ac7dfde8

Factor out common code for handling callbacks into wrapper functions This gets us closer to the ideal of each C++ function only expressing its core business logic without excess noise.

view details

push time in 2 days

Pull request review commentrealm/realm-core

Fix old query syntax for list of primitives

 namespace {  template <class Node> struct MakeConditionNode {-    static std::unique_ptr<ParentNode> make(ColKey col_key, typename Node::TConditionValue value)+    static std::unique_ptr<ParentNode> make(ColKey col_key, typename Node::TConditionValue value, const Table& table)     {-        return std::unique_ptr<ParentNode>{new Node(std::move(value), col_key)};+        if (col_key.is_list()) {+            using ValueType = typename Node::TConditionValue;+            using NonOptionalValueType = typename util::RemoveOptional<ValueType>::type;+            return std::unique_ptr<ParentNode>(+                new ExpressionNode(make_expression<Compare<typename Node::TConditionOperator, NonOptionalValueType>>(+                    table.column<Lst<NonOptionalValueType>>(col_key).clone(),+                    make_subexpr<Value<NonOptionalValueType>>(value))));+        }

The constant experession node should come first. Otherwise we will not get the "left is const" optimization in Compare node. This goes for the other cases as well.

ironage

comment created time in 2 days

Pull request review commentrealm/realm-core

Fix old query syntax for list of primitives

 namespace {  template <class Node> struct MakeConditionNode {-    static std::unique_ptr<ParentNode> make(ColKey col_key, typename Node::TConditionValue value)+    static std::unique_ptr<ParentNode> make(ColKey col_key, typename Node::TConditionValue value, const Table& table)     {-        return std::unique_ptr<ParentNode>{new Node(std::move(value), col_key)};+        if (col_key.is_list()) {+            using ValueType = typename Node::TConditionValue;+            using NonOptionalValueType = typename util::RemoveOptional<ValueType>::type;+            return std::unique_ptr<ParentNode>(+                new ExpressionNode(make_expression<Compare<typename Node::TConditionOperator, NonOptionalValueType>>(+                    table.column<Lst<NonOptionalValueType>>(col_key).clone(),+                    make_subexpr<Value<NonOptionalValueType>>(value))));+        }+        else {+            return std::unique_ptr<ParentNode>{new Node(std::move(value), col_key)};+        }     } -    static std::unique_ptr<ParentNode> make(ColKey col_key, null)+    static std::unique_ptr<ParentNode> make(ColKey col_key, null, const Table& table)     {-        return std::unique_ptr<ParentNode>{new Node(null{}, col_key)};+        if (col_key.is_list()) {+            using ValueType = typename Node::TConditionValue;+            using NonOptionalValueType = typename util::RemoveOptional<ValueType>::type;+            return std::unique_ptr<ParentNode>(+                new ExpressionNode(make_expression<Compare<typename Node::TConditionOperator, NonOptionalValueType>>(+                    table.column<Lst<NonOptionalValueType>>(col_key).clone(),+                    make_subexpr<Value<realm::null>>(null()))));+        }+        else {+            return std::unique_ptr<ParentNode>{new Node(null{}, col_key)};+        }     }      template <class T = typename Node::TConditionValue>     static typename std::enable_if<!std::is_same<typename util::RemoveOptional<T>::type, T>::value,                                    std::unique_ptr<ParentNode>>::type-    make(ColKey col_key, typename util::RemoveOptional<T>::type value)+    make(ColKey col_key, typename util::RemoveOptional<T>::type value, const Table& table)     {-        return std::unique_ptr<ParentNode>{new Node(std::move(value), col_key)};+        if (col_key.is_list()) {+            using NonOptionalT = typename util::RemoveOptional<T>::type;+            return std::unique_ptr<ParentNode>(+                new ExpressionNode(make_expression<Compare<typename Node::TConditionOperator, NonOptionalT>>(+                    table.column<Lst<NonOptionalT>>(col_key).clone(), make_subexpr<Value<NonOptionalT>>(value))));+        }+        else {+            return std::unique_ptr<ParentNode>{new Node(std::move(value), col_key)};+        }     }      template <class T>-    static std::unique_ptr<ParentNode> make(ColKey, T)+    static std::unique_ptr<ParentNode> make(ColKey, T, const Table&)     {         throw LogicError{LogicError::type_mismatch};     } };  template <class Cond> struct MakeConditionNode<IntegerNode<ArrayInteger, Cond>> {-    static std::unique_ptr<ParentNode> make(ColKey col_key, int64_t value)+    static std::unique_ptr<ParentNode> make(ColKey col_key, int64_t value, const Table& table)+    {+        if (col_key.is_list()) {+            return std::unique_ptr<ParentNode>(new ExpressionNode(make_expression<Compare<Cond, Int>>(+                table.column<Lst<Int>>(col_key).clone(), make_subexpr<Value<Int>>(value))));+        }+        else {+            return std::unique_ptr<ParentNode>{new IntegerNode<ArrayInteger, Cond>(std::move(value), col_key)};+        }+    }++    static std::unique_ptr<ParentNode> make(ColKey col_key, null, const Table& table)     {-        return std::unique_ptr<ParentNode>{new IntegerNode<ArrayInteger, Cond>(std::move(value), col_key)};+        if (col_key.is_list()) {+            using ValueType = typename IntegerNode<ArrayInteger, Cond>::TConditionValue;+            using NonOptionalValueType = typename util::RemoveOptional<ValueType>::type;

Would NonOptionalValueType not always be Int?

ironage

comment created time in 2 days

Pull request review commentrealm/realm-object-store

Added Realm::shutdown_sync() which waits for Realm file to be closed

 void Realm::close()     m_coordinator = nullptr; } +void Realm::shutdown_sync()+{+    if (m_coordinator)+        m_coordinator->shutdown_sync();+}

Changed

kspangsege

comment created time in 2 days

push eventrealm/realm-object-store

Kristian Spangsege

commit sha 0f5531a999da784788ac58ecb7c07eb3f772a41a

Added Realm::shutdown_sync() which waits for Realm file to be closed on behalf of underlying sync session (sync::Session)

view details

push time in 2 days

Pull request review commentrealm/realm-object-store

Added Realm::shutdown_sync() which waits for Realm file to be closed

 void Realm::close()     m_coordinator = nullptr; } +void Realm::shutdown_sync()+{+    if (m_coordinator)+        m_coordinator->shutdown_sync();+}

I'll change this to error if m_coordinator is null in order to catch cases where close incorrectly comes first

kspangsege

comment created time in 2 days

create barnchrealm/realm-object-store

branch : ks/shutdown-sync

created branch time in 2 days

push eventrealm/realm-js

Kræn Hansen

commit sha a19de794307742a6b0a386ec27c2e5858ddd7a00

Update CONTRIBUTING.md Adding instructions on authenticating towards the GitHub container registry

view details

Kenneth Geisshirt

commit sha d7531310105709aa25365eb9f211acb5bbb97276

sendResetPasswordEmail() must parse arguments correctly (#3043)

view details

Kenneth Geisshirt

commit sha ada6d80077c1711c230f624fa409729ba32b31c3

Generate API doc for Realm.Sync too (#3040)

view details

Kenneth Geisshirt

commit sha eabb78dfce0cf12dff168deb72a2ba2d6325a9b0

Log out using App::log_out() (#3030)

view details

Mathias Stearn

commit sha a43ac68ef92ef3ed94f4ab026e753b2e5057e3bb

fix failing MongoDBRealmSync test

view details

Kræn Hansen

commit sha 70b24faef596b4d8d0e37fddb83906f97a5b7b83

Using realm-network-transport v0.6.0 fixing "process.versions is not an Object" (#3046) * Upgraded realm-network-transport * Adding an entry in the changelog

view details

Kræn Hansen

commit sha fb9f1d1549a51f03e0f232fc3e0edef4a7b7eb6f

Merge Realm JS and Realm Web types (#2950) * Updating package locks from release * Merging types and adjusting configs * Fixed linting issues * Merged the auth provider types * Updated types related to auth providers * Fixing the functions factory types * Fixed integration tests based on updated types * Made options optional when using the HTTP service * Delete the commented App class declaration * Merge types and update code accordingly * Package-lock got updated * Fixed logging out a logged out user * Commented out the App#logOut method * Adding removeUser to the tests * Update types/app.d.ts Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com> * Removed "| void" * resendConfirmation → resendConfirmationEmail * Removed logOut method from the `App` * Fixed App constructor type * Using unshift instead of splice where applicable * Adopted API to the latest proposal * Fixed the realm-network-transport types * Updating integration tests * ApiKeyAuth renames (#3047) * Renamed UserAPIKeyProvider to ApiKeyAuth * Renaming instance methods * Moved from user.auth.apiKeys to user.apiKeys * Renamed js_user_apikey_provider.hpp to js_api_key_auth.hpp * Updated the jsdocs * Adding apiKeys to the browser proxy * Adding a note in the changelog * EmailPasswordAuth renames (#3048) * Renamed to js_email_password_auth.hpp, email-password-auth-methods.js and api-key-auth-methods.js * Adding a note in the changelog * Updated docs * Renamed to EmailPasswordAuth * Moved push service to a seperate interface * Implemented a throwing push for a user * Incorporated feedback * v10 refactoring (#2996) * registerEmail -> registerUser * Realm.User.identity -> Realm.User.id. Realm.User.token -> Realm.User.accessToken. Add Realm.User.refreshToken. * Turn Realm.App.{currentUser, allUsers} to an instance property * Add Realm.Auth.EmailPassword.callResetPasswordFunction * Wrongly merged * Removed UserProfile from index.d.ts and updated pictureUrl Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com>

view details

Kræn Hansen

commit sha 8d14d21f9e0a3116735c903655af65d32dabb974

Realm Web: Fixed TypeScript bundle (#2960) * Fixed bundle.d.ts * Bumped version to 0.3.0 * Fixed install instructions in the README.md * Updated package-locks * Adding a changelog * bson library is broken from 4.0.1 * Adding an entry to the changelog * Updated the changelog * Print errors and warnings from the browser

view details

Kræn Hansen

commit sha c53dcc324b1d2a57a9ee103544ad525ca5a7cb76

Realm Web: Persist and retrieve users (#2990) * Adding the ability to store and restore users * Fixed the failing tests * Adding a restore integration test * Adding an entry to the changelog * Reimplemented clearing of storage * Incorporated review comments * Fixed clearing the local storage * Fixed a bug in UserStorage * Removed unused import * Removed notice from the README.md * Updated naming according to comment

view details

Kræn Hansen

commit sha fb94f7c03aa5e2956c9ac166f09abac60ea06f78

Realm Web: Refactored `AuthenticatedTransport` (#2994) * Refactored transports (moving user argument) * Fixed tests * Updated docs

view details

Kræn Hansen

commit sha 042138836af1efbaf3667e6599babdc3af683c13

Realm Web: Fetch location metadata (#3000) * Implemented an AppTransport * Fetching location metadata * Updated the changelog and readme * Fixed a typo in the docs comment

view details

Kræn Hansen

commit sha 0430d008771f18b57d034a70413ccd90c2af68b5

Realm Web: Minor refactors (#3001) * Moving serialization to FunctionsFactory and its create to be static * Removed "Remote" prefix from the mongodb classes * Updated the readme and changelog * Adding dots to the end of docs sentencens * Expecting an empty statusText * Fixed the comment * Bumped version and published * Updated the changelog * Fixing a bug and adding it to the changelog * Updated `update` type arguments

view details

Kræn Hansen

commit sha be795e1e47a5cbc7805ee74e2b35663c839259d3

Realm Web: More credentials (#3019) * Implemented and tested Google and Facebook credentials * Adding custom function credentials * Adding JWT credentials * Deriving customData from the access token * Implemented Apple ID credentials * Adding an entry in the changelog * Fixed credentials integration tests * Incorporated feedback and updated docs strings

view details

Kræn Hansen

commit sha cc11c8829d29a775a1412b1a6687bb904bcac58e

Realm Web: Refresh access token (#3020) * Refresh access token when a request fails with "invalid session" * Fixed the broken tests * Published realm-network-transport * Adding a note to the changelog * Published Realm Web 0.6.0 * Published realm-network-transport 0.6.0 * Fixed the tests * Updated realm-network-transport * Incorporated feedback

view details

Kræn Hansen

commit sha 5c9d416b8e2d6fd9bf7948ee7cf7f34924cc2ccd

Fixed integration test harness

view details

Kræn Hansen

commit sha 2293fc56d66ba24804af075298a0131be11854cb

Fixed integration tests

view details

Kræn Hansen

commit sha 6bced8b92eae7f0acf536acba05396d5235e9302

Updated the package lock

view details

Kræn Hansen

commit sha e89632560f050addf62fb40fdf628aeff85b1f5b

Had to reset the cache - leaving it uncommented

view details

push time in 2 days

push eventrealm/realm-js

Kræn Hansen

commit sha cc11c8829d29a775a1412b1a6687bb904bcac58e

Realm Web: Refresh access token (#3020) * Refresh access token when a request fails with "invalid session" * Fixed the broken tests * Published realm-network-transport * Adding a note to the changelog * Published Realm Web 0.6.0 * Published realm-network-transport 0.6.0 * Fixed the tests * Updated realm-network-transport * Incorporated feedback

view details

push time in 2 days

delete branch realm/realm-js

delete branch : kh/web/refresh-access-token

delete time in 2 days

PR merged realm/realm-js

Realm Web: Refresh access token

What, How & Why?

This fixes the first part of #2965 (refreshing tokens upon the first 401 response.

Note: This should be rebased on v10 once the current base has been merged.

☑️ ToDos

  • [x] 📝 Changelog entry
  • [x] 📝 Compatibility label is updated or copied from previous entry
  • [x] 🚦 Tests
  • [x] 📝 Public documentation PR created or is not necessary
  • [x] 💥 Breaking label has been applied or is not necessary
+363 -132

1 comment

21 changed files

kraenhansen

pr closed time in 2 days

startedrealm/jazzy

started time in 2 days

more