Skip to content

[Bug]: PostgreSQL query executes successfully but causes frontend crash with "Something went wrong while displaying this webpage" #2132

@stbarthel-boop

Description

@stbarthel-boop

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When executing any PostgreSQL query in Lowcoder (even simple ones like SELECT 1 as test; or SELECT * FROM table LIMIT 1;), the following behavior occurs:

  1. Query executes successfully (green success message: "query1 ran successfully" appears)
  2. API response shows "success": true, "queryCode": "OK" with actual data in the response
  3. For a split second, data is rendered correctly in components (Table component shows columns/values, Text component shows data from query.data)
  4. Immediately after, the entire page crashes with error message: "Something went wrong while displaying this webpage"
  5. The ErrorFallback-3716e329.js component is loaded
  6. After crash, components show null or empty state again

Browser Network Tab shows:

  • /api/query/execute returns Status 200 with actual data in response body
  • ErrorFallback-3716e329.js is loaded (Status 200 from cache)

Browser Console shows:

  • No JavaScript errors except unrelated Chrome extension warnings
  • No CORS errors
  • No network errors

Lowcoder API Service Logs show:

INFO org.lowcoder.plugin.sql.SqlBasedQueryExecutor#blockingExecuteQuery:86 [plugin-executor-67]: 
Hikari hashcode: 616675610, active: 0, idle: 1, wait: 0, total: 1

Expected Behavior

  1. Query should execute successfully
  2. Data should be returned and stored in query.data
  3. Components (Table, Text, etc.) should display the data persistently without crashing
  4. No error page should appear

Steps to reproduce

  1. Setup PostgreSQL datasource:

    • Host: n8n-n8n-postgres-1 (Docker container name in deploy_internal network)
    • Port: 5432
    • Database: mf_app
    • Username: mf_app
    • Schema: core (using ALTER USER mf_app SET search_path TO core, public;)
    • SSL Mode: disabled (internal Docker network)
    • Test Connection: ✅ Successful
  2. Create new app:

    • Add a new Query (PostgreSQL)
    • Select mf_app datasource
    • Enter query: SELECT 1 as test;
    • Execute query
  3. Observe behavior:

    • Query shows success message
    • Immediate page crash with "Something went wrong while displaying this webpage"
  4. Alternative test with Table component:

    • Create new app
    • Add Table component
    • Create PostgreSQL query: SELECT * FROM core.alerts_log LIMIT 1;
    • Set Table data source to {{ query1.data }}
    • Execute query
    • Observe: Table renders for split second, then crashes
  5. Alternative test with Text component:

    • Create Text component
    • Set value to {{ JSON.stringify(query1.data) }}
    • Execute query
    • Observe: Shows "alert_id 1" briefly, then crashes

Environment

  • Lowcoder Version: lowcoderorg/lowcoder-ce:2.7.6 (all-in-one Docker image)
  • Deployment: Docker Compose, self-hosted
  • Operating System: Debian/Ubuntu (Hetzner Cloud Server)
  • Browser: Google Chrome 145.0.0.0
  • Database: PostgreSQL 16-alpine (Docker container)
  • Network: Docker custom bridge network (deploy_internal)
  • Reverse Proxy: Caddy 2 with automatic HTTPS
  • Public URL: https://lowcoder.domain.de (configured in LOWCODER_PUBLIC_URL)

Docker Compose Configuration:

services:
  lowcoder-all-in-one:
    image: lowcoderorg/lowcoder-ce:2.7.6
    container_name: lowcoder
    env_file:
      - path: ./default.env
        required: true
      - path: ./override.env
        required: false
    volumes:
      - ./lowcoder-stacks:/lowcoder-stacks
      - ./lowcoder-stacks/assets:/lowcoder/assets
    restart: unless-stopped
    networks:
      - deploy_internal

networks:
  deploy_internal:
    external: true

override.env (relevant settings):

LOWCODER_PUBLIC_URL="https://lowcoder.domain.de"
LOWCODER_PUID="1001"
LOWCODER_PGID="1001"

Additional Information

  1. PostgreSQL connection works perfectly:

    • Test Connection in Lowcoder datasource: ✅ Success
    • Direct connection from host works: docker exec n8n-n8n-postgres-1 psql -U mf_app -d mf_app -c "SELECT * FROM core.alerts_log LIMIT 1;" returns data correctly
    • Same database works perfectly with n8n and Metabase (both can query and display data without issues)
  2. API response is correct:

    • /api/query/execute returns 200 OK
    • Response body contains actual data with "success": true
    • Example response:
      {
          "message": null,
          "data": [
              {
                  "alert_id": 1,
                  "isin": "DE000BASF111",
                  "timestamp": "2026-02-07T14:22:03.481793Z",
                  ...
              }
          ],
          "success": true,
          "code": 1,
          "queryCode": "OK",
          "hintMessages": [],
          "headers": null
      }
  3. The crash appears to be a frontend rendering issue:

    • Data arrives successfully at the backend
    • Data is briefly rendered in components
    • Then an error boundary triggers the ErrorFallback component
    • No specific error message is logged
  4. What we've tried (without success):

    • ✅ Cleared browser cache / used incognito mode
    • ✅ Upgraded from :latest to 2.7.6
    • ✅ Set permanent search_path for PostgreSQL user
    • ✅ Restarted Lowcoder container
    • ✅ Tested with different query complexity (from SELECT 1 to full table queries)
    • ✅ Tested with different components (Table, Text)
    • ✅ Created fresh queries with new names
  5. Hypothesis:

    • The issue appears to be a React Error Boundary being triggered after successful data rendering
    • Possibly related to an event handler (onSuccess, onDataChange) or useEffect that crashes after receiving data
    • Not related to query execution itself (backend works correctly)
    • Not related to data structure (even SELECT 1 crashes)

Is this a known issue? Are there any workarounds available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions