H
Homarrโ€ข2w ago
monke

Latest update broke my Homarr

Error message: Application error: a server-side exception has occurred (see the server logs for more information). Digest: 1516925094 Been spending the whole night trying to fix this, I am running the PVEHS Proxmox LXC version, since it does not run with docker I dont know how to fault seek since there does not seem to be any documentation about it. Running behind Nginx Proxy Manager, been trying different ports to no avail. I have done my research but since I am very tired after no sleep my explaining is limited, sorry!
No description
73 Replies
Cakey Bot
Cakey Botโ€ข2w ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
โš ๏ธ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
monke
monkeOPโ€ข2w ago
No description
Manicraft1001
Manicraft1001โ€ข2w ago
!qa required_data
Cakey Bot
Cakey Botโ€ข2w ago
Thank you for your question. Our support team has noted that your request does not meet the minimum required data so we are unable to answer your question. Please provide: - your Homarr logs - your setup configuration (eg. docker compose, docker run, helm chart, screenshot, ...) - A detailed description of your problem or question with additional images where necessary - Your operating system - Version of Homarr (do not say latest! say 0.15.2, ...) Failure to comply with this will result in a permanent closure of your support request.
Manicraft1001
Manicraft1001โ€ข2w ago
Please provide the server logs, the .js file is useless for debugging
Dr0PeR
Dr0PeRโ€ข2w ago
Same here after update from tteck script in proxmox:
No description
No description
Dr0PeR
Dr0PeRโ€ข2w ago
No description
Dr0PeR
Dr0PeRโ€ข2w ago
1.6.0 to 1.7.0
Dr0PeR
Dr0PeRโ€ข2w ago
debian lxc container, proxmox If you need more info, pls explain how to provide it
Dr0PeR
Dr0PeRโ€ข2w ago
I can access to /manage
No description
No description
Dr0PeR
Dr0PeRโ€ข2w ago
No description
Dr0PeR
Dr0PeRโ€ข2w ago
No description
Meierschlumpf
Meierschlumpfโ€ข2w ago
Server logs menas not the ones in the browser and rather those that are probably shown from your proxmox instance
Dr0PeR
Dr0PeRโ€ข2w ago
where are located the logs? what route?
Manicraft1001
Manicraft1001โ€ข2w ago
You posted the browser console. We need your logs. Since you use Proxmox, which is not officially supported, we can't help you with getting them
Dok
Dokโ€ข2w ago
I use ProxMox LXC as well and I am getting the same error. Here is the server log that I get when trying to login with the only user I have setup for Homarr which is the admin account. I can access manage and look at the server logs from Tools > Logs.
Dok
Dokโ€ข2w ago
Here is the error attached.
Manicraft1001
Manicraft1001โ€ข2w ago
@CrazyWolf13 can you assist?
Dok
Dokโ€ข2w ago
if it helps, I migrated from 0.15 to 1.5 before this and upgraded to 1.6 last week which was working okay.
CrazyWolf13
CrazyWolf13โ€ข2w ago
honestly I'm a bit unsure if this is really our script's fault, we really exactly run the same entrypoint as you do in the dockerfile, though I experienced the same issue. For me a manual db migration solved the issue, so probably running systemctl restart homarr should solve the issue.
Manicraft1001
Manicraft1001โ€ข2w ago
Do you disable migrations in the script or do you not run the db:migration:sqlite:run command?
CrazyWolf13
CrazyWolf13โ€ข2w ago
yeah they run under the homarr.service, running journalctl -u homarr shows them ๐Ÿ™‚
monke
monkeOPโ€ข2w ago
I tried systemctl restart homarr, did not solve my issue
Dok
Dokโ€ข2w ago
how do you do the manual db migration? I have just tried systemctl restart homarr and also a full reboot of the LXC, did not help.
CrazyWolf13
CrazyWolf13โ€ข2w ago
GitHub
homarr/scripts/run.sh at dev ยท homarr-labs/homarr
A modern and easy to use dashboard. 14+ integrations. 10K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration. - homarr-labs/homarr
GitHub
ProxmoxVE/install/homarr-install.sh at main ยท community-scripts/Pro...
Proxmox VE Helper-Scripts (Community Edition) . Contribute to community-scripts/ProxmoxVE development by creating an account on GitHub.
monke
monkeOPโ€ข2w ago
If I clean the cookies I can access the login page for Homarr But as soon as I login it gives me the digest error
Manicraft1001
Manicraft1001โ€ข2w ago
In my opinion this is wrong and you should not copy the migrations directory. Run the script instead. @Meierschlumpf can you jump in?
Meierschlumpf
Meierschlumpfโ€ข2w ago
What do you mean with copy the migrations? They are not copied and rather the migrate.cjs script is run with the path of the migrations directory
CrazyWolf13
CrazyWolf13โ€ข2w ago
I was also kinda confused, because I got the same error on my instance, though running the command
export DB_DIALECT='sqlite'
export AUTH_SECRET=$(openssl rand -base64 32)
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
export DB_DIALECT='sqlite'
export AUTH_SECRET=$(openssl rand -base64 32)
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
it seemed to fix the issue. Though I have no idea why this is not applied automatically, as we basically run the same startup script as you do.
Meierschlumpf
Meierschlumpfโ€ข2w ago
I mean in the dockerfile the following envs are defined:
ENV DB_URL='/appdata/db/db.sqlite'
ENV DB_DIALECT='sqlite'
ENV DB_DRIVER='better-sqlite3'
ENV AUTH_PROVIDERS='credentials'
ENV NODE_ENV='production'
ENV DB_URL='/appdata/db/db.sqlite'
ENV DB_DIALECT='sqlite'
ENV DB_DRIVER='better-sqlite3'
ENV AUTH_PROVIDERS='credentials'
ENV NODE_ENV='production'
So I guess that should work?
CrazyWolf13
CrazyWolf13โ€ข2w ago
yes our env looks like this:
DB_DRIVER='better-sqlite3'
DB_DIALECT='sqlite'
SECRET_ENCRYPTION_KEY='${SECRET_ENCRYPTION_KEY}'
DB_URL='/opt/homarr_db/db.sqlite'
TURBO_TELEMETRY_DISABLED=1
AUTH_PROVIDERS='credentials'
NODE_ENV='production'
DB_DRIVER='better-sqlite3'
DB_DIALECT='sqlite'
SECRET_ENCRYPTION_KEY='${SECRET_ENCRYPTION_KEY}'
DB_URL='/opt/homarr_db/db.sqlite'
TURBO_TELEMETRY_DISABLED=1
AUTH_PROVIDERS='credentials'
NODE_ENV='production'
CrazyWolf13
CrazyWolf13โ€ข2w ago
Maybe I got the issue, the migration also needs the secret_key, which was not visible to us, as it's not used here: https://github.com/homarr-labs/homarr/blob/dev/scripts/run.sh I'll update our scripts to properly load the secret too.
GitHub
homarr/scripts/run.sh at dev ยท homarr-labs/homarr
A modern and easy to use dashboard. 14+ integrations. 10K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration. - homarr-labs/homarr
monke
monkeOPโ€ข2w ago
Would running the update script again fix the issue? Once you changed the script then I mean
CrazyWolf13
CrazyWolf13โ€ข2w ago
Yes as soon as the PR gets merged, you can re-run the update command and it should fix it ๐Ÿ™‚
monke
monkeOPโ€ข2w ago
Good! Thank you for the help ๐Ÿ™‚
CrazyWolf13
CrazyWolf13โ€ข2w ago
No problem, thanks @Manicraft1001 for the ping ๐Ÿ™‚
Dok
Dokโ€ข2w ago
Awesome. You are all awesome! ๐Ÿ™‚ Thanks for figuring this out. @CrazyWolf13 quick question. if the update command detects that homarr is already at 1.7.0 version and won't do anything, how will it apply the fix? Is there way to force it manually? I have tried updating the run_homarr.sh by adding the following at the beginning, that seems to not help. Is that the only thing needed for the script to fix the migration? set -a source /opt/homarr/.env set +a Running the following does not fix the issue for me for some reason. root@homarr:/opt/homarr# export DB_DIALECT='sqlite' root@homarr:/opt/homarr# export AUTH_SECRET=$(openssl rand -base64 32) root@homarr:/opt/homarr# node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT Skipping seeding of group 'everyone' as it already exists Skipping seeding of onboarding as it already exists Skipping seeding for serverSetting as it already exists key=analytics Skipping seeding for serverSetting as it already exists key=crawlingAndIndexing Skipping seeding for serverSetting as it already exists key=board Skipping seeding for serverSetting as it already exists key=appearance Skipping seeding for serverSetting as it already exists key=culture Skipping seeding for serverSetting as it already exists key=search Migration complete
CrazyWolf13
CrazyWolf13โ€ข2w ago
That means the migration was successful so my fix worked, now after restarting the homarr service it should work again.
Dok
Dokโ€ข7d ago
I gave up and just recreated the Homarr LXC ๐Ÿ˜„
ficcoficco
ficcoficcoโ€ข6d ago
@CrazyWolf13 i update right now, and problem isnt fixed, so, miss i something?
CrazyWolf13
CrazyWolf13โ€ข6d ago
@ficcoficco You are right, weirdly. No idea why it worked for me on my prod instance. I've just been able to replicate your problem when upgrading from v1.5.0 to v1.7.9. as one can see in the below log, the migrations seems to be run successfully, however it does not fix, so I kindly request @Meierschlumpf / @Manicraft1001 To look again into this. We literally use the exact same migration command as you in the dockerfile and I really cannot get any valid point, why this issue should be on our scripts' side. https://pastebin.com/1QVAdgqm
Pastebin
Feb 25 23:04:51 homarr systemd[1]: Stopped homarr.service - Homarr ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
monke
monkeOPโ€ข6d ago
I did exactly the same haha
Manicraft1001
Manicraft1001โ€ข6d ago
@CrazyWolf13 do you... - run the migration on every Homarr startup? If no, please do so. - run the migration on the same sqlite as you use for the application?
CrazyWolf13
CrazyWolf13โ€ข6d ago
@Manicraft1001 Yes, again, we use nearly exactly the same startup as your docker entrypoint does. https://github.com/community-scripts/ProxmoxVE/blob/main/install/homarr-install.sh#L87-L102 I think so? Our DB is located in /opt/homarr_db/db.sqlite
GitHub
ProxmoxVE/install/homarr-install.sh at main ยท community-scripts/Pro...
Proxmox VE Helper-Scripts (Community Edition) . Contribute to community-scripts/ProxmoxVE development by creating an account on GitHub.
Manicraft1001
Manicraft1001โ€ข6d ago
And from what version to what version does this problem happen? Can you reproduce it in Docker as well?
CrazyWolf13
CrazyWolf13โ€ข6d ago
I've not tested that. But can ofc. I think 1.5 to 1.7 it was
Dok
Dokโ€ข6d ago
yeah 1.5 to 1.6 was fine. upgrading to 1.7 seem to not work.
Manicraft1001
Manicraft1001โ€ข6d ago
Would be great if you can try to reproduce. We are very busy at the moment If you can reproduce it, send me the DB from 1.6 and I'll try to see what is going on Oh, and please remove any personal data or urls from the DB. Use public URLs if possible, so you don't "leak" any of your private setup
ficcoficco
ficcoficcoโ€ข6d ago
im on 1.6 updated without problem from 1.5.. in my setup, problem is from 1.6 to 1.7
CrazyWolf13
CrazyWolf13โ€ข6d ago
Pastebin
2025-02-26 19:37:27 homarr | Starting with UID='0', GID='0'2025-02...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Manicraft1001
Manicraft1001โ€ข6d ago
This log is from...? Except line 2, it looks normal to me
CrazyWolf13
CrazyWolf13โ€ข6d ago
Docker-log @Manicraft1001 Can't really reproduce on docker :/ I'll reproduce on LXC and send the db ๐Ÿ™‚
Manicraft1001
Manicraft1001โ€ข6d ago
Thanks for debugging. Then it's likely an issue in the script. Good to know Do you properly persist /appdata?
CrazyWolf13
CrazyWolf13โ€ข6d ago
While I totally agree, it's kind of a mystery to me, everything in that matter is so similar to your startup, though maybe something pops up in the db ๐Ÿ™‚
Manicraft1001
Manicraft1001โ€ข6d ago
Not sure how Proxmox handles storage
CrazyWolf13
CrazyWolf13โ€ข5d ago
@Manicraft1001 Most likely I found the issue. Why the heck is your migration now writing to a subfolder:
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
Since v1.5.0 or v1.6.0 this seems to create a new folder in /opt/homarr_db/migrations/migrations/sqlite instead of /opt/homarr_db/migrations/sqlite Did you change anything on homarr side in this matter? We temp. solved it with a recursive copy, though this seems a bit odd.
Meierschlumpf
Meierschlumpfโ€ข5d ago
Actually this one is new since last week:
{
DB_URL:
// Fallback to the default sqlite file path in production
commonEnv.NODE_ENV === "production" && isDriver("better-sqlite3")
? z.string().default("/appdata/db/db.sqlite")
: z.string().nonempty(),
}
{
DB_URL:
// Fallback to the default sqlite file path in production
commonEnv.NODE_ENV === "production" && isDriver("better-sqlite3")
? z.string().default("/appdata/db/db.sqlite")
: z.string().nonempty(),
}
Previously we did not fallback to /appdata/db/db.sqlite, not sure if that is also relevant? Not sure why it would have two times migrations
CrazyWolf13
CrazyWolf13โ€ข5d ago
hmm I see. Though the DB is picked up fine in our folder /opt/homarr_db/db.sqlite. Anyway, we fixed that by just copying the migration files a folder up. Just wanted to see if maybe something on your side changed.
Dok
Dokโ€ข3d ago
@CrazyWolf13 1.7 --> 1.8 broke again when I ran update command on the LXC. Is there anything specific I need to do to fix it? ๐Ÿ˜„
Meierschlumpf
Meierschlumpfโ€ข3d ago
Oh no ๐Ÿซฃ Yet sgain a problem with migration?
CrazyWolf13
CrazyWolf13โ€ข3d ago
restart the service a second time and it should work? e.g. reboot the lxc or the service homarr. tested and for me that worked ๐Ÿ™‚ i'll take a look at doing this directly during update.
Dr0PeR
Dr0PeRโ€ข3d ago
Before update mine, I taked a backup, then update and same result as update from 1.6 to 1.7. Now I think I'll stay on 1.7 forever :'), It works fine so no problem for me, just, dont update and keep it outside internet until someone (homarr devs or lxc script maintainer) fix this.
CrazyWolf13
CrazyWolf13โ€ข3d ago
it's fixed ๐Ÿ™‚ didn't I post here? wait where did my message go?
Manicraft1001
Manicraft1001โ€ข3d ago
It was deleted because you mentioned too many people We block that due to recent spam attempts
CrazyWolf13
CrazyWolf13โ€ข3d ago
Oh I see. can so shall I not ping them or can I split it up into multiple messages?
Manicraft1001
Manicraft1001โ€ข3d ago
Split up if possible
CrazyWolf13
CrazyWolf13โ€ข3d ago
@Dok @Dr0PeR
Hi y'all A fix has been implemented and the next homarr release has been made, so now you can all update, using the update command or re-running the installation command on our website. If anyone still sees the application-error page after the update, just restart the homarr service or reboot the LXC. (PR merged.) @fcpwiz @ficcoficco @Magickaiser @monke @Snail02
Dr0PeR
Dr0PeRโ€ข3d ago
@CrazyWolf13 Ok, I'll try right now It's working ;D after the update you need to restart the container and that's it
Manicraft1001
Manicraft1001โ€ข3d ago
Nice to know. Can we mark this as resolved then?
Dr0PeR
Dr0PeRโ€ข3d ago
I think so. Thanks for all the support, both from the devs and the maintainer and the rest of the users who have helped.

Did you find this page helpful?