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

TypeError: Reflect.construct requires the first argument to be a constructor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      I am getin this error when i run : react-native run-android
      First the app opens correctly and after 3 sec it shows me this error.

      I have never had this before. I am using last realm version 6.0.4
      Even with older versions is the same issue.

      I have lot of schemas that i import in an index file :

      const Realm = require('realm');
      
      class CountriesSchema extends Realm.Object {}
      
      CountriesSchema.schema = {
          name: 'Countries',
          primaryKey: 'passportId',
          properties: {
              passportId: {type: 'string'},
              nationName: {type:'string', optional: true, default:''},
              code: {type:'string', optional: true, default:''},
      
          }
      };
      
      export default CountriesSchema;
      
      import Countries from './CountriesDataBase/CountriesSchema';
      
      realmInstance = new Realm({
                  encryptionKey: getKey(),
                  schema: [User]
      })
      

      As i said there are lot of schemas but i follow the same rule

            Assignee:
            lubo.blagoev@mongodb.com Lubo Blagoev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: