karlomikus / bar-assistant

Bar assistant is a all-in-one solution for managing your home bar
https://barassistant.app
MIT License
526 stars 22 forks source link

Registration failing #302

Closed gabesword closed 2 months ago

gabesword commented 2 months ago

Describe the bug After following the instructions and installing via the docker method, I am getting the following message when trying to register: NetworError when attempting to fetch resource.

To Reproduce Try a fresh docker install and register

Versions:

Additional context, log outputs... The docker is running on a headless Ubuntu server instance. I am connecting to it from a PC on the network

karlomikus commented 2 months ago

Hello, can you check logs: docker compose logs bar-assistant. Also check you browser network tab/console for error information.

gabesword commented 2 months ago

The Firefox Browser Console isn't logging any error or warning.

Here is the docker log info:

bar-assistant-1 | _
bar-assistant-1 | |@@@g

bar-assistant-1 | |@@ <@@g ~~,
bar-assistant-1 | |@@ @@@@a
@@|
bar-assistant-1 | |@@ @@@@@@@ @@|
bar-assistant-1 | |@@ @@@@@@@@@@@@@@@@@@@|
bar-assistant-1 | |@@ @@@@@@@@" @@|
bar-assistant-1 | |@@ @@@@@P @@|
bar-assistant-1 | |@@
~@@P @@|
bar-assistant-1 | |@@@@P
bar-assistant-1 |
bar-assistant-1 |
bar-assistant-1 | ggggggggggggg
bar-assistant-1 | BBBBBBBBBBBBN
bar-assistant-1 |
bar-assistant-1 | bar-assistant-1 | [ENTRYPOINT] Starting Bar Assistant, this can take a few minutes depending on the system... bar-assistant-1 | [ENTRYPOINT] User uid: 1000 bar-assistant-1 | [ENTRYPOINT] User gid: 1000 bar-assistant-1 | bar-assistant-1 | INFO Nothing to migrate.
bar-assistant-1 | bar-assistant-1 | [ENTRYPOINT] Enabling database WAL mode... bar-assistant-1 | wal bar-assistant-1 | Clearing index and syncing... bar-assistant-1 | [ENTRYPOINT] Adding routes and config to cache... bar-assistant-1 | bar-assistant-1 | INFO Configuration cached successfully.
bar-assistant-1 | bar-assistant-1 | bar-assistant-1 | INFO Routes cached successfully.
bar-assistant-1 | bar-assistant-1 | [ENTRYPOINT] Application ready bar-assistant-1 | [ENTRYPOINT] Starting PHP-FPM and nginx bar-assistant-1 | [19-Jul-2024 13:16:35] NOTICE: fpm is running, pid 29 bar-assistant-1 | [19-Jul-2024 13:16:35] NOTICE: ready to handle connections

gabesword commented 2 months ago

Here is what it looks like: BA

karlomikus commented 2 months ago

Please check Network tab in your browser. There should be a POST request to /api/register with some info.

If there are no error logs in docker when you click register, the request doesn't reach the api server so it's some error on client side.

gabesword commented 2 months ago

I am not sure what you mean about Network tab. I'm not familiar with that.

I tried it in Chrome and the error switched to Failed to fetch.

The POST request to /api/register, does that mean there should be an api directory somewhere in my install or is that going out to the web?

karlomikus commented 2 months ago

When you open browser console with F12, there is Network tab that will show all requests.

Snimka zaslona 2024-07-20 190521

So the steps would be:

Also can you share your .env. I have a feeling this is related to mixing HTTP/HTTPS. Please make sure that both API and your salt rim are using the same HTTP scheme.

gabesword commented 2 months ago

I have it working now. Your thought about it being an HTTP/HTTPS mix led me to just using HTTP and IP address instead of a hostname in the .env. That did the trick. Thanks!