[Bug] JSON Data - error while performing the infinity query. unexpected EOF #1256
-
Describe the bugWhen querying an JSON Endpoint, which does not have a Newline at the end. The JSON is not displayed correctly, but showing the following Error Message: If I curl the endpoint manually via Terminal it works and give the correct data: Just querying with Infinity does not work. The provided JSON is still valid and should be able to show. Even when missing the \n for a Newline at the end. Showing as the next line of Terminal just follows the Command. If I query a different Endpoint, which includes the \n at the end. The data is correctly shown by Infinity. Unfortunately I have multiple endpoints I need to query, where some of them are missing the \n and some include it. Steps to reproduceQuery a JSON Endpoint, which is missing the \n for a newline at the end. Note: bugs will be fixed only if enough information provided to reproduce the issue Sample Data
ScreenshotsVersion Details:
Additional contextAdd any other context about the problem here. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
I don't think this is an issue with new line.. ( i tried and couldn't reproduce ). https://play.grafana.org/goto/4mqyqpBNR?orgId=1 https://play.grafana.org/goto/RM88qpfHR?orgId=1 Are you sure the query returns JSON? ( just change the type to CSV with the same url and see what you are getting.. set the delimiter to something random |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Sorry that is bit suspicious on the downstream API configuration. My guts says, If infinity able to parse similar 60%, then it should be able to handle remaining 40% if they are same setup. Can you provide us a clear reproduction steps with sample URL ( as I couln't reproduce this with my sample URLs ) |
Beta Was this translation helpful? Give feedback.
-
Converting this into dicussion to get more clarification and reproduction steps. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately you won't be able to query the URLs, as the URL's are all only reachable from internal company network. I'm not sure how I can set up a sample URL right now. It's not as easy, as the non working JSON query comes from the old SL6 Servers with an older version of an internal Software. One weird thing I just found with the Query inspector is, that it seems to append 'Accept-Encoding: gzip' in the new version? I've just updated Grafana and the Plugin from 2.12.x yesterday: Not working Endpoint:
Working Endpoint:
|
Beta Was this translation helpful? Give feedback.
-
@yesoreyeram |
Beta Was this translation helpful? Give feedback.
@yesoreyeram
I might have found a hint.
If I add "Accept-Encoding: identity" as an HTTP Header the Query from infinity seems to work. It looks like there is any issue with a compression, that causes it to fail.