🐛Cannot create user
Describe the bug I want to create a first user via browser. All help is welcome :)
To Reproduce
- Add all user info
- Click on "Register"
Expected behavior A user is created.
Screenshots
Logs 172.23.0.3 - - [11/Dec/2024:18:24:15 +0000] "POST /api/auth/register HTTP/1.1" 500 44 "https://tickets.xxxyyy.de/auth/register" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0" ::1 - 11/Dec/2024:18:24:14 +0000 "POST /index.php/auth/register" 500 [2024-12-11 18:24:22] production.DEBUG: Stripe secret key is not set in the configuration file. Payment processing will not work. [2024-12-11 18:24:22] production.ERROR: HiEvents\DomainObjects\Generated\AccountUserDomainObjectAbstract::setAccountId(): Argument #1 ($account_id) must be of type int, string given, called in /app/backend/app/Repository/Eloquent/BaseRepository.php on line 406 {"exception":"[object] (TypeError(code: 0): HiEvents\DomainObjects\Generated\AccountUserDomainObjectAbstract::setAccountId(): Argument #1 ($account_id) must be of type int, string given, called in /app/backend/app/Repository/Eloquent/BaseRepository.php on line 406 at /app/backend/app/DomainObjects/Generated/AccountUserDomainObjectAbstract.php:65) [stacktrace] #0 /app/backend/app/Repository/Eloquent/BaseRepository.php(406): HiEvents\DomainObjects\Generated\AccountUserDomainObjectAbstract->setAccountId() #1 /app/backend/app/Repository/Eloquent/BaseRepository.php(334): HiEvents\Repository\Eloquent\BaseRepository->hydrateDomainObjectFromModel() #2 /app/backend/app/Repository/Eloquent/BaseRepository.php(146): HiEvents\Repository\Eloquent\BaseRepository->handleSingleResult() #3 /app/backend/app/Services/Handlers/Account/CreateAccountHandler.php(129): HiEvents\Repository\Eloquent\BaseRepository->findFirstWhere() #4 /app/backend/app/Services/Handlers/Account/CreateAccountHandler.php(65): HiEvents\Services\Handlers\Account\CreateAccountHandler->getExistingUser() #5 /app/backend/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(30): HiEvents\Services\Handlers\Account\CreateAccountHandler->HiEvents\Services\Handlers\Account\{closure}() #6 /app/backend/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(456): Illuminate\Database\Connection->transaction() #7 /app/backend/app/Services/Handlers/Account/CreateAccountHandler.php(53): Illuminate\Database\DatabaseManager->__call() #8 /app/backend/app/Http/Actions/Accounts/CreateAccountAction.php(40): HiEvents\Services\Handlers\Account\CreateAccountHandler->handle() #9 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): HiEvents\Http\Actions\Accounts\CreateAccountAction->__invoke() #10 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction() #11 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Illuminate\Routing\ControllerDispatcher->dispatch() #12 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Route.php(206): Illuminate\Routing\Route->runController() #13 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\Routing\Route->run() #14 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Routing\Router->Illuminate\Routing\{closure}() #15 /app/backend/app/Http/Middleware/SetUserLocaleMiddleware.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #16 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): HiEvents\Http\Middleware\SetUserLocaleMiddleware->handle() #17 /app/backend/app/Http/Middleware/SetAccountContext.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #18 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): HiEvents\Http\Middleware\SetAccountContext->handle() #19 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #20 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Routing\Middleware\SubstituteBindings->handle() #21 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(159): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #22 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(125): Illuminate\Routing\Middleware\ThrottleRequests->handleRequest() #23 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(87): Illuminate\Routing\Middleware\ThrottleRequests->handleRequestUsingNamedLimiter() #24 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Routing\Middleware\ThrottleRequests->handle() #25 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #26 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\Pipeline\Pipeline->then() #27 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\Routing\Router->runRouteWithinStack() #28 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\Routing\Router->runRoute() #29 /app/backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\Routing\Router->dispatchToRoute() #30 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch() #31 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() #32 /app/backend/app/Http/Middleware/HandleDeprecatedTimezones.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #33 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): HiEvents\Http\Middleware\HandleDeprecatedTimezones->handle() #34 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #35 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #36 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle() #37 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #38 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(50): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #39 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\TrimStrings->handle() #40 /app/backend/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #41 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\ValidatePostSize->handle() #42 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #43 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() #44 /app/backend/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #45 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\HandleCors->handle() #46 /app/backend/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #47 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\TrustProxies->handle() #48 /app/backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #49 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then() #50 /app/backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #51 /app/backend/public/index.php(51): Illuminate\Foundation\Http\Kernel->handle() #52 {main} "} 172.23.0.3 - - [11/Dec/2024:18:24:22 +0000] "POST /api/auth/register HTTP/1.1" 500 44 "https://tickets.xxxxyyyyy.de/auth/register" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0" 127.0.0.1 - 11/Dec/2024:18:24:22 +0000 "POST /index.php/auth/register" 500
Desktop:
- OS: macOS
- Browser Safari
Hi.Events Version and platform Version: Very recent version. How can I check? Platform: Docker all-in-one Image
Additional context I use traefik as reverse proxy. API is reachable and announced via env-file.
Hi @mpmario,
Did you get this working?
Unfortunately not. It does not seem to be a communication error, but an internal application error .....??
From the error is looks like you have an existing user in a non-complete state. I'd recommend deleting wiping the DB and starting over.
I have the same issue with an instance deployed via Digital Ocean. Not sure if I missed something but I can't create a user.
I have the same problem on separated services env (backend pod different of frontend pod), when I use all in one pod, it works. The main problem looks like cross-origin route to post user info. Check log on your web browser, on me the first call with options fail. (I have tested on edge and Firefox, both has same problem).
Ohh, sorry, you said that this problem happened with all-in-one image, but for it is happening on env with them separated. Did you tried to use alpha-1.0 version?
i also have the same situation when i deploy via digitalocean, don't know how to do
I have tested the DigitalOcean deployment and it works as expected. Are you using the DigitalOcean App Platform, or using your own Droplets?
I have looked into this issue again. Thanks for all the comments so far! I reinstalled the system from scratch with the latest version, but the problem still persists.
Some additional information about my setup:
- Platform: Raspberry Pi
- Architecture: ARM32
What I find confusing is the following database error mentioned above:
"Argument https://github.com/HiEventsDev/Hi.Events/pull/1 ($account_id) must be of type int, string given".
Does anyone have an idea what could be causing this?
I just tested it on x64 using a VM on Proxmox with Docker, and it worked right away. So it’s probably an issue specific to the Raspberry Pi.