grafana-prtg icon indicating copy to clipboard operation
grafana-prtg copied to clipboard

Uncaught (in promise) SyntaxError: Unexpected token

Open Leandrobpo opened this issue 5 years ago • 7 comments

Im trying to use the PRTG Plugin, but I have this issue and I have no idea what can I do to fix it

It happens wen I try to add a Dashboard

Navigation: New Dashboard => add Query

What I take in Google Chrome Inspection:

new:1 Uncaught (in promise) SyntaxError: Unexpected token in JSON at position 347 at JSON.parse () at new XMLXform (xmlparser.js:38) at eval (PRTGAPIService.js:135) at angular.js:17051 at angular.js:17095 at l.$digest (angular.js:18232) at l.$apply (angular.js:18531) at angular.js:18832 at h (angular.js:6362) at angular.js:6642

image

Leandrobpo avatar Jul 04 '19 19:07 Leandrobpo

...and this is a blank dashboard with no panels at all and a totally new query?

Sent from my iPhone

On Jul 4, 2019, at 2:25 PM, Leandrobpo [email protected] wrote:

Im trying to use the PRTG Plugin, but I have this issue and I have no idea what can I do to fix it

It happens wen I try to add a Dashboard

Navigation: New Dashboard => New Query

new:1 Uncaught (in promise) SyntaxError: Unexpected token in JSON at position 347 at JSON.parse () at new XMLXform (xmlparser.js:38) at eval (PRTGAPIService.js:135) at angular.js:17051 at angular.js:17095 at l.$digest (angular.js:18232) at l.$apply (angular.js:18531) at angular.js:18832 at h (angular.js:6362) at angular.js:6642

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

neuralfraud avatar Jul 05 '19 17:07 neuralfraud

Yes

Leandrobpo avatar Jul 05 '19 18:07 Leandrobpo

Any update on this issue? Did you have any special/odd characters in your group/device names by any chance? Anything that could be interpreted as a JSON Character? Sorry for the delay here.

neuralfraud avatar Oct 25 '19 05:10 neuralfraud

Try the latest build; see the CHANGELOG.md for details.

neuralfraud avatar Oct 27 '19 17:10 neuralfraud

hit this issue as well

new dashboard new panel new query Grafana version: 6.4.3 (3a2bfb7) PRTG version: 19.4.52.3515 Grafana-prtg version: 4.0.3

PRTG regedit change OK Grafana data source connects OK

Dashboard setup: Visualization type: Alert List Visualization Options:

  • Show - Current State
  • State Filters - none (all off)

Results in empty windows. No error

Also trying in Explore:

Query Mode: RAW URI: http://myserver/api Query String: none

grafana.log shows “…status 302…” but getting:

Error: Unexpected token in JSON at position 347

Any help is appreciated.

lrzuniga avatar Nov 22 '19 15:11 lrzuniga

You should try downloading the latest copy from the master branch.

On Fri, Nov 22, 2019 at 9:43 AM Luis Zuniga [email protected] wrote:

hit this issue as well

new dashboard new panel new query Grafana version: 6.4.3 (3a2bfb7) PRTG version: 19.4.52.3515 Grafana-prtg version: 4.0.3

PRTG regedit change OK Grafana data source connects OK

Dashboard setup: Visualization type: Alert List Visualization Options:

  • Show - Current State
  • State Filters - none (all off)

Results in empty windows. No error

Also trying in Explore:

Query Mode: RAW URI: http://myserver/api Query String: none

grafana.log shows “…status 302…” but getting:

Error: Unexpected token in JSON at position 347

Any help is appreciated.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/130?email_source=notifications&email_token=ACAW2N6D3EPO4NL3N73TTLTQU742RA5CNFSM4H56YPV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE6ATPA#issuecomment-557582780, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAW2N4XRUYQGCIBUKC5O23QU742RANCNFSM4H56YPVQ .

neuralfraud avatar Nov 24 '19 22:11 neuralfraud

hmm...thought the grafana plugin instlaller would use the latest branch. yes, that resolved it.

thank you

lrzuniga avatar Nov 26 '19 15:11 lrzuniga