Open macketplace opened 2 years ago
Your await should be in your try catch statement.
Your messageRef is a reference to your actual message document. It's not an operation to be executed or to be awaited
Wherever you call .set and .get etc is where your await should be
const message = await messageRef.get()
I forgot the await on that line... but with or without it, the same error occurs. I even downgraded firebase sdk and still same issue. @simeon9696
Hello,
I am using a nuxt application to try and access my firebase firestore. I have a collection named 'messages' and a document named 'message'
In plain javascript it is very simple what I am trying to do. I just want to grab the data within the document message and be able to update or write to it if needed. But every time I try to access the data within a document or a collection.. I get the same error:
@firebase/firestore: Firestore (8.10.0): INTERNAL UNHANDLED ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
It is important to note for this project that Auth service is working just fine and I can do CRUD operations using the
this.$fire.auth
module.Any help to figure this out would be greatly appreciated.. thank you!
Here is my firebase config and nuxt modules config
const firebaseConfig = { apiKey: process.env.NUXT_FIREBASE_API_KEY, authDomain: process.env.NUXT_FIREBASE_AUTH_DOMAIN, databaseURL: process.env.NUXT_FIREBASE_DATABASE_URL, projectId: process.env.NUXT_FIREBASE_PROJECT_ID, storageBucket: process.env.NUXT_FIREBASE_STORAGE_BUCKET, messagingSenderId: process.env.NUXT_FIREBASE_MESSAGING_SENDER_ID, appId: process.env.NUXT_FIREBASE_APP_ID // measurementId: ''
}
['@nuxtjs/firebase', { config: firebaseConfig, services: { auth: true, firestore: true, storage: true } }]