Skip to content

Local database operations fail when origin is not whitelistedΒ #2236

@homostellaris

Description

@homostellaris

Problem

I am trying to use Vercel preview environments but all database operations fail because the origin is not whitelisted. I get the following error when trying to add a record.

{
    "name": "DataError",
    "message": "Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value.\n DataError: Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value.",
    "inner": {}
}

What I've tried

I'm not able to safely whitelist the origin because its dynamic and multi-tenant.

https://starfocus-git-claude-database-mar-24e642-homostellaris-projects.vercel.app

I tried using a wildcard in the value for the origin but that didn't work.

I tried disabling the cloud addon conditionally in preview environments so I could at least test without the syncing feature but that resulted in the same error.

What I'd expect

I expected the DB would work seamlessly in the browser even if the cloud addon wasn't able to establish a connection with the backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions