lbr38 / repomanager

A web UI to mirror rpm or deb packages repositories.
GNU General Public License v3.0
50 stars 7 forks source link

UI not working as expected #174

Open Gabgobie opened 4 days ago

Gabgobie commented 4 days ago

Hi. First of all, thanks a lot for this. I was looking for exactly this kind of tool and was just about to create a barely working version myself if I didn't find anything.

Now to the issue: When trying to manage the repo, there are repos hidden on the second page, however when clicking the button to get to the second page, it will display a loading circle in the bottom right corner of the browser and then do nothing. I just had to purge all of the repos I didn't need to get to the ones I want to edit at all.

I'd be happy to help with troubleshooting. I tried with both Chromium based browsers and Firefox to ensure it wasn't some browser compatibility or settings related issue.

lbr38 commented 3 days ago

Hello

First time I heard of this issue. Could you provide a screenshot to show me exactly where it is?

Also can you open you browser console (F12) and check if there are errors displayed when clicking on the button.

Thanks

Gabgobie commented 1 day ago

Hi,

apologies for taking so long. Taking a look at the console solves the mystery. It's refusing cookies as they are marked as secure but I haven't taken the time to setup https.

I'll report back after I setup https but for now I'd guess that this would fix it.

-> The UI breaks when not using HTTPS

Best, Gab

lbr38 commented 1 day ago

My local dev environment has no https and I have no problem with cookies.

How do you access repomanager? Do you use a reverse proxy with a FQDN like described in the wiki or do you browse through the IP address?

Gabgobie commented 1 day ago

I directly installed it on TrueNAS Scale. I pointed a local hostname at it (repo.home.arpa.) and it's on port 9080 since TrueNAS doesn't allow anything below 9000. I tried accessing it both by using the FQDN and the IPv4. Maybe it's getting confused because an FQDN is configured but I'm not using HTTPS?

My Browser (Firefox) is configured in German so apologies if the console message is now very helpful: Das Cookie "tables/source_repos/list/offset" wurde abgelehnt, weil ein Nicht-HTTPS-Cookie nicht als "secure" gesetzt werden kann. functions.js:320:52

Translated: The Cookie "tables/source_repos/list/offset" was refused because a non-https-cookie can't be set as "secure".

I also noticed that the container logs are showing "Getting settings. . ." every 5 seconds and "Running service with parameter 'scheduled-task-exec'. . ." once per minute. I assume that is expected behavior though.

Starbix commented 23 hours ago

I also noticed the UI not working as expected when not accessing via HTTPS. I use nginx (ingress-nginx in k8s) as a reverse proxy. I'm using Firefox. A self-signed certificate helped:)