Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

Unable to use this with self-hosted actual #10

Open
fivestones opened this issue Feb 8, 2023 · 2 comments
Open

Unable to use this with self-hosted actual #10

fivestones opened this issue Feb 8, 2023 · 2 comments

Comments

@fivestones
Copy link

Now that actual is open-source, I'm trying to use this node-api with the self-hosted version.
The documentation states that I must first be running actual locally. However, with the self-hosted version of actual the closest I get to running it locally is by going to the site where it is hosted in the browser.

I see that connection.js is trying to make a socket connection to my locally running actual. However, it fails since actual is just loaded in firefox, despite the fact that these are both local.

I also tried running this node-api on the server were actual is installed, and it too fails.

Error: Couldn't connect to Actual. Please run the app first.
    at init (/Users/username/node_modules/@actual-app/api/connection.js:44:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _run (/Users/username/node_modules/@actual-app/api/connection.js:90:5)

Is there still a way to use the api with the self-hosted version of actual?
@jlongster
Thanks!

@fivestones
Copy link
Author

I also tried to use this after installing and running actual locally from git with yarn, i.e.,

git clone https://github.com/actualbudget/actual-server.git
cd actual-server
yarn install
yarn start

Then went to localhost:5006 in the browser
Connected to my previous server on https://mydomain.com when it asked for a server
Downloaded my budget when presented with it

Then tried again with node-api, running on the same machine where I did yarn start, but I get the same error.

@fivestones
Copy link
Author

I figured out how to run the electron app (thanks to jlongster's comment in another issue):

Just do:

yarn rebuild-electron
yarn start

From the root and it should run!

So I got the electron app running, and then tried node-api from the same machine. I still get the same error as above.

I'm just lost as to how to debug this and find the problem. I tried setting up a debug session in visual studio, but didn't get very far with debugging something run from yarn.

Is there any way to use this api anymore with actual as it currently is?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant