Issue
I've already made a post but this one got closed. I also found this post which is pretty much the same error I got.
Now I got the same error for another reason and still can't find any answers on the net. I'm using the realtime database and I have a node in the database that looks like this:
private: {
$user_uid: {
formula: {
formula_quota:30,
quota_used:0
}
}
}
I use a button to publish some data and run a transaction to get the quota object and update it when publish is done.
I won't post the code that is not used or commented out but the quota transaction is like that:
quotaTransaction ( userUID:string, projectUID:string, state:EditorState, asObject:boolean, asProject:boolean ) {
const quotaPath = `/private/${ userUID }/formula`;
const quotaDoc = ref( this.db, quotaPath );
runTransaction( quotaDoc, quota => {
let nbPublish = 0;
if ( asObject ) nbPublish++;
if ( asProject ) nbPublish++;
let quotaUsed = quota.quota_used;
let formulaQuota = quota.formula_quota;
if ( nbPublish + quotaUsed > formulaQuota ) return ( undefined );
return ( { quota_used: quotaUsed + nbPublish, formula_quota:formulaQuota } );
} ).catch( console.log );
}
the first time I run the quotaTransaction I get this error
RangeError: Maximum call stack size exceeded at ChildrenNode.isLeafNode (vendor.js:52413:13) at ChildrenNode.equals (vendor.js:20990:22) at ChildrenNode.equals (vendor.js:20995:31) at ChildrenNode.equals (vendor.js:20995:31) at ChildrenNode.equals (vendor.js:20995:31) at ChildrenNode.equals (vendor.js:20995:31) at ChildrenNode.equals (vendor.js:20995:31) at ChildrenNode.equals (vendor.js:20995:31) at ChildrenNode.equals (vendor.js:20995:31) at ChildrenNode.equals (vendor.js:20995:31)
second time I run it I get:
TypeError: childPathObj.split is not a function at pathChild (vendor.js:17766:38) at ImmutableTree.findRootMostMatchingPathAndValue (vendor.js:23435:30) at ImmutableTree.findRootMostMatchingPathAndValue (vendor.js:23432:51) at ImmutableTree.findRootMostMatchingPathAndValue (vendor.js:23432:51) at ImmutableTree.findRootMostValueAndPath (vendor.js:23456:17) at compoundWriteGetCompleteNode (vendor.js:55532:45) at compoundWriteChildCompoundWrite (vendor.js:55574:27) at writeTreeCalcCompleteEventCache (vendor.js:55887:19) at syncTreeCalcCompleteEventCache (vendor.js:57565:10) at repoGetLatestState (vendor.js:59219:10)
Any clue, maybe the firebase team can help me?
Solution
downgrading to version 7.4.0
instead of 7.4.1
apparently solved the issue.
Answered By - JSmith
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.