Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastBoot error when passing an object property to Firestore API #182

Open
mikkopaderes opened this issue Sep 23, 2021 · 0 comments
Open
Labels

Comments

@mikkopaderes
Copy link
Owner

mikkopaderes commented Sep 23, 2021

This is an error that predates Firebase v9. Here's the sample error message.

FirebaseError: Function WriteBatch.set() called with invalid data. Data must be an object, but it was: a custom Object object (found in document posts/6JVE00WfDexhSPfXQGvu)

This happens whenever we pass in an object or array to any Firestore API. Like this:

this.store.createRecord('post', { title: 'Test title' }).save();

// Equivalent Firestore API
firestore.collection('posts').add({ title: 'Test title' });

Nuxt Firebase seems to have the same issue but they have a workaround for it. I'm not sure if there's an equivalent setting of the Nuxt.js workaround in FastBoot—I haven't found one right now.

Things I've tried so far was to disable the object and array prototype extensions but those didn't fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant