phadmin4 app not starting after most recent upgrade

From: Richard Welty <rwelty(at)salesium(dot)com>
To: "pgsql-general" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: phadmin4 app not starting after most recent upgrade
Date: 2025-10-27 20:19:59
Message-ID: 19a2753dece.6ce25a12307797.1514863321173823485@salesium.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

i recently updated phadmin4 on my ubuntu 24.04 desktop from

the usual server. i just tried to launch the desktop app for the first

time since the update; it fails to launch with a warning about a failed

migration. i'm looking for suggestions of how to proceed.

thanks,

   richard

these are the package versions that are installed:

libpq-dev/pgadmin4 18.0-1.pgdg24.04+3 amd64

libpq5/pgadmin4,now 18.0-1.pgdg24.04+3 amd64 [installed,automatic]

pgadmin4-desktop/pgadmin4,now 9.9 amd64 [installed]

pgadmin4-server/pgadmin4,now 9.9 amd64 [installed,automatic]

pgadmin4-web/pgadmin4,now 9.9 all [installed,auto-removable]

pgadmin4/pgadmin4 9.9 all

phppgadmin/noble,noble 7.14.7+dfsg-1 all

this is the error that pops up.

The pgAdmin 4 server could not be contacted:

pgAdmin Runtime Environment

--------------------------------------------------------

Python Path: "/usr/pgadmin4/venv/bin/python3"

Runtime Config File: "/home/richard/.config/pgadmin4/config.json"

Webapp Path: "/usr/pgadmin4/web/pgAdmin4.py"

pgAdmin Command: "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py"

Environment:

  - HOME: /home/richard

  - LANG: en_US.UTF-8

  - LOGNAME: richard

  - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin

  - SHELL: /bin/bash

  - USER: richard

  - XDG_DATA_DIRS: /usr/share/ubuntu:/usr/share/gnome:/home/richard/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

  - XDG_RUNTIME_DIR: /run/user/1000

  - GTK_MODULES: gail:atk-bridge

  - QT_ACCESSIBILITY: 1

  - DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus

  - DEBUGINFOD_URLS: https://debuginfod.ubuntu.com

  - DESKTOP_SESSION: ubuntu

  - GDMSESSION: ubuntu

  - GNOME_DESKTOP_SESSION_ID: this-is-deprecated

  - GNOME_SHELL_SESSION_MODE: ubuntu

  - GSM_SKIP_SSH_AGENT_WORKAROUND: true

  - IM_CONFIG_PHASE: 1

  - PWD: /home/richard

  - QT_IM_MODULE: ibus

  - SESSION_MANAGER: local/Salesium-U:@/tmp/.ICE-unix/1712,unix/Salesium-U:/tmp/.ICE-unix/1712

  - SHLVL: 0

  - SSH_AUTH_SOCK: /run/user/1000/keyring/ssh

  - USERNAME: richard

  - XDG_CONFIG_DIRS: /etc/xdg/xdg-ubuntu:/etc/xdg

  - XDG_CURRENT_DESKTOP: Unity

  - XDG_MENU_PREFIX: gnome-

  - XDG_SESSION_CLASS: user

  - XDG_SESSION_DESKTOP: ubuntu

  - XDG_SESSION_TYPE: wayland

  - XMODIFIERS: @im=ibus

  - _: /usr/bin/gnome-session

  - MANAGERPID: 1449

  - INVOCATION_ID: 5a3a81c4349f4cc79596828b225c5203

  - JOURNAL_STREAM: 8:12258

  - SYSTEMD_EXEC_PID: 1761

  - MEMORY_PRESSURE_WATCH: /sys/fs/cgroup/ http://user.slice/user-1000.slice/user(at)1000(dot)service/session.slice/org(dot)gnome(dot)Shell(at)wayland(dot)service/memory.pressure

  - MEMORY_PRESSURE_WRITE: c29tZSAyMDAwMDAgMjAwMDAwMAA=

  - GJS_DEBUG_OUTPUT: stderr

  - GJS_DEBUG_TOPICS: JS ERROR;JS LOG

  - CLUTTER_DISABLE_MIPMAPPED_TEXT: 1

  - GNOME_SETUP_DISPLAY: :1

  - DISPLAY: :0

  - XAUTHORITY: /run/user/1000/.mutter-Xwaylandauth.N8TYE3

  - WAYLAND_DISPLAY: wayland-0

  - GIO_LAUNCHED_DESKTOP_FILE: /usr/share/applications/pgadmin4.desktop

  - GIO_LAUNCHED_DESKTOP_FILE_PID: 56037

  - CHROME_DESKTOP: pgadmin4.desktop

  - ORIGINAL_XDG_CURRENT_DESKTOP: ubuntu:GNOME

  - ELECTRON_ENABLE_SECURITY_WARNINGS: false

  - GDK_BACKEND: wayland

  - PGADMIN_INT_PORT: 33643

  - PGADMIN_INT_KEY: 0ef005bf-af5b-40ce-912f-673ed20ab2b7

  - PGADMIN_SERVER_MODE: OFF

--------------------------------------------------------

Total spawn time to start the pgAdmin4 server: 0.007 Sec

/usr/pgadmin4/venv/lib/python3.12/site-packages/passlib/pwd.py:16: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html . The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

  import pkg_resources

2025-10-27 15:29:57,837: ERROR pgadmin: Table(s) ['query_history', 'application_state', 'database', 'sharedserver', 'macros', 'user_macros', 'user_mfa'] are missing in the database

2025-10-27 15:29:57,837: ERROR pgadmin: Exception in database migration.

NOTE: Configuring authentication for DESKTOP mode.

Traceback (most recent call last):

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context

    self.dialect.do_execute(

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute

    cursor.execute(statement, parameters)

sqlite3.OperationalError: no such column: server.is_adhoc

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "/usr/pgadmin4/web/pgAdmin4.py", line 93, in <module>

    app = create_app()

          ^^^^^^^^^^^^

  File "/usr/pgadmin4/web/pgadmin/__init__.py", line 481, in create_app

    delete_adhoc_servers()

  File "/usr/pgadmin4/web/pgadmin/browser/server_groups/servers/utils.py", line 668, in delete_adhoc_servers

    db.session.query(Server).filter(Server.is_adhoc == 1).delete()

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py", line 3210, in delete

    self.session.execute(

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2351, in execute

    return self._execute_internal(

           ^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2249, in _execute_internal

    result: Result[Any] = compile_state_cls.orm_execute_statement(

                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/orm/bulk_persistence.py", line 2033, in orm_execute_statement

    return super().orm_execute_statement(

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement

    result = conn.execute(

             ^^^^^^^^^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1419, in execute

    return meth(

           ^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 526, in _execute_on_connection

    return connection._execute_clauseelement(

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement

    ret = self._execute_context(

          ^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context

    return self._exec_single_context(

           ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context

    self._handle_dbapi_exception(

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception

    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context

    self.dialect.do_execute(

  File "/usr/pgadmin4/venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute

    cursor.execute(statement, parameters)

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: server.is_adhoc

[SQL: DELETE FROM server WHERE server.is_adhoc = ?]

[parameters: (1,)]

(Background on this error at: https://sqlalche.me/e/20/e3q8 )

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2025-10-27 21:35:43 Re: phadmin4 app not starting after most recent upgrade
Previous Message Peter J. Holzer 2025-10-25 15:31:30 Re: Download statistics