Cannot sign up. #384
|
I cannot sign up on my first startup of the application. Server OS: Alpine Linux Host OS: Arch Linux Host Browser: Firefox. I get these two errors as highlighted in the attached image. Thanks |
Replies: 19 comments 12 replies
|
Check the logs from browser console & server side. |
|
Based on what browser you use, google it to find how to get browser console log. IN chrome, its under three dot-->More Tools-->Developer Tools-->Console. run below command to get the container id and then run second command. docker logs <container_name_or_id> |
|
Thank you for your help, I will do this tomorrow and mark this as the
answer.
…On Mon., Dec. 1, 2025, 9:33 p.m. CodeWithCJ, ***@***.***> wrote:
The server logs are repeatedly reporting [2025-12-02T01:58:58.647Z]
[ERROR] Encryption key (SPARKY_FITNESS_API_ENCRYPTION_KEY) has an invalid
length. Expected 64 hex characters or 44 Base64 characters. Update your
environment variable and try again. ***@***.*** injecting env (0)
from ../.env – [tip] encrypt with dotenvx: https://dotenvx.com
This is your problem. Read the doc or example env variable to find out how
to generate encryption key and supply to the docker
—
Reply to this email directly, view it on GitHub
<#384 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGIL7LDRCO72CHGQHVCCT37T27HAVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMJTGA3DQNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
|
I did not, unfortunately. It's been a while, so I should probably update
the program and revisit it
Are you having the same issue?
|
|
@MTtheman @ovizii Use the latest version and and let me know if you run into any issues. You can also join the discord to get help from others as well |
|
I tried again with the latest updates and still had errors.
…On Fri, 6 Mar 2026 at 04:26, ovizii ***@***.***> wrote:
My issues had some similarities to yours, so I had hoped I could figure
something out if you had a solution for your issue :-)
—
Reply to this email directly, view it on GitHub
<#384 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGIL4TLCRI6DAW2MAB64D4PKKVFAVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBSGEYDAOI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
|
I am running on docker. I have attached a video with the browser console,
my .env file, and the server logs.
2026-03-07 09-11-59.mkv
<https://drive.google.com/file/d/1C9Y4aTycFsbhFTaO2zaquXiaeNSWhyUO/view?usp=drive_web>
On Sat, 7 Mar 2026 at 09:06, CodeWithCJ ***@***.***> wrote:
I need to know the exact steps you followed, env file. Error from browser
console and server.
Are you using docker or directly running in the server etc.
—
Reply to this email directly, view it on GitHub
<#384 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGILZZTVVW3UVUWZ7RK6T4PQUHPAVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGMYTENA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '334',
routine: 'auth_failed'
}
***@***.*** injecting env (0) from ../.env -- tip: 📡 add observability to secrets: https://dotenvx.com/ops
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: http://localhost:3010
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
Failed to start server: error: password authentication failed for user "sparky"
at /app/SparkyFitnessServer/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSystemClient (/app/SparkyFitnessServer/db/poolManager.js:71:18)
at async applyMigrations (/app/SparkyFitnessServer/utils/dbMigrations.js:10:18) {
length: 102,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '334',
routine: 'auth_failed'
}
***@***.*** injecting env (0) from ../.env -- tip: 🛠️ run anywhere with `dotenvx run -- yourcommand`
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: http://localhost:3010
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
Failed to start server: error: password authentication failed for user "sparky"
at /app/SparkyFitnessServer/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSystemClient (/app/SparkyFitnessServer/db/poolManager.js:71:18)
at async applyMigrations (/app/SparkyFitnessServer/utils/dbMigrations.js:10:18) {
length: 102,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '334',
routine: 'auth_failed'
}
***@***.*** injecting env (0) from ../.env -- tip: ⚙️ load multiple .env files with { path: ['.env.local', '.env'] }
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: http://localhost:3010
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
Failed to start server: error: password authentication failed for user "sparky"
at /app/SparkyFitnessServer/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSystemClient (/app/SparkyFitnessServer/db/poolManager.js:71:18)
at async applyMigrations (/app/SparkyFitnessServer/utils/dbMigrations.js:10:18) {
length: 102,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '334',
routine: 'auth_failed'
}
|
|
Refer the sample setup here and give it a one more time. frontend url should be 3004 not 3010 ( i will fix the example.env file) Also clear the DB directory and try again. looks like it couldn't connect to DB. either DB is not up or its password is wrong. |
|
I can't access your video from the google drive. probably share as public view. |
|
Oh! Silly me! Try viewing the video once more.
…On Sat, 7 Mar 2026 at 11:06, CodeWithCJ ***@***.***> wrote:
I can't access your video from the google drive. probably share as public
view.
—
Reply to this email directly, view it on GitHub
<#384 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGIL2K6YSWSJ3NYED5I4D4PRCKFAVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGM4TCMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
|
Thanks for the video. couldn't see the log properly in the video. but i guess do clean install one more time using the sample setup link I provided. |
|
Alright. I will report back in about 10 minutes.
…On Sat, 7 Mar 2026 at 11:13, CodeWithCJ ***@***.***> wrote:
Thanks for the video. couldn't see the log properly in the video. but i
guess do clean install one more time using the sample setup link I provided.
—
Reply to this email directly, view it on GitHub
<#384 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGIL2MLIKLDJ6UB75YG4T4PRDB3AVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGM4TKMA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
|
I tried with your files, it has less errors now. But it still is not
working.
…On Sat, 7 Mar 2026 at 11:21, MLT Thomas ***@***.***> wrote:
Alright. I will report back in about 10 minutes.
On Sat, 7 Mar 2026 at 11:13, CodeWithCJ ***@***.***> wrote:
> Thanks for the video. couldn't see the log properly in the video. but i
> guess do clean install one more time using the sample setup link I provided.
>
> —
> Reply to this email directly, view it on GitHub
> <#384 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXBGIL2MLIKLDJ6UB75YG4T4PRDB3AVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGM4TKMA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***
> com>
>
|
|
I will need your compose, env file , log from server and browser to troubleshoot. There is something you didnt do or I missed in the sample setup. Only way is to see what you have and go from there. The sample setup is copy paste from my prod and i removed only my personal details and keys. |
|
This should be everything.
On Sat, 7 Mar 2026 at 11:43, CodeWithCJ ***@***.***> wrote:
I will need your compose, env file , log from server and browser to
troubleshoot. There is something you didnt do or I missed in the sample
setup. Only way is to see what you have and go from there. The sample setup
is copy paste from my prod and i removed only my personal details and keys.
—
Reply to this email directly, view it on GitHub
<#384 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGIL6Z6MN2A5VDAEMQK634PRGSBAVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGQYTINY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
port: 5432
}
***@***.*** injecting env (0) from ../.env -- tip: ⚙� override existing env vars with { override: true }
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
Invalid configured frontend URL: 192.168.1.12
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: 192.168.1.12
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
Failed to start server: Error: connect ECONNREFUSED 172.20.0.2:5432
at /app/SparkyFitnessServer/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSystemClient (/app/SparkyFitnessServer/db/poolManager.js:71:18)
at async applyMigrations (/app/SparkyFitnessServer/utils/dbMigrations.js:10:18) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '172.20.0.2',
port: 5432
}
***@***.*** injecting env (0) from ../.env -- tip: � prevent building .env in docker: https://dotenvx.com/prebuild
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: 192.168.1.12
Invalid configured frontend URL: 192.168.1.12
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
Failed to start server: Error: connect ECONNREFUSED 172.20.0.2:5432
at /app/SparkyFitnessServer/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSystemClient (/app/SparkyFitnessServer/db/poolManager.js:71:18)
at async applyMigrations (/app/SparkyFitnessServer/utils/dbMigrations.js:10:18) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '172.20.0.2',
port: 5432
}
***@***.*** injecting env (0) from ../.env -- tip: 🗂� backup and recover secrets: https://dotenvx.com/ops
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: 192.168.1.12
Invalid configured frontend URL: 192.168.1.12
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
Failed to start server: Error: connect ECONNREFUSED 172.20.0.2:5432
at /app/SparkyFitnessServer/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSystemClient (/app/SparkyFitnessServer/db/poolManager.js:71:18)
at async applyMigrations (/app/SparkyFitnessServer/utils/dbMigrations.js:10:18) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '172.20.0.2',
port: 5432
}
***@***.*** injecting env (0) from ../.env -- tip: ⚙� enable debug logging with { debug: true }
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: 192.168.1.12
Invalid configured frontend URL: 192.168.1.12
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
Failed to start server: Error: connect ECONNREFUSED 172.20.0.2:5432
at /app/SparkyFitnessServer/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSystemClient (/app/SparkyFitnessServer/db/poolManager.js:71:18)
at async applyMigrations (/app/SparkyFitnessServer/utils/dbMigrations.js:10:18) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '172.20.0.2',
port: 5432
}
***@***.*** injecting env (0) from ../.env -- tip: ⚙� suppress all logs with { quiet: true }
[Secrets] Checking for secret files to load...
[Secrets] No secrets loaded from files.
DEBUG: SPARKY_FITNESS_FRONTEND_URL is: 192.168.1.12
Invalid configured frontend URL: 192.168.1.12
[AUTH] Starting Better Auth mounting phase...
[AUTH] auth.js module is being loaded...
[AUTH] Better Auth handler successfully mounted.
SparkyFitnessServer UPLOADS_BASE_DIR: /app/SparkyFitnessServer/uploads
[AUTH] Synced trusted SSO providers for auto-linking: []
DEBUG: Server started and listening on port 3010
View API documentation at: /api/api-docs/swagger
[AUTH HANDLER] Intercepted request: GET /api/auth/get-session
[AUTH HANDLER] Intercepted request: GET /api/auth/get-session
CORS: Rejected origin http://192.168.1.12:3004 - origin not in allowlist (private networks disabled)
[AUTH HANDLER] Intercepted request: POST /api/auth/sign-up/email
2026-03-07T16:38:18.333Z ERROR [Better Auth]: Invalid origin: http://192.168.1.12:3004
[AUTH HANDLER] Intercepted request: GET /api/auth/get-session
|
|
It appears as though I am using 5434. Nothing else is using that port.
…On Sat, 7 Mar 2026 at 12:47, CodeWithCJ ***@***.***> wrote:
Failed to start server: Error: connect ECONNREFUSED 172.20.0.2:5432
what is the port you are using for DB? i had it as 5434 as 5432 was
already taken by another app in my server. your server component can't
connect to DB.
—
Reply to this email directly, view it on GitHub
<#384 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGIL6H7OSN7XBK4LXLJ5T4PROCVAVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGQ2TGOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
|
Can you share your env and compose file. hide your personal and keys alone . I can't help you if you are not providing all the info I asked. |
Looks like the problem lies here. Your front end URL is wrong you need to check ALLOW_PRIVATE_NETWORK_CORS and SPARKY_FITNESS_EXTRA_TRUSTED_ORIGINS if the URL you supplied and the URL you are accessing are different. |
|
Got it! I didn't realize I needed to include the port in the URL. My
apologies for wasting your time. Thanks for making this for the community!
…On Sat, 7 Mar 2026 at 13:10, CodeWithCJ ***@***.***> wrote:
Where would I find that to check it?
what is the value you set for SPARKY_FITNESS_FRONTEND_URL ? you need to
access the same via that URL. check for issues like https vs http. From the
error you are trying to access via http://192.168.1.12:3004 but the
SPARKY_FITNESS_FRONTEND_URL could be different/wrong
—
Reply to this email directly, view it on GitHub
<#384 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBGIL5AHWW2FOCTGD4YOSL4PRQ2XAVCNFSM6AAAAACNXPZX4SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGQ3DOMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|



what is the value you set for SPARKY_FITNESS_FRONTEND_URL ? you need to access the same via that URL. check for issues like https vs http. From the error you are trying to access via http://192.168.1.12:3004 but the SPARKY_FITNESS_FRONTEND_URL could be different/wrong
If you want to allow multiple URLs, you need to set those variables to server container. refer the example.env file but I think fixing SPARKY_FITNESS_FRONTEND_URL should be enough for your case