split-pro icon indicating copy to clipboard operation
split-pro copied to clipboard

Not working after deployment

Open Matthi-Hub opened this issue 2 months ago • 18 comments

Describe the bug Try to add first expense leads to black site with only language to choose. No error in docker are shon. Simply not working at all

To Reproduce Steps to reproduce the behavior:

  1. docker compose
  2. local-ip-adress:3000
  3. Welcome page is shown
  4. see black page with "Split Pro" on top and language chooser. Nothing else

Matthi-Hub avatar Oct 26 '25 12:10 Matthi-Hub

Hi i have basically the same issue. Logs on the backend are also empty.

TobiasPiontek avatar Oct 30 '25 19:10 TobiasPiontek

Same here.

nikstohn avatar Oct 31 '25 01:10 nikstohn

Same here, the log error of the container show:

[next-auth][error][CLIENT_FETCH_ERROR]
https://next-auth.js.org/errors#client_fetch_error fetch failed {
  error: {
    message: 'fetch failed',
    stack: 'TypeError: fetch failed\n' +
      '    at node:internal/deps/undici/undici:13510:13\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)',
    name: 'TypeError'
  },
  url: 'http://localhost:3000/api/auth/providers',
  message: 'fetch failed'
}

tmpjg avatar Nov 01 '25 17:11 tmpjg

Sorry for the lack of reply, I was travelling. I will try to diagnose the issue in the coming days.

krokosik avatar Nov 02 '25 14:11 krokosik

Please check if the issue persists with 1.5.7

krokosik avatar Nov 04 '25 20:11 krokosik

Using image image: ossapps/splitpro:v1.5.7 and the provided docker-compose.yaml & .env file, I still have the same issue.

log
splitpro     | All migrations have been successfully applied.
splitpro     | + echo 'Starting web server'
splitpro     | + node server.js
splitpro     | Starting web server
splitpro     |    ▲ Next.js 15.3.3
splitpro     |    - Local:        http://df91d8448257:3000
splitpro     |    - Network:      http://df91d8448257:3000
splitpro     | 
splitpro     |  ✓ Starting...
splitpro     | Registering instrumentation
splitpro     | Validating auth env
splitpro     |  ✓ Ready in 580ms
splitpro     | [next-auth][error][CLIENT_FETCH_ERROR] 
splitpro     | https://next-auth.js.org/errors#client_fetch_error fetch failed {
splitpro     |   error: {
splitpro     |     message: 'fetch failed',
splitpro     |     stack: 'TypeError: fetch failed\n' +
splitpro     |       '    at node:internal/deps/undici/undici:13510:13\n' +
splitpro     |       '    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)',
splitpro     |     name: 'TypeError'
splitpro     |   },
splitpro     |   url: 'http://localhost:3000/api/auth/providers',
splitpro     |   message: 'fetch failed'
splitpro     | }

felixZmn avatar Nov 05 '25 20:11 felixZmn

I receive the No Provider Found error on the blank page with the most recent version. Is there something misconfigured?

The compose configuration i use:

name: split-pro-prod

services:
  postgres:
    image: ossapps/postgres
    container_name: ${POSTGRES_CONTAINER_NAME:-splitpro-db}
    restart: always
    environment:
      - POSTGRES_USER=${POSTGRES_USER:?err}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?err}
      - POSTGRES_DB=${POSTGRES_DB:?err}
      - POSTGRES_PORT=${POSTGRES_PORT:-5432}
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
      interval: 10s
      timeout: 5s
      retries: 5
    command: >
      postgres
      -c shared_preload_libraries=pg_cron
      -c cron.database_name=${POSTGRES_DB:-splitpro}
      -c cron.timezone=UTC
    # ports:
    #   - "5432:5432"
    env_file: .env
    volumes:
      - MY_PATH:/var/lib/postgresql/data

  splitpro:
    image: ossapps/splitpro:v1.5.7
    container_name: splitpro
    restart: always
    ports:
      - ${PORT:-3000}:${PORT:-3000}
    environment:
      - PORT=${PORT:-3000}
      - HOSTNAME=0.0.0.0 # Uncomment this, to have the server listen on all network interfaces. Needed when you want to connect to split-pro via docker internal networks, e.g. for reverse proxy setups.
    env_file: .env
    depends_on:
      postgres:
        condition: service_healthy

volumes:
  database:

The env file i use:

# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

#********* REQUIRED ENV VARS *********

PORT=3008

# These variables are also used by docker compose in compose.yml to name the container
# and initialise postgres with default username, password. Use your own values when deploying to production.
POSTGRES_CONTAINER_NAME=splitpro-db
POSTGRES_USER=postgres
POSTGRES_PASSWORD=strong-password
POSTGRES_DB=splitpro
POSTGRES_PORT=5432
DATABASE_URL=postgresql://postgres:strong-password@splitpro-db:5432/splitpro

# Next Auth
# You should generate a new secret on the command line with:
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
NEXTAUTH_SECRET=secret
NEXTAUTH_URL=http://192.168.178.56:3008

# The default /home page is a blog page that may not be suitable for your use case.
# You can change it to /balances or any other URL you want.
# Note that it creates a permanent redirect, so changing it later will require a cache clear from users.
DEFAULT_HOMEPAGE=/home

# If provided, server-side calls will use this instead of NEXTAUTH_URL.
# Useful in environments when the server doesn't have access to the canonical URL
# of your site.
# NEXTAUTH_URL_INTERNAL="http://localhost:3000"


# Enable sending invites
ENABLE_SENDING_INVITES=true

# Disable email signup (magic link/OTP login) for new users
DISABLE_EMAIL_SIGNUP=false
#********* END OF REQUIRED ENV VARS *********


#********* OPTIONAL ENV VARS *********
# SMTP options
FROM_EMAIL=
EMAIL_SERVER_HOST=
EMAIL_SERVER_PORT=
EMAIL_SERVER_USER=
EMAIL_SERVER_PASSWORD=

# GoCardless options
GOCARDLESS_COUNTRY=
GOCARDLESS_SECRET_ID=
GOCARDLESS_SECRET_KEY=
# Bank Transactions will be fetched from today and 30 days back as default.
GOCARDLESS_INTERVAL_IN_DAYS=

# Plaid options
PLAID_CLIENT_ID=
PLAID_SECRET=
# sandbox/development/production
PLAID_ENVIRONMENT=
# https://plaid.com/docs/institutions/
PLAID_COUNTRY_CODES=
# Bank Transactions will be fetched from today and 30 days back as default.
PLAID_INTERVAL_IN_DAYS=

# Cron-job options
CLEAR_BANK_CACHE_FREQUENCY=

# Google Provider : https://next-auth.js.org/providers/google
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# Authentic Providder : https://next-auth.js.org/providers/authentik
# Issuer: should include the slug without a trailing slash – e.g., https://my-authentik-domain.com/application/o/splitpro
AUTHENTIK_ID=
AUTHENTIK_SECRET=
AUTHENTIK_ISSUER=

# Keycloak Providder : https://next-auth.js.org/providers/keycloak
# Issuer: should include the realm – e.g. https://my-keycloak-domain.com/realms/My_Realm
KEYCLOAK_ID=
KEYCLOAK_SECRET=
KEYCLOAK_ISSUER=

# OIDC Provider 
# The (lowercase) name will be used to generate an id and possibly display an icon if it is added in https://github.com/oss-apps/split-pro/blob/main/src/pages/auth/signin.tsx#L25
# If your provider is not added, simpleicon probably has it and you may submit a PR
OIDC_NAME=
OIDC_CLIENT_ID=
OIDC_CLIENT_SECRET=

# An OIDC Well-Known URI registry: https://openid.net/specs/openid-connect-discovery-1_0.html#WellKnownRegistry
# For example, https://example.com/.well-known/openid-configuration
OIDC_WELL_KNOWN_URL=

# Required for some providers to link with existing accounts, make sure you trust your provider to properly verify email addresses
# OIDC_ALLOW_DANGEROUS_EMAIL_LINKING=1

# Storage: any S3 compatible storage will work, for self hosting can use minio
# If you're using minio for dev, you can generate access keys from the console http://localhost:9001/access-keys/new-account
# R2_ACCESS_KEY="access-key"
# R2_SECRET_KEY="secret-key"
# R2_BUCKET="splitpro"
# R2_URL="http://localhost:9002"
# R2_PUBLIC_URL="http://localhost:9002/splitpro"

# Push notification, Web Push: https://www.npmjs.com/package/web-push
# generate web push keys using this command: npx web-push generate-vapid-keys --json
# or use the online tool: https://vapidkeys.com/
WEB_PUSH_PRIVATE_KEY=
WEB_PUSH_PUBLIC_KEY=
WEB_PUSH_EMAIL=

# Email options
FEEDBACK_EMAIL=

# Discord webhook for error notifications
DISCORD_WEBHOOK_URL=

# Currency rate provider, currently supported: 'frankfurter' (default), 'openexchangerates' and 'nbp'. See Readme for details.
CURRENCY_RATE_PROVIDER=frankfurter

# Open Exchange Rates App ID
OPEN_EXCHANGE_RATES_APP_ID=
#********* END OF OPTIONAL ENV VARS *********

TobiasPiontek avatar Nov 07 '25 21:11 TobiasPiontek

I receive the No Provider Found error on the blank page with the most recent version.

From what I understand, authentication is managed by NextAuth.js, and you must configure at least one auth provider so that you can be proposed a login interface: the docs about providers. Some are already implemented in the default docker image.

For instance, if you want to use the simple email authentication, you can fill in the SMTP options section in the OPTIONAL ENV VARS from your .env file. This should show you an email field which you can use to log in.

FelixDz avatar Nov 09 '25 18:11 FelixDz

is external oauth provider required? I mean i was able to use google to auth in but how can i block unwanted users? I want it to only share within my family Does one need to use these two together?

ENABLE_SENDING_INVITES=true
INVITE_ONLY=true

maxdd avatar Nov 10 '25 10:11 maxdd

@maxdd You can set up SMTP to have email signin and then set DISABLE_EMAIL_SIGNUP=true to disable creating new accounts

krokosik avatar Nov 11 '25 11:11 krokosik

With oauth providers, limiting signups should be handled by the provider, OAuth is not required, but you need at least one provider for the app to work

krokosik avatar Nov 11 '25 11:11 krokosik

@felixZmn Could you try setting HOSTNAME=0.0.0.0?

krokosik avatar Nov 11 '25 11:11 krokosik

@maxdd You can set up SMTP to have email signin and then set DISABLE_EMAIL_SIGNUP=true to disable creating new accounts

Hello, thank you for the reply. Why would one need a SMTP server for login access? Can't we use postgres-db for accounts as well? INVITE_ONLY=true after i've logged in with the accounts seem to do the job for a bit but after i get a callback error. I feel like it is overly complicated to pass through a third party provider. The project goal was to selfhost and not rely on others, here it is the same, no?

if SMTP is the only "local" way, do you mind sharing a compose file with a local deployment?

maxdd avatar Nov 11 '25 12:11 maxdd

@maxdd have you read the Readme and the deployment guide?

krokosik avatar Nov 12 '25 10:11 krokosik

Yes, what makes you think i did not? I read these https://github.com/oss-apps/split-pro?tab=readme-ov-file#docker https://github.com/oss-apps/split-pro/blob/main/docker/README.md

Can you point me to where those questions are answered please? Judging from the fact that many ppl are here because they are not aware that the image must have a third-party provider configured and what's the reason behind it i don't think the readme is crystal clear then. I'm not here to complaint honestly.

maxdd avatar Nov 12 '25 11:11 maxdd

You asked me a for a docker compose file. The readme tells you where to get it.

If you want a local deployment you can have your self hosted oauth provider like Authentik or others through OIDC or configure SMTP. I don't know what else do you ask of me? The env vars are dependent on your provider.

krokosik avatar Nov 12 '25 11:11 krokosik

I was asking for a local deployment of an smtp image or whether it was possible to save accounts in postgres without the need of sending out emails

maxdd avatar Nov 12 '25 13:11 maxdd

I'm not using a local email server so IDK, you can try one of these

Regarding username+password auth, it is not supported.

krokosik avatar Nov 12 '25 16:11 krokosik