This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Image not loading
#1
In my visualization I have a widget to open/close my gate, It works perfectly.
I have some surveillance cameras (unifi bullet4) In their settings I can enabled "Anonymous Snapshot", and when I go to http://192.168.1.46/snap.jpeg from chrome I can see a snapshot from the camera, just what I want.
But when I use the "image" in visualizations plan editor the image is not loaded, but if I right click it and choose "Open link in new tab" it works.
But it adds something to the url:
http://192.168.1.46/snap.jpeg?_nc=o85lppzhde

Everything is testet both from my local network and from external, with same result

[Image: l5D2xdY.jpeg]

If I inspect the image not loading in chrome and go to network this comes up:

[Image: p6J8RHQ.png]
Reply
#2
If you are connected via HTTPS to your controller then the browser will block loading of all non-HTTPS resources.
Reply
#3
(20.03.2023, 10:15)admin Wrote: If you are connected via HTTPS to your controller then the browser will block loading of all non-HTTPS resources.

Thanks alot, i just figured it out 10 sec ago Smile
Reply
#4
(20.03.2023, 10:15)admin Wrote: If you are connected via HTTPS to your controller then the browser will block loading of all non-HTTPS resources.

I have the same problem but I already connect to my LM through http...
There is no problem with Firefox under both Linux and Windows but I can't get it to work with Opera, Chrome, Chromium or Edge!

I've tried enabling almost everything in Opera and Chromium without result.
Is there some specific setting needed on these browsers?
Reply
#5
Check the browser console / network tab (F12). It will show why the images are not loading. Which LM firmware are you using?
Reply
#6
(22.03.2023, 08:12)admin Wrote: Check the browser console / network tab (F12). It will show why the images are not loading. Which LM firmware are you using?

It says (blocked:origin)...

LM firmware 20160714 which I cannot update...
Reply
#7
Do you have the image in http://user:pass@... format?
Reply
#8
(22.03.2023, 08:29)admin Wrote: Do you have the image in http://user:pass@... format?

Yes...
Reply
#9
This URL format has been blocked in browsers for security reasons for some time already.
Reply
#10
(22.03.2023, 08:43)admin Wrote: This URL format has been blocked in browsers for security reasons for some time already.

I am aware of this (I am currently building a proxy server for my camera's for that reason) but this keeps working in Firefox for some reason...

Since I also have this problem (https://forum.logicmachine.net/showthread.php?tid=4532)  in Firefox but not in Opera, I was planning on switching to Opera or Chromium but then ran into the camera problem.

The gauges never had a problem for years but then started moving around. Why does fixing this require new firmware (which I cannot install unfortunately)?

Thanks for your great support as always!
Reply
#11
Run this once, clear browser cache and see if gauge starts working correctly. LM must have internet connection for this work.
Code:
os.execute('mv -n /www/scada/vis/gauge.js.gz /www/scada/vis/gauge-old.js.gz')
os.execute('rm -f /www/scada/vis/gauge.js.gz')
os.execute('wget -O /www/scada/vis/gauge.js.gz http://dl.openrb.com/misc/gauge.js.gz')

In case something goes wrong you can revert the gauge file this way:
Code:
os.execute('cp -f /www/scada/vis/gauge-old.js.gz /www/scada/vis/gauge.js.gz')
Reply
#12
(22.03.2023, 09:48)admin Wrote: Run this once, clear browser cache and see if gauge starts working correctly. LM must have internet connection for this work.
Code:
os.execute('mv -n /www/scada/vis/gauge.js.gz /www/scada/vis/gauge-old.js.gz')
os.execute('rm -f /www/scada/vis/gauge.js.gz')
os.execute('wget -O /www/scada/vis/gauge.js.gz http://dl.openrb.com/misc/gauge.js.gz')

In case something goes wrong you can revert the gauge file this way:
Code:
os.execute('cp -f /www/scada/vis/gauge-old.js.gz /www/scada/vis/gauge.js.gz')

There is no gauge.js.gz in /www/scada/vis.
ls -l of /www/scada/vis yields:

Code:
-rw-r--r--    1 root     root            42 Jun 21  2016 brand.css.gz
-rw-r--r--    1 root     root           719 Jul  1  2016 busdecode.js.gz
-rw-r--r--    1 root     root          9786 Jun 21  2016 controls.js.gz
-rw-r--r--    1 root     root         12617 Jul 13  2016 core.js.gz
lrwxrwxrwx    1 root     root            36 Feb 12 14:00 custom.css -> /lib/genohm-scada/storage/custom.css
lrwxrwxrwx    1 root     root            35 Feb 12 14:00 custom.js -> /lib/genohm-scada/storage/custom.js
-rw-r--r--    1 root     root         34885 Jun 21  2016 dygraph.js.gz
-rw-r--r--    1 root     root         18513 Jun 21  2016 flotr2.js.gz
-rw-r--r--    1 root     root          3240 Jun 21  2016 icons.ttf
-rw-r--r--    1 root     root          2160 Jun 21  2016 icons.woff
-rw-r--r--    1 root     root         30724 Jun 21  2016 jquery.js.gz
-rw-r--r--    1 root     root          5992 Jun 21  2016 layout.css.gz
-rw-r--r--    1 root     root          4231 Jun 21  2016 schedulers.js.gz
-rw-r--r--    1 root     root          2378 Jun 21  2016 theme.css.gz
-rw-r--r--    1 root     root          3641 Jun 21  2016 trends.js.gz
-rw-r--r--    1 root     root          9681 Jun 21  2016 velocity.js.gz

Edit: just found out that gauge.js.gz is in /www/scada/resources.
I suppose I can run the same commands in that directory?
Reply
#13
It might be in resources instead of vis.
Reply
#14
(23.03.2023, 16:17)admin Wrote: It might be in resources instead of vis.

I did not change the gauge.js.gz yet because strangely enough, since Firefox was updated to version 111.0.1 the problem has disappeared!
Reply


Forum Jump: