No login to WebUI after Upgrade 5.0.3 -> 5.1.0

Hi there,

I am using openhab on Debian 13 (trixie) and just (2 hours ago) upgraded 5.0.3 → 5.1

In the “Setting” “API Securiy” the option “Implicit User Role” is normally deactivated for me, so I have to login to view my “Overview” page.
The option “Allow Basic Authentication” (advanced) in the same Menu is activated.

Before the upgrade a login page was shown whenever I opened
”https:// myserver :8443”
and after the login I was redirected to the overview page.

After the upgrade the overview-page is loaded but it stays black.

A further research shows that while trying to load tags from the REST-API we get an 401 UNAUTHORIZED error and thats it.

If I enable “Implicit User Role” everything works as expected and I get to see the overview page but without the need for a login.

So I wonder whether this is a bug or a design change.

However, I would like to return to my previous setup in which I had to login to then show the overview page. Is there an option I overlooked or something else I need to configure?

Also having this issue.
Chrome console logs when trying to load main page:

rest/tags:1 Failed to load resource: the server responded with a status of 401 (Unauthorized)
index-BKkrdbNu.js:40533 Failed to load semantic tags:
(anonymous) @ index-BKkrdbNu.js:40533
index-BKkrdbNu.js:40533 Unauthorized
(anonymous) @ index-BKkrdbNu.js:40533
overview/:1 Uncaught (in promise) Failed to load semantic tags: Unauthorized

I am not prompted for authentication, it’s a blank white page

First thing I would do is delete the server cookies in your browser.

This is a bug and has already been fixed, you have to wait for openHAB 5.1.1

Thank you very much for that information :slight_smile:

Or you upgrade Main UI to the latest CI build of the patch release branch, instructions on how to this will be added soon to the docs.

For reference purposes: Fix Main UI load fails if implicit user role is disabled by florian-h05 · Pull Request #3662 · openhab/openhab-webui · GitHub. Thanks for fixing this @florian-h05 , looking forward to OH 5.1.1 :smiley:

I also activated this option in openhab 5.1 and now i have no access to my main ui. Is there a way to turn the setting back without using the gui? I made many changes to my config and have only an older backup :see_no_evil_monkey:

Follow the linked instructions in the console to upgrade the Main UI bundle to the latest 5.1.x-SNAPSHOT:

Thanks for fixing and for keeping us posted!

I had the same issue, but as described in this thread it was also solved for me with version 5.1.1

However this issue seems to have reappeared with version 5.2.0 now.
Currently with 5.2.0 I get this behavior when “Implicit User Role” is disabled:

When not logged in, I just get a black page, no login page.
When logged in and I refresh the page, the Overview page just says “Loading…”. Also the item states in the Locations/Equipment etc. pages are not shown. The browser console then shows a lot of 401 (Unauthorized) messages.

When “Implicit User Role” is enabled OpenHAB works as expected.

After some testing I can confirm that the WebUI is completely broken if you turn off the implicit user role. After logging out, there’s not even a way to log in, you just get a blank screen. SSE is also broken if you are logged in. This is the case in 5.2.0 as well.

We now have two different PRs that solve the implicit user issue, so I think it should be fixed for 5.2.1.

This is exactly the problem I was having!

I turned it back on and re-upgraded. I will do some testing to see if everything is fine.