Problems with local network address? Possibly Javascript Issues?

I’m just starting with Balena, but I’ve been a long time Linux user & programmer.

For the front end, I followed the getting started instructions. However, with the instead of using the yout-ube address that it said to use, I gave it the address of my personal aws project. That project serves up an html page with included javascript to show a set of buttons, a couple images from the local network(192.168.x.x), and the current date/time. The buttons show up. The date/time shows up, but doesn’t update. The images never show up. And I’m not sure how to troubleshoot this problem.

I know that if I type that same address into my desktop computer, everything shows up fine. So it’s not a problem with my backend. But if it helps, I can duplicate my backend without the sensitive info for an example.

So I’m questioning if the javascript is getting run, since the time isn’t updating. And I’m wondering if there is a network issue since the images aren’t displaying.

Hi @YungBlood it sounds like you’re trying the balenaDash project, is that right?

It’s hard to speculate on what’s happening without seeing the page you’re trying to show. It sounds like the device is unable to access the resources on your local network, and perhaps this is causing an error which is halting the Javascript. Are the resources on your own computer or on another server on your local network? If you’re able to please share the page you’re trying to show and perhaps we can take a look and come up with more ideas about what the issue might be.

@chrisys, I’m accessing a page hosted on AWS, but I’m referring to images on a security DVR on the local network. I’ll duplicate my backend, remove the sensitive info, and open it up to the public. But if you want to test loading images in the same manner I am, you’ll need to configure a server to host sample images. I’ll get back to you once I have the backend duplicated.

@YungBlood have you considered trying to load your assets using curl from the CLI on the host OS of your device (log in via the balenaCloud dashboard)? This would at least confirm if your device has access.

@chrisys, I’m able to run curl from the wifi-connect terminal, and connect to the DVR. Since it’s an image, it just displays a bunch of wierd chars, but at least it connects. Here’s a copy of the backend without the sensitive info.

https://uo3bg7zby1.execute-api.us-east-1.amazonaws.com/console

I did notice a warning in the console:
https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/console:1:8: CONSOLE WARN The page at https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/console was allowed to display insecure content from http://192.168.0.180/cgi-bin/snapshot.cgi?user=guest&password=guest&channel=4?t=1555430556090.

Is it an issue with Balena to have the page served by https, but the images served with http? I don’t have control of how the images are served by the DVR, and I don’t want to introduce another server in the mix. But if there is an easy way to have the rpi host do the remapping of http to https, I’m open to that as a suggestion.