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

🐛After Docker deployement, when register "An unexpected error occurred..." #336

Open
vfbfreeman opened this issue Dec 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@vfbfreeman
Copy link

Hello,

I have followed this deployement guide "https://github.com/HiEventsDev/Hi.Events/tree/develop/docker/all-in-one".
No problem.... Containers have been created ans run.
I'm going to the register page, put my informations, and afer i'm clicking on register :

image

Any ideas ?

OS : Linux (ubuntu 24.04)

No firewall restriction.

@vfbfreeman vfbfreeman added the bug Something isn't working label Dec 28, 2024
@daveearley
Copy link
Contributor

Hi @vfbfreeman,

Can you see any errors in the frontend/backend container logs, or the browser console?

@dOcSeRFi
Copy link

dOcSeRFi commented Dec 31, 2024

Hi.

I had the exact same issue. The all-in-one docker image, and .env is setup to use only port 80 (http) inside the container. And the API gives CORS error. And status code 500.

So the only way the all-in-one will work is to run it via a domain with https, or if you have a local nameserver with ssl/https support. Here is a copy of the .env file I managed to get to work:.(The actual domain-name has been redacted, and replaced with example.com. The rest is same).

The exact console error is this:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://192.168.69.174:8123/api/auth/register (Reason: CORS request did not succeed). Status code: (null).


.env file for Hi.Events all-in-one docker image.

# See the README.md file for informaiton on how to generate the JWT_SECRET and APP_KEY
APP_KEY=base64:puOJbTaB8SEC3vVRPfnXDGhz99wnEiTTPtgv1X073Hw=
JWT_SECRET=TaZ09mQ5AiJNHRweIB4r4kTIdmlNBGndRKgRHr9nZ7o=

# Frontend variables (Always prefixed with VITE_)
VITE_FRONTEND_URL=https://example.com
VITE_API_URL_CLIENT=https://example.com/api
VITE_API_URL_SERVER=http://localhost:8000/api
VITE_STRIPE_PUBLISHABLE_KEY=pk_test

# Backend variables
# These values may not be suitable for production environments.
# Please refer to the documentation for more information on how to configure these values
# https://hi.events/docs/getting-started/deploying
LOG_CHANNEL=stderr
QUEUE_CONNECTION=sync
MAIL_MAILER=log

FILESYSTEM_PUBLIC_DISK=public
FILESYSTEM_PRIVATE_DISK=local

APP_CDN_URL=https://example.com/storage
APP_FRONTEND_URL=https://example.com

DATABASE_URL=postgresql://postgres:secret@postgres:5432/hi-events

@vfbfreeman
Copy link
Author

I followed your instructions.... But unfortunately it didn't work.
I still have the same problem.
Good... I think I'll test another solution.

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

No branches or pull requests

3 participants