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

Property '***' of type 'array' cannot be nullable.

      How frequently does the bug occur?

      Always

      Description

      Hello, I'm not sure if this is a bug or not, but I just followed the Realm guide and it crashes the app.

      In the React Native Realm guide, I followed the code in the section Declare an Optional Property

      But an error appears and crashes the app:

      Error: Exception in HostFunction: Schema validation failed due to the following errors:
      - Property 'Dog.owners' of type 'array' cannot be nullable.
      

      If a list cannot be nullable, then why does the example in the React Native Realm guide do so?

      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: Exception in HostFunction: Schema validation failed due to the following errors:
      - Property 'Dog.owners' of type 'array' cannot be nullable.
      

      Can you reproduce the bug?

      Always

      Reproduction Steps

      Make any 'list' property have optional: true in your schema and the error will appear

      Version

      11.10.2

      What services are you using?

      Local Database only

      Are you using encryption?

      No

      Platform OS and version(s)

      Android 12

      Build environment

      Built on Windows 10, React Native 0.72.4

      Cocoapods version

      No response

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

              Created:
              Updated:
              Resolved: