Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2794

Error Realm initialization with sync enabled due to mismatch schema is not calling onError function

      How frequently does the bug occur?

      Always

      Description

      Check the following line:

      https://github.com/realm/realm-js/blob/91de9446242a3dc7aaaf640925af360b5d91a7d2/packages/realm-react/src/RealmProvider.tsx#L140

      It is calling the console.error directly. This way we cannot handle this error on user device.

      We have configured the application to only open the realm for the first time after DownloadBeforeOpen.

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      [Error: The following changes cannot be made in additive-only schema mode:
      - Property 'ObjectType.idInitialStatusIntegration' has been made required.
      - Property 'ObjectType.idInitialStatusPDA' has been made required.
      - Property 'ObjectType.idInitialStatusWeb' has been made required.
      - Property 'ObjectType.nmCdField' has been made required.
      - Property 'ObjectType.nmDisplayField' has been made required.
      - Property 'ObjectType.nmIdField' has been made required.
      - Property 'ObjectType.nmTable' has been made required.
      If your app is running in development mode, you can delete the realm and restart the app to update your schema.]
      

      Can you reproduce the bug?

      Always

      Reproduction Steps

      1. Create a sample app
      2. Set to open the realm for the first time DownloadBeforeOpen
      3. Change the schema to a breaking schema
      4. delete the local realm
      5. Open the app again and see that the error is only printed at the console

      Version

      realm@12.6.2

      What services are you using?

      Atlas Device Sync

      Are you using encryption?

      No

      Platform OS and version(s)

      Android/iOS All

      Build environment

      Which debugger for React Native: ..

      Cocoapods version

      No response

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: