Show/Follow Logs Commands Throw JSONPath Parse Error
See original GitHub issueAttempting to follow or show a pods logs either from the Command Menu or from the Sidebar menu is throwing an exception related to JSON parsing:
Failed to get containers in pod: error: error parsing jsonpath {'NAME\tIMAGE\n'}{range .spec.containers[*]}{.name}{'\t'}{.image}{'\n'}{end}, unrecognized character in action: U+0027 '''
This prevents all attempts to view logs using this extensions tools. Other commands seem to function properly.
I am encountering this when working with namespaced pods as well as in minikube. I am working with a Kubernetes server on version 1.6 in both instances. Is this to old for this tool? In prior releases of this tool showing logs was functioning as expected and I was able to see my pods logs.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Show/Follow Logs Commands Throw JSONPath Parse Error
Attempting to follow or show a pods logs either from the Command Menu or from the Sidebar menu is throwing an exception related...
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >JsonPath is not throwing exception when path not present ...
anyRandomKey") should throw error when anyRandomKey is not present. But it returns an empty list. Below is code to replicate this scenario. pom....
Read more >Parse JSON Formatted Logs - Sumo Logic Docs
The JSON operator allows you to extract values from JSON logs with most JSONPath expressions. See the supported JSONPath syntax elements below.
Read more >Using JSONPath effectively in AWS Step Functions
Paths follow JSONPath syntax. ... This blog post explains how you can effectively use JSONPath in a Step Functions workflow.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, it looks like the existing quoting is the only form that works on Windows, and the switched quoting is the only form that works on Mac, and both work on Linux! So we’ll keep the existing quoting on Windows, but used the switched quoting elsewhere. #smdh
Thanks for flagging this. I don’t know why it suddenly changed in the most recent version, but appreciate you taking the time to report it and to track down the problem. A fix is on the way!
Thanks, that’s great info. I’ve been trying to get to a Mac to re-test this - thanks for getting in there first! I’ll test out the switched quotes on Windows and Linux; and if I need different quotes on different platforms then I can do that! I should have access to a Mac on Monday so will aim to get a fix in then. Again, thanks for the investigation and for your patience!