You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Realm.Sync.Adapter API and I am trying to get the Node.js process to finish when I am done using the adapter API. However, if I use the adapter to open any Realm, the Node.js process never finishes executing.
Expected Results
This is my TypeScript code:
import*asRealmfrom'realm';constschemas: Realm.ObjectSchema[]=[{name: 'TestObj',primaryKey: 'pk',properties: {pk: 'string',a: 'string',b: 'int',c: 'bool',}}]letadapter: Realm.Sync.Adapter;Realm.Sync.User.login('https://my-realm-cloud-instance.us1.cloud.realm.io',Realm.Sync.Credentials.usernamePassword('my_username','my_password')).then(user=>{adapter=newRealm.Sync.Adapter('adapterData','realms://my-realm-cloud-instance.us1.cloud.realm.io',user,`.*`,(blah: string)=>{console.log(blah)})// If I comment out these two lines of code, then the process will terminateconstrealm=adapter.realmAtPath('/localTestData',schemas)realm.close()adapter.close()user.logout()return;}).catch(err=>{console.log(err)})
I would expect the above compiled Node.js program to finish to completion and terminate.
Actual Results
Instead of terminating, the above program hangs indefinitely. If I sample the process, one of the threads seems to be stuck in realm::util::network::Service::Impl::run() in realm.node.
Client OS & Version: Darwin REDACTED 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64 (13-inch Macbook Pro 2017, macOS 10.14.4)
The text was updated successfully, but these errors were encountered:
Goals
I am using the
Realm.Sync.Adapter
API and I am trying to get the Node.js process to finish when I am done using the adapter API. However, if I use the adapter to open any Realm, the Node.js process never finishes executing.Expected Results
This is my TypeScript code:
I would expect the above compiled Node.js program to finish to completion and terminate.
Actual Results
Instead of terminating, the above program hangs indefinitely. If I sample the process, one of the threads seems to be stuck in
realm::util::network::Service::Impl::run()
inrealm.node
.Steps to Reproduce
Compile the above code sample with this
tsconfig.json
:and run the program. It will not terminate, unless the following two lines are commented out:
Code Sample
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: