question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show/Follow Logs Commands Throw JSONPath Parse Error

See original GitHub issue

Attempting 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:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
itowlsoncommented, Jul 23, 2018

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!

0reactions
itowlsoncommented, Jul 19, 2018

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!

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found