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

Fresh desktop install cannot connect to any servers #226

Open
codevski opened this issue Feb 27, 2024 · 16 comments
Open

Fresh desktop install cannot connect to any servers #226

codevski opened this issue Feb 27, 2024 · 16 comments

Comments

@codevski
Copy link

Description

So I have a docker selfhosted instance which works fine in the browser but when I try to setup desktop app I cannot seem to get it to connect. I have also tried connecting to official (saw someone say to test it regarding another issue someone was having and I still cannot connect.

Vikunja Version

"v0.23.0"

Browser and version

Desktop: Both Flatpak and AUR bin 0.23.0-1

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

image

@kolaente
Copy link
Member

Can you check what the API response is when you set the url? (CTRL+Shift+I and then "network")

@Protarios
Copy link

Protarios commented Mar 1, 2024

Here a Screenshot from my desktop app. I experience the same issue.
(Replaced the domain name with ---- after the request of couse)

It worked perfect until the update where backend and frontend were moved into one docker container.
Frontend works well in Firefox aswell as android app.

Screenshot_20240301_090152

@kolaente
Copy link
Member

kolaente commented Mar 1, 2024

Did you enable cors?

@Protarios
Copy link

Let me check. It stopped working, when I updated from the seperate frontend/backend containers to the new integrated one.

@kolaente
Copy link
Member

kolaente commented Mar 1, 2024

As mentioned in the release notes, the cors settings were changed in that release.

@Protarios
Copy link

I am playing around with cors and port settings a bit, maybe the issue lies there.

This is the exact step in the code where it stops.
Screenshot_20240301_091144

@kolaente
Copy link
Member

kolaente commented Mar 1, 2024

The network error from the screenshot you sent before said "CORS Error". That's a pretty strong indication that you didn't enable CORS. Does it work if you enable it?

@Protarios
Copy link

No, but I think the issue may lie within reverse proxy and ports settings.
Only strange that Vikunja App connects without any issue.

@kolaente
Copy link
Member

kolaente commented Mar 1, 2024

In the dev tools, what's the value of the access-control-allow-origin header in the response of the request to /info?

@Protarios
Copy link

Uploading Screenshot_20240301_102834.png…

@cerealconyogurt
Copy link

Hey! I have the same issue. I have a self-hosted instance running and working fine in the browser but when I try to setup desktop app I cannot seem to get it to connect. I tried my instance and the official one with both having same access problem.

image

@kolaente
Copy link
Member

kolaente commented Mar 3, 2024

@cerealconyogurt What do you see in the dev tools? (ctrl + shift + I)

@brunotenisi
Copy link

brunotenisi commented Mar 20, 2024

I have the same issue. I have a self-hosted instance running and working fine in the browser and in the android app, but when I try to setup desktop app I cannot seem to get it to connect. I tried my instance (flatpak and .RPM) and the official one with both having same access problem.
In the dev tools, there is this error message:
Pasted image

I tried to create the file in the server folder where the Vinkunja container is installed, but I was unsuccessful in activating this cors.

cors:
enable: true
origins:
- "*"

I put it this way, as suggested in the documentation, am I doing something wrong?

@brunotenisi
Copy link

I tried to move the config.yml to /etc/vikunja in the server, but without success

@kolaente
Copy link
Member

@brunotenisi Does it work if you set VIKUNJA_CORS_ENABLE? The default value for origins is *.

@brunotenisi
Copy link

@brunotenisi Does it work if you set VIKUNJA_CORS_ENABLE? The default value for origins is *.

Hello @kolaente, thank you for reply. I found the answer in a post in the vikunja community, here.

The fix was to add VIKUNJA_CORS_ENABLE: true to the docker compose environment.

After this, had to take the dockers down, and put them up again.

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

No branches or pull requests

5 participants