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

RangeError: Maximum call stack size exceeded #366

Open
richard-mckenna opened this issue Jan 13, 2021 · 6 comments
Open

RangeError: Maximum call stack size exceeded #366

richard-mckenna opened this issue Jan 13, 2021 · 6 comments

Comments

@richard-mckenna
Copy link

I'm having an issue getting vuex-easy-firestore (1.36.0) working with Vue (2.6.12) and Vuex (3.6.0). I have a simple module

const usersModule = {
  firestorePath: 'users',
  firestoreRefType: 'collection',
  moduleName: 'userData',
  statePropName: 'data',
  namespaced: true,

  state: {},
  getters: {},
  mutations: {},
  actions: {},
}

export default usersModule

If I call dispatch('userData/fetchById', user.uid, { root: true }) in a vuex action it works fine and adds the user data to the store.

If I call dispatch('userData/fetchAndAdd', null, { root: true }) in a vuex action or in mounted() on a component, I get the following error:

fetch for Firestore PATH: users [users]
Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at Function.keys (<anonymous>)
    at _traverse (vue.runtime.esm.js?5593:2121)
    at _traverse (vue.runtime.esm.js?5593:2123)
    at _traverse (vue.runtime.esm.js?5593:2123)
    at _traverse (vue.runtime.esm.js?5593:2123)
    at _traverse (vue.runtime.esm.js?5593:2123)
    at _traverse (vue.runtime.esm.js?5593:2123)
    at _traverse (vue.runtime.esm.js?5593:2123)
    at _traverse (vue.runtime.esm.js?5593:2123)
    at _traverse (vue.runtime.esm.js?5593:2123)
   ...

Any thoughts on what could be causing it. It's driving me crazy!

@mesqueeb
Copy link
Owner

Not sure. Try undefined instead of null.

@richard-mckenna
Copy link
Author

Same error unfortunately.

@richard-mckenna
Copy link
Author

It only seems to be an issue with fetchAndAdd.

fetch, fetchById and openDBChannel work everywhere. fetchAndAdd throws that error everywhere.

@mesqueeb
Copy link
Owner

can you add a debugger breakpoint and find where the error is ?

@richard-mckenna
Copy link
Author

It seems it may be due to this Vue bug vuejs/vue#9081

@mesqueeb
Copy link
Owner

@richard-mckenna so your issue was unrelated to my library?

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

No branches or pull requests

2 participants