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

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

Open
gridsandspaces opened this issue Dec 1, 2020 · 5 comments
Open
Labels

Comments

@gridsandspaces
Copy link

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.

@sseide
Copy link
Collaborator

sseide commented Dec 2, 2020

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...

@gridsandspaces
Copy link
Author

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
Copy link
Author

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.

@sseide
Copy link
Collaborator

sseide commented Dec 2, 2020

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 sseide reopened this Dec 2, 2020
@sseide sseide added the bug label Dec 2, 2020
@sseide
Copy link
Collaborator

sseide commented Dec 19, 2020

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

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

No branches or pull requests

2 participants