Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Stuck on "Initializing the connection to the local database..." Fresh Docker install #2893

Open
2 tasks done
davemcmath opened this issue Jun 17, 2024 · 29 comments · Fixed by #4375
Open
2 tasks done
Labels
bug Something isn't working

Comments

@davemcmath
Copy link

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

A bug happened!

Fresh docker install with

docker run --pull=always --restart=unless-stopped -d -p 5006:5006 -v /dockerdata/actual_data/:/data --name my_actual_budget docker.io/actualbudget/actual-server:latest

with a data folder provisioned and UI fails to load and is stuck on "Initializing the connection to the local database..."

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Chrome, Safari

Operating System

Other

@davemcmath davemcmath added the bug Something isn't working label Jun 17, 2024
@youngcw
Copy link
Member

youngcw commented Jun 17, 2024

Can you test out edge.actualbudget.org? There was a change recently that may help your issue.

@davemcmath
Copy link
Author

I wasn't sure if you meant go to that URL, or try with the edge release version, so I did both. When I go to that URL it works fine with my browsers, Chrome and Safari.

Then tried Docker on latest edge release.

So I deleted all my data files and tried with

docker run --pull=always --restart=unless-stopped -d -p 5006:5006 -v /dockerdata/actual_data/:/data --name my_actual_budget docker.io/actualbudget/actual-server:edge

It still sits there with this.....

image

Ran without the -d

user@hostname:/dockerdata$ docker run --pull=always --restart=unless-stopped -p 5006:5006 -v /dockerdata/actual_data/:/data --name my_actual_budget docker.io/actualbudget/actual-server:edge
edge: Pulling from actualbudget/actual-server

Digest: sha256:5d49b87080d446be6e1f9e8fc8feffed3eb20db22f41cf1f7bfb98d6b479a598
Status: Image is up to date for actualbudget/actual-server:edge
Checking if there are any migrations to run for direction "up"...
Migrations: DONE
Listening on :::5006...

That's all I get from the logs. Is there anyway to get more verbose logs from the docker image?

@ddz99
Copy link

ddz99 commented Jun 19, 2024

I have the same bug. It's specifically a bug with Safari. running on MacOS Sonoma 14.0.

Works fine on Opera on my machine.

@davemcmath
Copy link
Author

I tried with Chrome on MacOS and couldn't get it working there either.

To clarify I wasn't using HTTPS as it was on my internal network.

Now I have just reconfigured to use HTTPS and it now works fine with Chrome and Safari and jumps immediately to the set a password page.

If HTTP is meant to work out of the box I still think there is a bug somewhere here.

@newtonfav
Copy link

I'm having same issue, stuck at "Initializing the connection to the local database..." I'm running the repo on my PC locally. should i open a new issue for this @youngcw

@youngcw
Copy link
Member

youngcw commented Jun 27, 2024

@newtonfav Only if your issue is different than this.

@newtonfav
Copy link

@newtonfav Only if your issue is different than this.

same, just that I'm not running on docker

@youngcw
Copy link
Member

youngcw commented Jun 27, 2024

@davemcmath If you are on anything apple make sure you are using https, and probably a non self-signed cert. Apple browsers are really picky about certs, and Actual doesn't work properly without https.

@newtonfav
Copy link

Is there a guide on how i can run using https instead of http on local server?

@nyakojiru
Copy link

nyakojiru commented Oct 7, 2024

I'm on the same train. Can't use it on iOS with http. There should be optional parameters to be able to use Actual with http in development mode. I don't want to expose the service to the internet .

@hrv231
Copy link

hrv231 commented Oct 15, 2024

I'm having the same problem, running on docker, behind traefik proxy, with HTTPS.
I'm using it with a purchased domain and let's encrypt certificate.

I generally use Firefox, so when I open the link that takes me to Actual, at first shows the Initializing the connection to the local database... , then I refresh the page and quickly it takes me to the enter your password.

I believe there is a bug for sure.

Edit: added more details

@tibuski
Copy link

tibuski commented Feb 12, 2025

I wanted to give actual budget a try but I am facing the same issue on a fresh docker start ...

@Ralle001
Copy link

Ralle001 commented Feb 12, 2025

As I can see there is no changes.

Logs:
Checking if there are any migrations to run for direction "up"...
Migrations: DONE
Listening on :::5006...

Tried: Opera, Chrome, Edge

config.json:
{}

Still stuck on: "Initializing the connection to the local database…"

@tibuski
Copy link

tibuski commented Feb 12, 2025

FYI, I made it work by using https. It seems it's required.

@bo0tzz
Copy link

bo0tzz commented Feb 12, 2025

I suspect this issue is caused by the uBlock extension: uBlockOrigin/uBlock-issues#3527

@tibuski
Copy link

tibuski commented Feb 12, 2025

Just did a test disabling ublock and in private mode but got the same issue.

@bo0tzz
Copy link

bo0tzz commented Feb 12, 2025

In my case it happens if uBlock is installed at all, the disable button in the extension seems to make no difference.

@MikesGlitch
Copy link
Contributor

This should fix it: #4375

@fdfytr
Copy link

fdfytr commented Feb 15, 2025

This should fix it: #4375

It does not
Same error on Firefox linux
Tried to clean cache, redownloading latest image without resolving

@youngcw
Copy link
Member

youngcw commented Feb 15, 2025

This should fix it: #4375

It does not Same error on Firefox linux Tried to clean cache, redownloading latest image without resolving

@fdfytr you have to test out the PR or edge build. Latest won't have the fix until the next release.

@bibberp
Copy link

bibberp commented Feb 26, 2025

I'm still having the same problem even with the edge build

services:
  actual_server:
    image: docker.io/actualbudget/actual-server:edge
    ports:

      - '5006:5006'
    volumes:
      - /opt/actual/actual-data:/data
    healthcheck:
      # Enable health check for the instance
      test: ['CMD-SHELL', 'node src/scripts/health-check.js']
      interval: 60s
      timeout: 10s
      retries: 3
      start_period: 20s
    restart: unless-stopped

@MikesGlitch
Copy link
Contributor

I'm still having the same problem even with the edge build

services:
  actual_server:
    image: docker.io/actualbudget/actual-server:edge
    ports:

      - '5006:5006'
    volumes:
      - /opt/actual/actual-data:/data
    healthcheck:
      # Enable health check for the instance
      test: ['CMD-SHELL', 'node src/scripts/health-check.js']
      interval: 60s
      timeout: 10s
      retries: 3
      start_period: 20s
    restart: unless-stopped

Can you open devtools with F12/CTRL Shift I, and copy/paste the contents in here.

There's a chance you're cached on the old code - can you also try in incognito?

@bibberp
Copy link

bibberp commented Feb 27, 2025

192.168.1.220/:1 The Cross-Origin-Opener-Policy header has been ignored, because the URL's origin was untrustworthy. It was defined either in the final response or a redirect. Please deliver the response using the HTTPS protocol. You can also use the 'localhost' origin instead. See https://www.w3.org/TR/powerful-features/#potentially-trustworthy-origin and https://html.spec.whatwg.org/#the-cross-origin-opener-policy-header.Understand this errorAI i18n.ts:60 Unknown locale en-US, falling back to en

same for incognito -- seems like it really wants https? I thought that it supported local http connections?

tried on MacBook with safari and win10 with chrome

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Feb 27, 2025

same for incognito -- seems like it really wants https? I thought that it supported local http connections?

It does if it comes from localhost. localhost is treated as a secure context. There's some info here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#when_is_a_context_considered_secure

You should have seen these two messages in your console:

Backend: Attempting to connect to client
Backend: Client connected

If you didn't it suggests you're not on the latest edge version - you may want to do another docker pull.

@bibberp
Copy link

bibberp commented Feb 27, 2025

Thanks for your help!

So I want to make sure I understand right.. if I have it running on a separate computer in my home than what I'm accessing it on, I can't access it via http? (From my phone for example)

Just repulled the edge version, so unless something wild is happening I believe I have the most most current it could be

@MikesGlitch
Copy link
Contributor

Yeah, it's primarily for this reason: https://actualbudget.org/docs/troubleshooting/shared-array-buffer/

Browsers are smart enough to know localhost or 127.0.0.1 is a secure context but anything else needs a certificate.

@fdfytr
Copy link

fdfytr commented Mar 8, 2025

This should fix it: #4375

It does not Same error on Firefox linux Tried to clean cache, redownloading latest image without resolving

@fdfytr you have to test out the PR or edge build. Latest won't have the fix until the next release.

updated release via docker - same problem
linux firefox spinning
android tablet and mac has no issues

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Mar 8, 2025

updated release via docker - same problem linux firefox spinning android tablet and mac has no issues

Are you using the latest edge docker image? If so are you using https? And is it localhost or is it something else like 192.x.x.x?

@MikesGlitch MikesGlitch reopened this Mar 8, 2025
@bo0tzz
Copy link

bo0tzz commented Mar 8, 2025

On my end (running v25.3.1) this is fixed by now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.