1

Follow guide from https://sync.objectbox.io/objectbox-sync-server

I already has my downloaded Objectbox sync server files

  1. Download My Objectbox sync-server file (i got it from Objectbox Team) that and extract it
  2. Copy my objectbox-model.json (generated file from my flutter app) to the extracted folder

try with

     ./sync-server --model=objectbox-model.json --unsecure-no-authentication

It gave me

     001-16:08:29.6169 [INFO ] [SySvAp] Starting ObjectBox Sync Server version 2 
     (protocol version: 3, core: 2.9.2-2021-07-19 (SyncServer, admin, tree, dlog))
     error parsing options: Option ‘unsecure-no-authentication’ does not exist
  1. Create configuration file (sync-server-config.js) Contain:

     {
      "dbDirectory": "objectbox",
      "dbMaxSize": "100G",
      "modelFile": "objectbox-model.json",
      "bind": "ws://0.0.0.0:9999",
      "browserBind": "http://127.0.0.1:9980",
      "browserThreads": 4,
      "certificatePath": "",
      "auth": {
      "sharedSecret": "<secret>",
      }
     }
    
  2. And Open Terminal on from that folder Run ./sync-server

  3. It return me Error

      001-16:35:51.9701 [INFO ] [SySvAp] Starting ObjectBox Sync Server version 2 
      (protocol version: 3, core: 2.9.2-2021-07-19 (SyncServer, admin, tree, dlog))
      001-16:35:51.9702 [INFO ] [SySvAp] Loading configuration file sync-server- 
      config.js
      Error loading configuration file sync-server-config.js - Invalid JSON at 283 - 
      Missing a name for object member..
    

I did try with

     certificatePath": "", 

removed, also give the same error

I am new to Objectbox and I want to try with the Sync Part,

your help would be appreciated. Thanks

Jacob Handaya
  • 189
  • 1
  • 9
  • 1
    This was actually a typo in our docs, thanks for reporting! The option to use no authentication for development is called --unsecured-no-authentication (note the d in unsecured). Note that you can use --help to show available options (https://sync.objectbox.io/objectbox-sync-server#configuration). – Uwe - ObjectBox Sep 20 '21 at 14:10
  • Thank you, Uwe - ObjectBox, it works now – Jacob Handaya Sep 21 '21 at 16:42
  • Great! Added this as the answer then. – Uwe - ObjectBox Sep 22 '21 at 08:38

1 Answers1

1

The option to use no authentication for development is called --unsecured-no-authentication (note the d in unsecured). (This was actually a typo in our docs.)

Note that you can use --help to show available options (https://sync.objectbox.io/objectbox-sync-server#configuration).

Uwe - ObjectBox
  • 1,012
  • 1
  • 7
  • 11