You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@firebase/firestore: Firestore (8.10.0): INTERNAL UNHANDLED EERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
#586
Open
macketplace opened this issue
Oct 2, 2021
· 2 comments
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
// The following code works and shows me the id of the document
const messageRef = await this.$fire.firestore.collection('messages').doc('message')
try {
const message = messageRef.id
console.log(message)
} catch (e) {
console.log(e)
return
}
}
// However as soon as I try to get, set, or update the document I get the error..
const messageRef = await this.$fire.firestore.collection('messages').doc('message')
try {
const message = await messageRef.get() || messageRef.set({ foo : 'bar' }) || messageRef.update({ foo : 'bar' })
console.log(message)
} catch (e) {
console.log(e)
return
}
}
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
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
}
}]
The text was updated successfully, but these errors were encountered: