Insights dont show on public - E401

I’m a newbie. First of all, thank you for OR being here.

I want to make “Insights” visible without logging in.

I’m running the latest version of OR on a VPS with Ubuntu 20.

I have a single asset that measures temperature and humidity. The asset has the “Public read” option enabled, and both the humidity and temperature attributes are also set to public.

I created an “Insight” with two widgets (temperature + humidity). In the insight settings, I selected Permissions > View > Public.

When I’m logged in, the Insights link works as expected:
https://iot.xoxofoto.cz/insights/?realm=master#/view/[ID of insights]/true

However, when I open the link in an incognito window, I see an E401 error in the console, and the screen is completely blank.

The console shows the following error request:

GET request to https://iot.xoxofoto.cz/auth/realms/master/account  
Response: {"error": "HTTP 401 Unauthorized"}

What I doing wrong?

Hi!

I think this is a bug that is accidentally introduced, being unaware of ‘public’ apps like Insights.
As I can reproduce it on our demo (OpenRemote Insights), I’ll raise a GitHub issue on this.
Thanks for reporting!

I seem to be having the same issue.

Has this been resolved? Does anyone know of a workaround?

Hi, welcome to the forum!

The GitHub issue I’ve created (linked above) hasn’t been picked up nor resolved yet.
I’ll try to pick it up when I find the time, although I’m quite busy at the moment :sweat_smile:

Unfortunately I’m not aware of a simple workaround, other than making users login.

This bug got introduced due to a change on November 15th, 2024.
Only manually building the Docker images will allow you to deploy OpenRemote without this bug.

Unfortunately I am not familiar with manually building Docker images to circumvent this bug. :smiling_face_with_tear: Is there documentation on how to go about doing this?

Please understand… this is a show-stopper for us!

Hi!

The bug has just been resolved by our team.
It will be included in the next release.

GitHub pull request can be found here;

1 Like

Although this bug has been resolved, we are still waiting for the next release…

When is the next release expected?

Good news, the new release is out now!

:partying_face: :partying_face:

1 Like

Also… for my test Insight I have the Permissions property set to Public.

Thank you for the new release!

I have updated to version 1.6.

Now when I send the Insight url to a “public” recipient, they are seeing the login screen (instead of a blank screen).

The ThingAsset I am using for testing has the “Public read property” set to true. Both the temperature and humidity attributes I am using for testing have their “Access public read” properties set to true.

Is it possible to send someone the url of an Insight for viewing without them having to login? If yes, any idea what I’m missing?

I

This is about all I have found in the documentation regarding public Insights…

  • Make dashboards public. Note this requires assets to be set as ‘public’ and attributes as ‘public read’.

I have set the assets as ‘public’ and attributes as ‘public read’.

But the Insight still wants me to login.

Is there a global setting I’m missing?

I’m near giving up on this, so any help would be greatly appreciated!!

Oh that’s odd. I didn’t encounter this during testing…

I double checked on my local environment, by creating a new asset (in any realm),
marking the asset as “public read”, and adding “access public read” config item to an attribute.
I created a dashboard with a single “Attribute Input” widget, showing the value of that asset.
I also double checked the dashboard was public.

Now, let’s see if the public can access it;

Test scenario 1

After saving, I clicked the “open in new tab” icon on the top right,
that opened the standalone Insights page. To check if I can still open it without logging in,
I copy the link, and paste it into a new incognito window. I didn’t get a login prompt, and was
able to see the attribute value inside the “Attribute Input” widget.

Test scenario 2

I navigated to “https://[hostname]/insights/” without any dashboard ID specified.
It redirects to the public dashboard ID automatically, and the hamburger menu only shows public dashboards. :+1:

.

:warning: Important information :warning:

The login page is shown when either;

  • on ‘/view/’, the dashboard could not be retrieved through the HTTP API.
    For example, due to no access, or an invalid dashboard. (please check network logs)
  • on ‘/’ (without specifying an ID), when no public dashboards could be retrieved at all.
    We assume that only realm/private dashboards are present, so a login form is shown.

.
Maybe I haven’t covered a scenario you are using public dashboards for?
Let me know! :wink:

1 Like

After reading your step-by-step, I realized I hadn’t clicked on “open in new tab” and instead was copying and pasting the url from the master realm! Doh!!

Now I’m feeling pretty silly! Price you pay for being a newbie!!

Thank you so much for your clear instructions, though I’m sure they were there in your documentation all along. I apologize for the disruption, I know you’re a busy guy!

Thanks again,

Onwards…

2 Likes