wborn / openhab-grafana

JavaScript utilities and examples for using Grafana with openHAB
MIT License
46 stars 13 forks source link

[Error] SyntaxError: Can't create duplicate variable: 'typeMap' #9

Open NSchnitzler opened 6 years ago

NSchnitzler commented 6 years ago

I wanted to test the demo in my Openhab installation, but i am getting this error and don't know how to resolve it: ` [Error] SyntaxError: Can't create duplicate variable: 'typeMap'

write (smarthome-grafana.js:214)

b (smarthome-grafana.js:214)

e (smarthome-grafana.js:53)

f (smarthome-grafana.js:62)

valueHandler (smarthome-grafana.js:159)

onload (smarthome-grafana.js:35)

`

wborn commented 6 years ago

Which browser and version of openHAB are you using @NSchnitzler?

When I Google the error message I found an issue where people got it due to using AdBlock/Ghostery. Do you use such extensions and did you try disabling them?

NSchnitzler commented 6 years ago

I am using Safari Version 11.1.1 (13605.2.1) and the actual openhab snapshot, yes i disabled AdBlock, but still have the mentioned issue

wborn commented 6 years ago

I can't reproduce this issue with the demo on Chrome and Firefox and the latest openHAB version. Testing Safari is a bit difficult since I don't own a Mac.

Do you also have this error with Chrome or Firefox on macOS?

wborn commented 6 years ago

Did you already try Chrome or Firefox on macOS @NSchnitzler?

NSchnitzler commented 6 years ago

Yes of course, but i couldn't make it work

wborn commented 5 years ago

Do you stil have this issue @NSchnitzler?

The issue can also be caused by the minification of the code. Maybe you can test if this issue also occurs when using the orginal/unminified code?

I recently renamed some files/variables because openHAB forked ESH. So if you're using the original version you could try: 0.1.0/web-src/smarthome-grafana.js or the new version (with the renaming): 1.0.0/web-src/openhab-grafana.js

See also the releases page for what has been renamed.

NSchnitzler commented 5 years ago

I have downloaded the actual master and made a short test, Grafana is throwing this error:

t=2019-06-11T19:16:41+0200 lvl=eror msg="Dashboard not found" logger=context userId=1 orgId=1 uname=admin error="Dashboard not found"