posva / vuexfire

Check
https://github.com/vuejs/vuefire
MIT License
558 stars 49 forks source link

Uncaught (in promise) TypeError: collection.on is not a function (happen in alpha 15 but not in alpha14 #210

Closed aspben closed 5 years ago

aspben commented 5 years ago

Hi, i get this error when running my app after upgrading to vuexfire 3.0.0-alpha.15 :

Uncaught (in promise) TypeError: collection.on is not a function
    at rtdbBindAsArray (vuexfire.esm.js?3317:217)
    at eval (vuexfire.esm.js?3317:654)
    at new Promise (<anonymous>)
    at bind (vuexfire.esm.js?3317:652)
    at context.bindFirebaseRef (vuexfire.esm.js?3317:710)
    at eval (eventsList.js?f055:49)
    at Store.firebaseEnhancedActionFn (vuexfire.esm.js?3317:712)
    at Array.wrappedActionHandler (vuex.esm.js?2f62:721)
    at Store.dispatch (vuex.esm.js?2f62:428)
    at Store.boundDispatch [as dispatch] (vuex.esm.js?2f62:322)

Everything work again when i revert to alpha14. what can cause this? probably a missconfiguration on my side but what ?

Just let me know if you need more information to troubleshoot.

posva commented 5 years ago

you are probably passing down something that isn't a collection. Make sure you are using the right function too rtdbBind is for firebase RTDB, bind is for firestore. rtdbBind didn't exist in alpha 14... Also make sure you are using the right option firebase/firestore

I could give more info if you provide what you did to install the plugin and to bind. You can also check https://vuefire.netlify.com/

aspben commented 5 years ago

thank, my code was still using firebaseAction, So i have some refactoring to do. I wasn't aware of https://vuefire.netlify.com/ thank

posva commented 5 years ago

Make sure to check the changeling too.

Sent from my iPhone

On 4 Apr 2019, at 22:41, aspben notifications@github.com wrote:

thank, my code was still using firebaseAction, So i have some refactoring to do. I wasn't aware of https://vuefire.netlify.com/ thank

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.