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

't.split' error and 'Unknown node type' at firebase #260

Open
pzoli opened this issue Feb 27, 2023 · 3 comments
Open

't.split' error and 'Unknown node type' at firebase #260

pzoli opened this issue Feb 27, 2023 · 3 comments

Comments

@pzoli
Copy link

pzoli commented Feb 27, 2023

Version info

Firebase:
9.17.1
GeoFire:
6.0.0

Other (e.g. Node, browser, operating system) (if applicable):
typescript: 4.8.3
react-native: 0.70.6
node: 18.14.0

Test case

public geoQuerty(geoQueryCallback: (key: string, location: any, distance: number) => void) {
    let geofire: GeoFire = new GeoFire(this.firebaseRef);
    let geoQuery: GeoQuery = geofire.query({
        center: [19.1483513, 47.4528837],
        radius: 1.5
    });

    geoQuery.on('key_entered', geoQueryCallback);
    geoQuery.on('key_exited', geoQueryCallback);
    geoQuery.on('key_moved', geoQueryCallback);

    geofire.set('key1', [19.1583513, 47.4528837]).then(function () {
        console.log("Provided key has been added to GeoFire");
    }, function (error) {
        console.log("Error: " + error);
    });;
}

}

Steps to reproduce

VSCode launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Android",
"request": "launch",
"type": "reactnative",
"cwd": "${workspaceFolder}",
"platform": "android"
},
]
}

  1. Run application in debug mode
  2. call geofire.set and geoQuery.on methods

Expected behavior

no Exception when I get event

Actual behavior

In debug console logged errors:

TypeError: childPathObj.split is not a function
at pathChild (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:2961:42)
at ImmutableTree.findRootMostMatchingPathAndValue (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:7628:42)
at ImmutableTree.findRootMostValueAndPath (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:7646:21)
at compoundWriteGetCompleteNode (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:7956:47)
at compoundWriteChildCompoundWrite (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:7997:31)
at c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:8336:45
at c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:5596:24
at LLRBNode.inorderTraversal (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:4285:15)
at SortedMap.inorderTraversal (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:4703:27)
at ChildrenNode.forEachChild (c:\work\integrity\projects-node\GeoMonitoringApp.vscode.react\index.bundle:104934:22) {stack: 'TypeError: childPathObj.split is not a functi…ingApp.vscode.react\index.bundle:104934:22)', message: 'childPathObj.split is not a function'}

TypeError: t.split is not a function
at qt (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:590:1134)
at Ei (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1155:2690)
at Di (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1219:1175)
at c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1219:748
at Ri (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1219:765)
at Bi (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1219:5575)
at zi (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1235:206)
at wr (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1267:2429)
at c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:1267:1449
at onComplete (c:\work\integrity\projects-node\GeoMonitoringApp.vscode.react\index.bundle:118488:12) {stack: 'TypeError: t.split is not a function
at q…ingApp.vscode.react\index.bundle:118488:12)', message: 't.split is not a function'}

@pzoli
Copy link
Author

pzoli commented Feb 27, 2023

When I add path to ref like this: this.firebaseRef = ref(getDatabase(app), '/geolocations');
I got another error:

Error: Firebase Database (${JSCORE_VERSION}) INTERNAL ASSERT FAILED: Unknown node type
at C (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:17:94)
at v (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:17:67)
at dn.compareTo (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules\geofire\dist\geofire\geofire.min.js:737:1775)
at PriorityIndex.compare (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:5065:36)
at Array.sort ()
at buildChildSet (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:5148:15)
at c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:5312:28
at map (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\util\dist\index.esm2017.js:1164:27)
at IndexMap.addToIndexes (c:\work\integrity\projects-node\GeoMonitoringApp\node_modules@firebase\database\dist\index.esm2017.js:5295:31)
at ChildrenNode.updateImmediateChild (c:\work\integrity\projects-node\GeoMonitoringApp.vscode.react\index.bundle:104798:42) {stack: 'Error: Firebase Database (${JSCORE_VERSION}) …ingApp.vscode.react\index.bundle:104798:42)', message: 'Firebase Database (${JSCORE_VERSION}) INTERNAL ASSERT FAILED: Unknown node type'}

@pzoli pzoli changed the title t.split 't.split' error and 'Unknown node type' at firebase Feb 27, 2023
@pzoli
Copy link
Author

pzoli commented Feb 27, 2023

If I add indexon to firebase, I get "childPathObj.split is not a function" again.

"geolocations": {
".indexOn": "g"
}

@jacobbinnie
Copy link

This is still an issue on version 6.0.0. Any updates?

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