-
Type: Improvement
-
Resolution: Gone away
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Goals
Open synced realm via Realm.open()
Expected Results
No errors
Actual Results
The promise returns a user object but an error message is printed in the console:
ERROR: Connection[1]: Failed to connect to endpoint '::1:9080': Connection refused Connection[1]: Connected to endpoint '127.0.0.1:9080' (from '127.0.0.1:63925')
Steps to Reproduce
Running a Node.js app on a macOS laptop, nothing special. The source is below:
Code Sample
const HOST_PORT = 'localhost:9080'; const RW_USER = 'user1@realm'; const RW_PASS = 'password'; const FILE_NAME = 'test_259'; 'use strict'; const Realm = require('realm'); const PersonSchema = { name: 'Person', properties: { id: {type: 'string'}, name: {type: 'string'} } }; Realm.Sync.User.login('http://'+HOST_PORT+'/', RW_USER, RW_PASS) .then(user => { console.log("SUCCESS LOGIN: connected..."); Realm.open({ sync: { user: user, url: 'realm://'+HOST_PORT+'/~/'+FILE_NAME }, schema: [PersonSchema], schemaVersion: 1 }) .then(realm => { console.log("SUCCESS OPEN: file created..."); }) })
Version of Realm and Tooling
- Realm JS SDK Version: realm: latest on npm
- Node or React Native: Node.js
- Client OS & Version: macOS 10.12.6
To clarify a bit more: The API works as expected, except for printing out an error message in the console. I'd recommend If there is no actual error avoid confusing the developers, and in case there is an actual error - the open file API shouldn't work.