-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Dev Tools Console 8.x javascript error when sense:folds contains non-empty array with sense:console_local_text-object with non-empty string #151563
Comments
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
Interesting, I have that issue now as well in one of my deployments. I did a deeper analysis: I right now compared with a completely other instance the values. no clue how that could happen, but after correcting it's working now... Maybe that helps a bit. |
## Summary Fixes #151563 There is a combination of the folds in the editor (collapsed lines) and the text that can cause the editor to fail. This PR adds a try/catch clause to the editor, so that the UI can still be used. ### How to use 1. Open Kibana and in your browser's Dev Tools, delete everything from local storage. 2. Add following 2 items back to the local storage: ``` sense:folds [{"start":{"row":1,"column":1},"end":{"row":82,"column":4}}] sense:console_local_text-object_e69f508c-3342-45cf-ae7c-2753548ce8e7 {"id":"e69f508c-3342-45cf-ae7c-2753548ce8e7","createdAt":1675332935410,"updatedAt":1676630754720,"text":"GET _cat/indices"} ``` 3. Navigate to Console in Kibana, make sure the editor works. ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
## Summary Fixes elastic#151563 There is a combination of the folds in the editor (collapsed lines) and the text that can cause the editor to fail. This PR adds a try/catch clause to the editor, so that the UI can still be used. ### How to use 1. Open Kibana and in your browser's Dev Tools, delete everything from local storage. 2. Add following 2 items back to the local storage: ``` sense:folds [{"start":{"row":1,"column":1},"end":{"row":82,"column":4}}] sense:console_local_text-object_e69f508c-3342-45cf-ae7c-2753548ce8e7 {"id":"e69f508c-3342-45cf-ae7c-2753548ce8e7","createdAt":1675332935410,"updatedAt":1676630754720,"text":"GET _cat/indices"} ``` 3. Navigate to Console in Kibana, make sure the editor works. ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
Kibana version:

8.6.1
(not reproduced in7.17.8
, also reproduced in8.5.2
)Browser version:
Chrome Version 110.0.5481.100 (Official Build) (arm64)
Browser OS version:
MacOS 13.2.1 (22D68)
Original install method (e.g. download page, yum, from source, etc.):
docker
Describe the bug:
Not huge issue as clearing cache will solve but raising for reference as I got reproduction steps, Dev Tools Console does not load :
Javascript error :
Steps to reproduce:
https://localhost:5601
which I use for various versions of Kibana)sense:
and delete all the keys found (or just delete keysense:console_local_text-object_*
)Note either the following will work around the issue :
sense:folds
to value[]
sense:console_local_text-object_e69f508c-3342-45cf-ae7c-2753548ce8e7
to empty text like{"id":"e69f508c-3342-45cf-ae7c-2753548ce8e7","createdAt":1675332935410,"updatedAt":1676630754720,"text":""}
Expected behavior:
No javascript stack trace
Any additional context:
In my case
https://localhost:5601
is what I use for using short-lived kibana test systems on many versions, I had first issue on that and few weeks later onhttps://127.0.0.1
which I started using.I did not check what
sense:folds
is holding but in8.6.1
, when I run any command in Dev Tools Console, this gets reset to an empty array... It looks like having a non-empty array for this and any non-empty string in fieldtext
forsense:console_local_text-object_<GUID>
causes javascript errorThe text was updated successfully, but these errors were encountered: