Vikunja only loads login mask

Hey there!

I’ve finally managed to install vikunja front- and backend. At least so far that a login mask appears when accessing the site. While doing so there’s an error message saying “Network Error”.
2020-05-08 17_53_44-Vikunja
I’m able to give login-details or register myself. When I try to register a “Loading…”-message appears and disappears right away. That’s all that happens.

Does anybody know what that could be? My backend is reachable even though there are a few 404 Error in the terminal listing files in the webroot directory (js and css files as well as some images and fonts). The api url is given the index.html.

Gian

Hey Gian!

The error message you’re getting seems to indicate the frontend is not able to reach the api. Can you check in the network tab of your browser’s dev tools if the frontend tries to reach the correct url? It should be the one you set at the frontend.

You can also verify this by accessing the url you entered in the API_URL variable + /info with your browser, something like https://<your-server>/api/v1/info.

The 404s for asset files shouldn’t occur either, could you send a list of these?

Konrad

1 Like

According to the browser’s dev tools (network) the URL is correct and the connection to the api can be established:


My frontend has the URL “http://todo.domain.xyz:80”, the api is placed at “http://api.todo.domain.xyz:80”.

Accessing the backend (http://api.todo.domain.xyz:80/ as well as http://api.todo.domain.xyz:80/api/v1/info) results in the following:


There might be a problem with the “/api/v1” part of the URL. The frontend is placed in a DMZ on an apache server. The same webserver proxies the backend url to the backend server without the “/api/v1” on another port. The index.html has the “/api/v1” in it.

Starting vikunja and accessing the backend in a browser outputs the following in the terminal:

The api should not return html files at all, only json.

The request log you posted from the frontend seems to indicate the api is returning html, not json. For the test api request, you should get a response similar to this one.

Could it be api.todo.example.com is returning the frontend html? It should only proxy the api request.

Is there a special reason not to put the api and frontend under the same domain, since you seem to have a reverse proxy in place?

1 Like

You’re right. As of earlier trials there was a frontend instance active on the backend server. I’ve removed it now.

There had been an error in the proxy forwarding configuration too. Now this is solved and the /info json is accessible from api.todo.example.com/api/v1/info.

I didn’t get it to work with the config described in Reverse Proxy | Vikunja. Anything behind /api gave a “not found” error, so I thought trying it with a separate subdomain might be easier. Also, there is no json traffic at all this way. I might have misunderstood some part of the instruction of course.

Unfortunately, the behavior mentioned in the first post still persists. The network tab on the frontend now outputs the following:


Trying to register triggers a 405 error in the terminal vikunja is running in.

Accessing api.todo.example.com/api/v1:

Thank you a lot for your help so far, I really appreciate it!

That looks good so far though.

What is the error message? There should be one either in the browser (If you don’t see one in the ui, take a look at the browser console) or in the server logs.

Out of curiosity to hopefully improve the docs, what proxy are you using?

1 Like

Hi Konrad :slight_smile:

Seems to appear because there is no list or task at all (when not logged in), so the query has no result:

I’ve finally found the problem:


I had disabled the CORS header (I didn’t knew what it is for and wanted to deactivate any additional feature to focus on installation). Might be an idea to mark required options in the configfile, explain it a little bit further in the docs or to catch it in the frontend if disabled.
I’ve reenabled the CORS option to solve my problem. Now I’m able to register and login.

The proxy I’m using is an apache2.

Thank you very much for your support :smiley:

Glad you could solve it!

I’ve added a bit more explanation to the docs about cors settings.

1 Like