RxDB Error Messages
When RxDB has an error, an RxError object is thrown instead of a normal JavaScript Error. This RxError contains additional properties such as a code field and parameters. By default the full human readable error messages are not included into the RxDB build. This is because error messages have a high entropy and cannot be compressed well. Therefore only an error message with the correct error-code and parameters is thrown but without the full text.
When you enable the DevMode Plugin the full error messages are added to the RxError. This should only be done in development, not in production builds to keep a small build size.
All RxDB error messagesโ
#UT1
Given name is no string or emptyCause:
The database name must be a non-empty string.Fix:
Check the name used when creating the database.#UT2
Collection- and database-names must match the regex to be compatible with couchdb databases. See https://neighbourhood.ie/blog/2020/10/13/everything-you-need-to-know-about-couchdb-database-names/ info: if your database-name specifies a folder, the name must contain the slash-char '/' or '\'Cause:
The database name does not match the regex required for CouchDB compatibility.Fix:
Change the database name to match the regex: ^[a-z][_$a-zA-Z0-9\-]*$#UT3
Replication-direction must either be push or pull or both. But not noneCause:
Replication must have at least one direction (push or pull) enabled.Fix:
Set push or pull to true or provide options for them.#UT4
Given leveldown is no valid adapter#UT5
KeyCompression is set to true in the schema but no key-compression handler is used in the storageCause:
Key compression is not supported by this RxStorage adapter or you forgot to add the key-compression plugin.Fix:
Disable key compression in the schema or add the proper plugin.#UT6
Schema contains encrypted fields but no encryption handler is used in the storageCause:
Encryption is not supported by this RxStorage adapter or you forgot to add the encryption plugin.Fix:
Disable encryption in the schema or add the proper plugin.#UT7
Attachments.compression is enabled but no attachment-compression plugin is usedCause:
Attachment compression is not supported by this RxStorage adapter or you forgot to add the attachment-compression plugin.Fix:
Disable attachment compression in the schema or add the proper plugin.#UT8
Crypto.subtle.digest is not available in your runtime. For expo/react-native you need to polyfill those, see https://github.com/pubkey/rxdb/blob/master/examples/react-native/initializeDb.js#L24Cause:
The Web Crypto API is not available in this environment.Fix:
Use a polyfill or an environment that supports the Web Crypto API, or provide a custom hash function.#PL1
Given plugin is not RxDB plugin.Cause:
The added plugin is not a valid RxDB plugin object.Fix:
Ensure you are adding a valid RxDB plugin object.#PL3
A plugin with the same name was already added but it was not the exact same JavaScript objectCause:
A plugin with the same name has already been added.Fix:
Check if you are adding the same plugin twice or if you have multiple versions of the same plugin.#P2
BulkWrite() cannot be called with an empty arrayCause:
bulkWrite was called with an empty array of documents.Fix:
Ensure the array passed to bulkWrite is not empty.#QU1
RxQuery._execOverDatabase(): op not knownCause:
Unknown RxQuery operation.Fix:
This is likely an internal error. Contact the maintainer.#QU4
RxQuery.regex(): You cannot use .regex() on the primary fieldCause:
This is not supported by the query engine.Fix:
Use a different field or a primary key lookup.#QU5
RxQuery.sort(): does not work because key is not defined in the schemaCause:
The field used for sorting is not defined in the schema.Fix:
Add the field to the schema or sort by a different field.#QU6
RxQuery.limit(): cannot be called on .findOne()Cause:
findOne queries cannot have a limit.Fix:
Remove the limit from the query or use find() instead.#QU9
ThrowIfMissing can only be used in findOne queriesCause:
throwIfMissing was used on a find query.Fix:
Use findOne if you want to use throwIfMissing or remove the flag.#QU10
Result empty and throwIfMissing: trueCause:
exec(true) was called but the document was not found.Fix:
Ensure the document exists or do not use the throwIfMissing flag.#QU11
RxQuery: no valid query params givenCause:
The query object is not a valid Mango query or contains invalid keys.Fix:
Ensure the query object is a valid Mango query.#QU12
Given index is not in schemaCause:
The index used in the query is not defined in the schema.Fix:
Add the index to the schema or use a different index.#QU13
A top level field of the query is not included in the schemaCause:
A field used in the query is not defined in the schema.Fix:
Ensure all fields in the query are defined in the schema.#QU14
Running a count() query in slow mode is now allowed. Either run a count() query with a selector that fully matches an index or set allowSlowCount=true when calling the createRxDatabaseCause:
A count query is running without an index, which is slow.Fix:
Add an index for the query or allow slow count queries.#QU15
For count queries it is not allowed to use skip or limitCause:
Count queries cannot have a limit or skip.Fix:
Remove limit and skip from the count query.#QU16
$regex queries must be defined by a string, not an RegExp instance. This is because RegExp objects cannot be JSON stringified and also they are mutable which would be dangerousCause:
RegExp objects are not allowed in queries.Fix:
Use string based regex operators instead.#QU17
Chained queries cannot be used on findByIds() RxQuery instancesCause:
Query builder methods cannot be used with findByIds.Fix:
Use find() if you want to use the query builder.#QU18
Malformed query result data. This likely happens because you create a OPFS-storage RxDatabase inside of a worker but did not set the usesRxDatabaseInWorker setting. https://rxdb.info/rx-storage-opfs.html?console=opfs#setting-usesrxdatabaseinworker-when-a-rxdatabase-is-also-used-inside-of-the-workerCause:
The result data for the query is undefined or malformed.Fix:
Check if you are using OPFS in a worker correctly.#QU19
Queries must not contain fields or properties with the value `undefined`: https://github.com/pubkey/rxdb/issues/6792#issuecomment-2624555824Cause:
A field in the query is undefined.Fix:
Ensure all fields in the query have valid values.#MQ1
Path must be a string or object#MQ2
Invalid argument#MQ3
Invalid sort() argument. Must be a string, object, or array#MQ4
Invalid argument. Expected instanceof mquery or plain object#MQ5
Method must be used after where() when called with these arguments#MQ6
Can't mix sort syntaxes. Use either array or object | .sort([['field', 1], ['test', -1]]) | .sort({ field: 1, test: -1 })#MQ7
Invalid sort value#MQ8
Can't mix sort syntaxes. Use either array or object#DB1
RxDocument.prepare(): another instance on this adapter has a different passwordCause:
You tried to create a secondary instance on an adapter that is already used by another instance with a different password.Fix:
Ensure that all instances use the same password.#DB2
RxDatabase.addCollections(): collection-names cannot start with underscore _Cause:
You tried to create a collection where the name starts with an underscore.Fix:
Change the collection name so it does not start with an underscore.#DB3
RxDatabase.addCollections(): collection already exists. use myDatabase[collectionName] to get itCause:
You tried to add a collection that already exists on this database instance.Fix:
Use the existing collection or use a different name.#DB4
RxDatabase.addCollections(): schema is missingCause:
You called addCollections() but did not provide a schema for the collection.Fix:
Provide a valid schema for the collection.#DB5
RxDatabase.addCollections(): collection-name not allowedCause:
You used a collection name that contains invalid characters.Fix:
Use only allowed characters (a-z, A-Z, 0-9, -, _).#DB6
RxDatabase.addCollections(): another instance created this collection with a different schema. Read thishttps://rxdb.info/rx-schema.html?console=qa#faqCause:
The schema hash does not match the schema stored in the internal database.Fix:
If you changed the schema, you must increment the version number. If not, check why the hash is different.#DB8
CreateRxDatabase(): A RxDatabase with the same name and adapter already exists. Make sure to use this combination of storage+databaseName only once If you have the duplicate database on purpose to simulate multi-tab behavior in unit tests, set "ignoreDuplicate: true". As alternative you can set "closeDuplicates: true" like if this happens in your react projects with hot reload that reloads the code without reloading the process.Cause:
You created multiple RxDatabase instances with the same name and adapter.Fix:
Ensure that you only create one instance of the database.#DB9
IgnoreDuplicate is only allowed in dev-mode and must never be used in productionCause:
You used the ignoreDuplicate option in a production environment.Fix:
Remove ignoreDuplicate: true or switch to dev-mode.#DB11
CreateRxDatabase(): Invalid db-name, folder-paths must not have an ending slashCause:
The database name or path has a trailing slash.Fix:
Remove the trailing slash from the name/path.#DB12
RxDatabase.addCollections(): could not write to internal storeCause:
Writing to the internal storage failed.Fix:
Check your storage configuration and permissions.#DB13
CreateRxDatabase(): Invalid db-name or collection name, name contains the dollar signCause:
The name contains a dollar sign which is not allowed.Fix:
Remove the dollar sign from the name.#DB14
No custom reactivity factory added on database creationCause:
You tried to use reactivity but no factory was provided.Fix:
Add a reactivity factory (e.g. for React, Vue, Angular) or use a plugin that adds one.#COL1
RxDocument.insert() You cannot insert an existing documentCause:
You tried to insert a document with a primary key that already exists.Fix:
Use upsert() if you want to overwrite.#COL2
RxCollection.insert() fieldName ._id can only be used as primaryKeyCause:
You have a field named "_id" but it is not defined as the primary key.Fix:
Rename the field or use it as the primary key.#COL3
RxCollection.upsert() does not work without primaryCause:
You called upsert() but the document data does not contain the primary key.Fix:
Ensure the primary key is present in the document data.#COL4
RxCollection.incrementalUpsert() does not work without primaryCause:
You called incrementalUpsert() but the document data does not contain the primary key.Fix:
Ensure the primary key is present in the document data.#COL5
RxCollection.find() if you want to search by _id, use .findOne(_id)Cause:
You called find() with a string argument, which was supported in older versions.Fix:
Use findOne(id) to find a single document by ID.#COL6
RxCollection.findOne() needs a queryObject or string. Notice that in RxDB, primary keys must be strings and cannot be numbers.Cause:
You called findOne() with an invalid argument (likely a number or array).Fix:
Use a string ID or a mongo-style query object.#COL7
Hook must be a functionCause:
You provided a hook that is not a function.Fix:
Ensure the hook is a function.#COL8
Hooks-when not knownCause:
You provided a hook with an invalid "when" parameter (must be "pre" or "post").Fix:
Use "pre" or "post" as the "when" parameter.#COL9
RxCollection.addHook() hook-name not knownCause:
You provided a hook name that is not known (e.g. insert, save, remove).Fix:
Use a valid hook name.#COL10
RxCollection .postCreate-hooks cannot be asyncCause:
You defined a postCreate hook as async, which is not allowed.Fix:
Make the postCreate hook synchronous.#COL11
MigrationStrategies must be an objectCause:
You provided migration strategies that are not an object.Fix:
Provide an object mapping versions to migration functions.#COL12
A migrationStrategy is missing or too muchCause:
The number of migration strategies does not match the schema version difference.Fix:
Ensure you have a migration strategy for every version step.#COL13
MigrationStrategy must be a functionCause:
One of your migration strategies is not a function.Fix:
Ensure all migration strategies are functions.#COL14
Given static method-name is not a stringCause:
The name of a static method is not a string.Fix:
Provide a string as the method name.#COL15
Static method-names cannot start with underscore _Cause:
You tried to define a static method starting with an underscore.Fix:
Rename the method.#COL16
Given static method is not a functionCause:
You provided a static method that is not a function.Fix:
Ensure the static method is a function.#COL17
RxCollection.ORM: statics-name not allowedCause:
You used a reserved name for a static method.Fix:
Choose a different name for the static method.#COL18
Collection-method not allowed because fieldname is in the schemaCause:
You tried to define a collection method that conflicts with a schema field.Fix:
Rename the collection method or the schema field.#COL20
Storage write errorCause:
The storage engine returned an error when writing data.Fix:
Check the error details.#COL21
The RxCollection is closed or removed already, either from this JavaScript realm or from another, like a browser tabCause:
You tried to access a collection that has been closed or removed.Fix:
Ensure the collection is open before accessing it.#WMCP1
WebMCP Agent attempted to delete a document that does not existCause:
The explicitly requested ID for deletion could not be found in the database.Fix:
Ensure the agent queries for the document correctly before trying to delete it.#CONFLICT
Document update conflict. When changing a document you must work on the previous revisionCause:
You tried to update a document but the revision you provided is not the latest one.Fix:
Fetch the latest document revision and apply your changes again.#COL22
.bulkInsert() and .bulkUpsert() cannot be run with multiple documents that have the same primary keyCause:
You provided multiple documents with the same primary key in a bulk write.Fix:
Ensure all documents in a bulk write have unique primary keys.#COL23
In the open-source version of RxDB, the amount of collections that can exist in parallel is limited to 13. If you already purchased the premium access, you can remove this limit: https://rxdb.info/rx-collection.html?console=limit#faqCause:
You have reached the limit of open collections for the free version.Fix:
Reduce the number of open collections or upgrade to premium.#COL24
Inline _attachments must be an array of { id, type, data } objects; the map format is reserved for internal use onlyCause:
An object was passed as _attachments that is neither an array of attachment creators nor a fully-normalized internal map.Fix:
Pass attachments as an array: [{ id, type, data }]. This is the same format used by putAttachment().#DOC1
RxDocument.get$ cannot get observable of in-array fields because order cannot be guessedCause:
You tried to observe an array item, which is not supported.Fix:
Observe the array field itself.#DOC2
Cannot observe primary pathCause:
You tried to observe the primary key, which is immutable.Fix:
Observe the document itself or use findOne().#DOC3
Final fields cannot be observedCause:
You tried to observe a final field, which is immutable.Fix:
Observe the document itself.#DOC4
RxDocument.get$ cannot observe a non-existed fieldCause:
The field you tried to observe is not defined in the schema.Fix:
Check the field name and schema definition.#DOC5
RxDocument.populate() cannot populate a non-existed fieldCause:
The field you tried to populate is not defined in the schema.Fix:
Check the field name and schema definition.#DOC6
RxDocument.populate() cannot populate because path has no refCause:
The field you tried to populate does not have a "ref" property in the schema.Fix:
Add the "ref" property to the field schema.#DOC7
RxDocument.populate() ref-collection not in databaseCause:
The collection referenced in the schema does not exist.Fix:
Create the referenced collection.#DOC8
RxDocument.set(): primary-key cannot be modifiedCause:
You tried to modify the primary key of a document.Fix:
Primary keys are immutable. Create a new document with the new ID instead.#DOC9
Final fields cannot be modifiedCause:
You tried to modify a field marked as final in the schema.Fix:
Final fields are immutable.#DOC10
RxDocument.set(): cannot set childpath when rootPath not selectedCause:
You tried to set a nested field without having the root path in the document data.Fix:
Ensure the root path exists before setting nested fields.#DOC11
RxDocument.save(): can't save deleted documentCause:
You tried to save a document that has already been deleted.Fix:
Do not save deleted documents. Insert them again if you want to recreate them.#DOC13
RxDocument.remove(): Document is already deletedCause:
You tried to remove a document that is already deleted.Fix:
Check if the document is deleted before removing it.#DOC14
RxDocument.close() does not existCause:
You called close() on a RxDocument, which is not supported.Fix:
Documents do not need to be closed.#DOC15
Query cannot be an arrayCause:
You provided an array as a query, which is not valid.Fix:
Provide a valid query object.#DOC16
Since version 8.0.0 RxDocument.set() can only be called on temporary RxDocumentsCause:
You called set() on a non-temporary document.Fix:
Use update(), patch() or modify() to change document data.#DOC17
Since version 8.0.0 RxDocument.save() can only be called on non-temporary documentsCause:
You called save() on a temporary document.Fix:
Use another method to save the document or ensure it is not temporary.#DOC18
Document property for composed primary key is missingCause:
A field required for the composite primary key is missing in the document data.Fix:
Ensure all fields of the composite primary key are set.#DOC19
Value of primary key(s) cannot be changedCause:
You tried to modify the primary key of a document.Fix:
Primary keys are immutable. Create a new document with the new ID instead.#DOC20
PrimaryKey missingCause:
The document data is missing a primary key.Fix:
Ensure the document has a primary key.#DOC21
PrimaryKey must be equal to PrimaryKey.trim(). It cannot start or end with a whitespaceCause:
The primary key contains leading or trailing whitespace.Fix:
Trim the primary key.#DOC22
PrimaryKey must not contain a linebreakCause:
The primary key contains newline characters.Fix:
Remove newline characters from the primary key.#DOC23
PrimaryKey must not contain a double-quote ["]Cause:
The primary key contains double quotes.Fix:
Remove double quotes from the primary key.#DOC24
Given document data could not be structured cloned. This happens if you pass non-plain-json data into it, like a Date() object or a Function. In vue.js this happens if you use ref() on the document data which transforms it into a Proxy object.Cause:
The document data contains objects that cannot be structured-cloned (e.g. Date, RegExp).Fix:
Use only JSON-serializable data. Store dates as strings.#DM1
Migrate() Migration has already runCause:
You tried to run the migration manually but it has already been finished.Fix:
Check if the migration is already done.#DM2
Migration of document failed final document does not match final schemaCause:
The migration strategy produced a document that does not match the new schema.Fix:
Check your migration strategy and the new schema.#DM3
Migration already runningCause:
You started the migration while another migration is already running.Fix:
Await the running migration.#DM4
Migration erroredCause:
An error occurred during migration.Fix:
Check the error details.#DM5
Cannot open database state with newer RxDB version. You have to migrate your database state first. See https://rxdb.info/migration-storage.html?console=storageCause:
The database was created with an older RxDB version and needs migration.Fix:
Run the storage migration.#AT1
To use attachments, please define this in your schemaCause:
You tried to use attachments but they are not enabled in the schema.Fix:
Enable attachments in the schema.#AT2
Inline attachment must have id and type (strings) and data (Blob)Cause:
An inline attachment object is missing a required field or data is not a Blob instance.Fix:
Ensure each inline attachment has { id: string, type: string, data: Blob }.#AT3
Duplicate attachment idCause:
The same attachment id appears multiple times in the inline attachments array.Fix:
Ensure each attachment id is unique in the array.#AT4
_attachments missing on documentCause:
A document is missing the _attachments property during an attachments write operation.Fix:
Ensure documents have the _attachments property set.#EN1
Password is not validCause:
The password provided is invalid (must be a string).Fix:
Provide a valid string password.#EN2
ValidatePassword: min-length of password not compliedCause:
The password is too short.Fix:
Use a longer password (min 12 chars).#EN3
Schema contains encrypted properties but no password is givenCause:
Encryption enabled in schema but no password provided.Fix:
Provide a password.#EN4
Password not validCause:
The password provided is invalid.Fix:
Check the password.#JD1
You must create the collections before you can import their dataCause:
Importing data into a non-existent collection.Fix:
Create the collection before importing.#JD2
RxCollection.importJSON(): the imported json relies on a different schemaCause:
The imported data schema does not match the collection schema.Fix:
Ensure schemas match.#JD3
RxCollection.importJSON(): json.passwordHash does not match the ownCause:
Password mismatch in import.Fix:
Use the same password.#LD1
RxDocument.allAttachments$ can't use attachments on local documentsCause:
You tried to use attachments on a local document, which is not supported.Fix:
Do not use attachments with local documents.#LD2
RxDocument.get(): objPath must be a stringCause:
The object path provided to get() is not a string.Fix:
Provide a valid string path.#LD3
RxDocument.get$ cannot get observable of in-array fields because order cannot be guessedCause:
You tried to observe an array item in a local document.Fix:
Observe the whole array instead.#LD4
Cannot observe primary pathCause:
You tried to observe the primary path of a local document.Fix:
Observe the document data instead.#LD5
RxDocument.set() id cannot be modifiedCause:
You tried to modify the ID of a local document.Fix:
IDs are immutable. Create a new document if needed.#LD6
LocalDocument: Function is not usable on local documentsCause:
You called a function that is not supported on local documents.Fix:
Check the documentation for supported methods.#LD7
Local document already existsCause:
You tried to create a local document that already exists.Fix:
Use upsert() or update the existing document.#LD8
LocalDocuments not activated. Set localDocuments=true on creation, when you want to store local documents on the RxDatabase or RxCollection.Cause:
You tried to use local documents but they are not enabled.Fix:
Enable local documents when creating the database or collection.#RC1
Replication: already addedCause:
You started a replication that is already running.Fix:
Check if the replication is already running before starting it.#RC2
ReplicateCouchDB() query must be from the same RxCollectionCause:
You used a query from a different collection for replication.Fix:
Use a query from the same collection.#RC4
RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication when live: trueCause:
You tried to await initial replication on a live replication.Fix:
Set live: false if you want to await initial replication.#RC5
RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication if multiInstance because the replication might run on another instanceCause:
You tried to await initial replication in a multi-instance environment.Fix:
Await initial replication only in single-instance mode.#RC6
SyncFirestore() serverTimestampField MUST NOT be part of the collections schema and MUST NOT be nested.Cause:
The serverTimestampField is defined in the schema or is nested.Fix:
Remove the serverTimestampField from the schema and ensure it is at the top level.#RC7
SimplePeer requires to have process.nextTick() polyfilled, see https://rxdb.info/replication-webrtc.html?console=webrtcCause:
process.nextTick is missing in the runtime environment.Fix:
Polyfill process.nextTick.#RC_PULL
RxReplication pull handler threw an error - see .errors for more detailsCause:
The pull handler of the replication threw an error.Fix:
Check the error details in the .errors observable.#RC_STREAM
RxReplication pull stream$ threw an error - see .errors for more detailsCause:
The pull stream of the replication threw an error.Fix:
Check the error details in the .errors observable.#RC_PUSH
RxReplication push handler threw an error - see .errors for more detailsCause:
The push handler of the replication threw an error.Fix:
Check the error details in the .errors observable.#RC_PUSH_NO_AR
RxReplication push handler did not return an array with the conflictsCause:
The push handler returned a non-array value.Fix:
Ensure the push handler returns an array of conflicting documents.#RC_WEBRTC_PEER
RxReplication WebRTC Peer has errorCause:
A WebRTC peer connection error occurred.Fix:
Check the network connection and WebRTC configuration.#RC_COUCHDB_1
ReplicateCouchDB() url must end with a slash like 'https://example.com/mydatabase/'Cause:
The CouchDB URL is missing a trailing slash.Fix:
Add a trailing slash to the URL.#RC_COUCHDB_2
ReplicateCouchDB() did not get valid result with rows.Cause:
The CouchDB endpoint returned an invalid response.Fix:
Check the CouchDB server and the URL.#RC_OUTDATED
Outdated client, update required. Replication was canceledCause:
The client version is too old for the server.Fix:
Update the client application.#RC_UNAUTHORIZED
Unauthorized client, update the replicationState.headers to set correct auth dataCause:
The client is not authorized to replicate.Fix:
Update authentication headers.#RC_FORBIDDEN
Client behaves wrong so the replication was canceled. Mostly happens if the client tries to write data that it is not allowed toCause:
The server rejected the replication request.Fix:
Check server permissions and logs.#SC1
Fieldnames do not match the regexCause:
A field name in the schema contains invalid characters.Fix:
Use only allowed characters (a-z, A-Z, 0-9, _, -).#SC2
SchemaCheck: name 'item' reserved for array-fieldsCause:
You used "item" as a field name, but it is reserved.Fix:
Rename the field.#SC3
SchemaCheck: fieldname has a ref-array but items-type is not stringCause:
You defined a reference array but the items are not of type string.Fix:
Set the items type to string.#SC4
SchemaCheck: fieldname has a ref but is not type string, [string,null] or array<string>Cause:
You defined a reference field but the type is not string or array of strings.Fix:
Set the type to string or array of strings.#SC6
SchemaCheck: primary can only be defined at top-levelCause:
You defined the primary key in a nested object.Fix:
Move the primary key definition to the top level.#SC7
SchemaCheck: default-values can only be defined at top-levelCause:
You defined a default value in a nested object.Fix:
Move default values to the top level.#SC8
SchemaCheck: first level-fields cannot start with underscore _Cause:
A top-level field name starts with an underscore.Fix:
Rename the field.#SC10
SchemaCheck: schema defines ._rev, this will be done automaticallyCause:
You defined _rev in your schema.Fix:
Remove _rev from the schema.#SC11
SchemaCheck: schema needs a number >=0 as versionCause:
The version field is missing or invalid.Fix:
Set a valid version number (>=0).#SC13
SchemaCheck: primary is always index, do not declare it as indexCause:
You declared the primary key as an index, which is redundant.Fix:
Remove index: true from the primary key field.#SC14
SchemaCheck: primary is always unique, do not declare it as indexCause:
You declared the primary key as unique, which is redundant.Fix:
Remove unique: true from the primary key field.#SC15
SchemaCheck: primary cannot be encryptedCause:
You tried to encrypt the primary key.Fix:
Primary keys cannot be encrypted.#SC16
SchemaCheck: primary must have type: stringCause:
The primary key field has a type other than string.Fix:
Set the primary key type to string.#SC17
SchemaCheck: top-level fieldname is not allowed. See https://rxdb.info/rx-schema.html?console=toplevel#non-allowed-propertiesCause:
You used a reserved name for a top-level field.Fix:
Rename the field.#SC18
SchemaCheck: indexes must be an arrayCause:
The indexes property is not an array.Fix:
Set indexes to an array of strings or arrays.#SC19
SchemaCheck: indexes must contain strings or arrays of stringsCause:
An index definition is invalid.Fix:
Ensure indexes are strings or arrays of strings.#SC20
SchemaCheck: indexes.array must contain stringsCause:
A compound index contains non-string values.Fix:
Ensure compound indexes contain only strings.#SC21
SchemaCheck: given index is not defined in schemaCause:
You defined an index for a field that does not exist.Fix:
Check the field name in the index.#SC22
SchemaCheck: given indexKey is not type:stringCause:
You defined an index on a non-string field.Fix:
Indexes are only supported on string fields (mostly).#SC23
SchemaCheck: fieldname is not allowedCause:
You used a field name that is not allowed (e.g. starts with $ or _).Fix:
Rename the field.#SC24
SchemaCheck: required fields must be set via array. See https://spacetelescope.github.io/understanding-json-schema/reference/object.html#requiredCause:
The required fields are not defined as an array of strings.Fix:
Set required to an array of strings.#SC25
SchemaCheck: compoundIndexes needs to be specified in the indexes fieldCause:
Compound indexes are not defined correctly.Fix:
Define compound indexes in the indexes array.#SC26
SchemaCheck: indexes needs to be specified at collection schema levelCause:
Indexes are defined at the wrong level (e.g. inside properties).Fix:
Move indexes to the top level of the schema.#SC28
SchemaCheck: encrypted fields is not defined in the schemaCause:
You tried to use encryption but encrypted fields are not defined.Fix:
Define encrypted fields in the schema.#SC29
SchemaCheck: missing object key 'properties'Cause:
The schema is missing the "properties" field.Fix:
Add the "properties" field to the schema.#SC30
SchemaCheck: primaryKey is requiredCause:
The schema is missing a primary key.Fix:
Define a primary key in the schema.#SC32
SchemaCheck: primary field must have the type string/number/integerCause:
The primary key field has an invalid type.Fix:
Set the primary key type to string, number, or integer.#SC33
SchemaCheck: used primary key is not a property in the schemaCause:
The primary key field is not defined in the properties.Fix:
Add the primary key field to the properties.#SC34
Fields of type string that are used in an index, must have set the maxLength attribute in the schemaCause:
A string field used in an index is missing the maxLength attribute.Fix:
Set maxLength for the field.#SC35
Fields of type number/integer that are used in an index, must have set the multipleOf attribute in the schemaCause:
A number field used in an index is missing the multipleOf attribute.Fix:
Set multipleOf for the field.#SC36
A field of this type cannot be used as indexCause:
You tried to index a field type that cannot be indexed (e.g. object, array).Fix:
Remove the index or change the field type.#SC37
Fields of type number that are used in an index, must have set the minimum and maximum attribute in the schemaCause:
A number field used in an index is missing minimum/maximum attributes.Fix:
Set minimum and maximum for the field.#SC38
Fields of type boolean that are used in an index, must be required in the schemaCause:
A boolean field used in an index is not marked as required.Fix:
Mark the field as required.#SC39
The primary key must have the maxLength attribute set. Ensure you use the dev-mode plugin when developing with RxDB.Cause:
The primary key field is missing the maxLength attribute.Fix:
Set maxLength for the primary key.#SC40
$ref fields in the schema are not allowed. RxDB cannot resolve related schemas because it would have a negative performance impact.It would have to run http requests on runtime. $ref fields should be resolved during build time.Cause:
You used $ref in the schema, which is not supported at runtime.Fix:
Resolve $ref fields during build time.#SC41
Minimum, maximum and maxLength values for indexes must be real numbers, not Infinity or -InfinityCause:
You used Infinity for min/max/maxLength.Fix:
Use real numbers.#SC42
Primary key and also indexed fields which are strings, must have a maxLength that is <= 2048. Notice that having a big maxLength can negatively affect the performance. Only set it as big as it has to be.Cause:
The maxLength is too large (> 2048).Fix:
Reduce the maxLength.#DVM1
When dev-mode is enabled, your storage must use one of the schema validators at the top level. This is because most problems people have with RxDB is because they store data that is not valid to the schema which causes strange bugs and problems.Cause:
The storage Adapter you use does not support schema validation.Fix:
Wrap your storage with a validator like wrappedValidateAjvStorage()#VD1
Sub-schema not found, does the schemaPath exists in your schema?Cause:
You tried to validate a sub-path that does not exist in the schema.Fix:
Check the schema path.#VD2
Object does not match schemaCause:
RxCollection.insert()Fix:
Do not store data that does not match the collections schema#S1
You cannot create collections after calling RxDatabase.server()Cause:
You tried to add a collection after starting the server.Fix:
Add all collections before starting the server.#GQL1
GraphQL replication: cannot find sub schema by keyCause:
The GraphQL schema is missing a definition for a key.Fix:
Check the GraphQL schema.#GQL3
GraphQL replication: pull returns more documents then batchSizeCause:
The GraphQL endpoint returned more documents than requested.Fix:
Check the GraphQL resolver.#CRDT1
CRDT operations cannot be used because the crdt options are not set in the schema.Cause:
You tried to use CRDT features without enabling them in the schema.Fix:
Add crdt: { field: ... } to the schema.#CRDT2
RxDocument.incrementalModify() cannot be used when CRDTs are activated.Cause:
CRDTs replace the need for incrementalModify.Fix:
Use CRDT operations instead.#CRDT3
To use CRDTs you MUST NOT set a conflictHandler because the default CRDT conflict handler must be usedCause:
You defined a custom conflict handler with CRDTs.Fix:
Remove the custom conflict handler.#DXE1
Non-required index fields are not possible with the dexie.js RxStorage: https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082Cause:
Dexie only supports indexes on required fields.Fix:
Make the indexed field required.#SQL1
The trial version of the SQLite storage does not support attachments.Cause:
You tried to use attachments with the trial SQLite storage.Fix:
Upgrade to the full version.#SQL2
The trial version of the SQLite storage is limited to contain 300 documentsCause:
You reached the document limit of the trial version.Fix:
Upgrade to the full version.#SQL3
The trial version of the SQLite storage is limited to running 500 operationsCause:
You reached the operation limit of the trial version.Fix:
Upgrade to the full version.#RM1
Cannot communicate with a remote that was build on a different RxDB version. Did you forget to rebuild your workers when updating RxDB?Cause:
The RxDB version of the remote does not match the local version.Fix:
Ensure both sides use the same RxDB version.#MG1
If _id is used as primaryKey, all documents in the MongoDB instance must have a string-value as _id, not an ObjectId or numberCause:
Found a document in MongoDB where _id is not a string.Fix:
Ensure all documents in MongoDB have string IDs.#R1
You must provide a valid RxDatabase to the the RxDatabaseProviderCause:
The database provided to the provider is invalid.Fix:
Ensure you pass a valid RxDatabase instance.#R2
Could not find database in context, please ensure the component is wrapped in a <RxDatabaseProvider>Cause:
You tried to use the database hook outside of a provider.Fix:
Wrap your component in <RxDatabaseProvider>.#R3
The provided value for the collection parameter is not a valid RxCollectionCause:
The collection passed to the hook is invalid.Fix:
Ensure you pass a valid RxCollection instance.#GDR1
Google Drive: folderPath must not be the root folder or undefinedCause:
You provided "/" or "root" or "" as folderPath.Fix:
Use a specific subfolder to ensure RxDB data does not mess up the users drive files.#GDR3
Google Drive: Folder already exists but is not a folderCause:
A file with the same name already exists, but is not a folderFix:
Rename the file or the folder you are trying to create.#GDR9
Google Drive: folder has content but is not a rxdb sync targetCause:
You selected a folder that is not empty but is not a rxdb sync target.Fix:
Provide empty folder or use a different folder that is not used for anything else.#GDR11
Google Drive: could not close transaction#GDR18
Max batch size exxeeded for google drive syncFix:
Reduce the batchSize to be lower#GDR19
WAL file write conflictCause:
Someone else has written to the wal file in between our transaction. This should not happen.Fix:
Try to reproduce the error in a unit test and make a PR with a test case.#ODR1
Microsoft OneDrive: folderPath must not be the root folder or undefinedCause:
You provided "/" or "root" or "" as folderPath.Fix:
Use a specific subfolder to ensure RxDB data does not mess up the users drive files.#ODR3
Microsoft OneDrive: Folder already exists but is not a folderCause:
A file with the same name already exists, but is not a folderFix:
Rename the file or the folder you are trying to create.#ODR9
Microsoft OneDrive: folder has content but is not a rxdb sync targetCause:
You selected a folder that is not empty but is not a rxdb sync target.Fix:
Provide empty folder or use a different folder that is not used for anything else.#ODR11
Microsoft OneDrive: could not close transaction#ODR18
Max batch size exceeded for Microsoft OneDrive syncFix:
Reduce the batchSize to be lower#ODR19
WAL file write conflictCause:
Someone else has written to the wal file in between our transaction. This should not happen.Fix:
Try to reproduce the error in a unit test and make a PR with a test case.#FETCH
A fetch-request failedCause:
A call with the javascript fetch() function failedFix:
Check the network connection and the server logs.#SNH
This should never happen