Skip to main content

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

util.js / config

  • #UT1

    Given name is no string or empty
    Cause:
    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 none
    Cause:
    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 storage
    Cause:
    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 storage
    Cause:
    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 used
    Cause:
    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#L24
    Cause:
    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.

plugins

pouch-db.js

  • #P2

    BulkWrite() cannot be called with an empty array
    Cause:
    bulkWrite was called with an empty array of documents.
    Fix:
    Ensure the array passed to bulkWrite is not empty.

rx-query

mquery.js

rx-database

rx-collection

plugins/webmcp

  • #WMCP1

    WebMCP Agent attempted to delete a document that does not exist
    Cause:
    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.

rx-document.js

data-migrator.js

plugins/attachments

plugins/encryption-crypto-js

plugins/json-dump

plugins/local-documents

plugins/replication

plugins/dev-mode/check-schema

plugins/dev-mode

  • #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()

plugins/validate

plugins/server

plugins/replication-graphql

plugins/crdt

plugins/storage-dexie

plugins/storage-sqlite-trial

plugins/storage-remote

plugins/replication-mongodb

plugins/react

plugins/replication-google-drive

plugins/replication-microsoft-onedrive

fetch

Other

  • #CI1

    Field not in schema
    Cause:
    The given field is not defined in the RxJsonSchema.
    Fix:
    Make sure the field name is spelled correctly and exists in the schema.
  • #CI2

    Unknown index type
    Cause:
    The schema field type is not supported for indexing.
    Fix:
    Use a supported type (string, boolean, number, integer) for the indexed field.
  • #COB1

    ChangeEventBuffer out of bounds
    Cause:
    The requested pointer is out of the change event buffer bounds.
    Fix:
    This means something in RxDB itself behaves wrong because any access to the api should not make an out of bounds request.

other