redis-commander icon indicating copy to clipboard operation
redis-commander copied to clipboard

JSTree Error: Failed to execute 'querySelector' on 'Element'

Open gridsandspaces opened this issue 4 years ago • 5 comments

When deploying Redis Commander to Pivotal Cloud Foundry I'm able to load the service details for Redis and connect, but JSTree is throwing numerous errors for the querySelector.

Clicking the refresh button or a node on the tree throws the following error:

Uncaught DOMException: Failed to execute 'querySelector' on 'Element': '#R:q-s0.redis-instance.dynamic-services.service-instance-422e5436-73b3-49d4-af9c-dc0c3b9a6809.bosh:6379:0:,O^m��RV!$��' is not a valid selector.

gridsandspaces avatar Dec 01 '20 20:12 gridsandspaces

Do you have the output of the server-side console? Can you post it please? And what does the name of your keys look like? Something special it looks like - maybe binary data?

And when does it throw the errors? On initial display of the tree without opening anything on key level? OR after clicking of the server entry inside the key (with the red redis logo) Or opening the keys below it...

sseide avatar Dec 02 '20 09:12 sseide

Nothing shows up in the server-side logs, just browser console. Here is the complete output from Chrome:

Uncaught DOMException: Failed to execute 'querySelector' on 'Element': '#R\:q\-s0\.redis\-instance\.dynamic\-services\.service\-instance\-422e5436\-73b3\-49d4\-af9c\-dc0c3b9a6809\.bosh\:6379\:0\:\,O\^m��RV\!\$��' is not a valid selector.
    at $.jstree.plugins.contextmenu.redraw_node (https://internal-pcf-app.int/jstree/jstree.js:2448:87)
    at $.jstree.plugins.contextmenu.draw_children (https://internal-pcf-app.int/jstree/jstree.js:2413:25)
    at $.jstree.plugins.contextmenu.open_node (https://internal-pcf-app.int/jstree/jstree.js:2683:12)
    at $.jstree.plugins.contextmenu.toggle_node (https://internal-pcf-app.int/jstree/jstree.js:2835:17)
    at $.jstree.plugins.contextmenu.<anonymous> (https://internal-pcf-app.int/jstree/jstree.js:759:12)
    at HTMLElement.f (https://internal-pcf-app.int/scripts/jquery-2.2.4.js:2:3698)
    at HTMLDivElement.dispatch (https://internal-pcf-app.int/scripts/jquery-2.2.4.js:3:7537)
    at HTMLDivElement.r.handle (https://internal-pcf-app.int/scripts/jquery-2.2.4.js:3:5620)

This appears in the console when the app first loads and if we attempt to expand the tree. If I click on the main Redis node then I am able to see server info.

gridsandspaces avatar Dec 02 '20 15:12 gridsandspaces

Your comment about binary data got me thinking, I deployed another test app so I could see the keys and it looks like some encrypted keys and values were written. I ran FLUSHALL and was able to get things working again. So FYI that bad keys will completely break the UI.

Thanks for the assistance.

gridsandspaces avatar Dec 02 '20 15:12 gridsandspaces

than i reopen it - we have to do something about this kind of keys to not break the UI. Good to know the reason...

sseide avatar Dec 02 '20 17:12 sseide

just think about the problem - do you have any idea or preferences how binary keys should be represented in the tree view? What would be useful here?

Thanks

sseide avatar Dec 19 '20 17:12 sseide