Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vBw84-0073BD-01 for pgadmin-support@arkaria.postgresql.org; Thu, 23 Oct 2025 14:17:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vBw81-0097aj-R9 for pgadmin-support@arkaria.postgresql.org; Thu, 23 Oct 2025 14:17:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vBw81-0097aO-GS for pgadmin-support@lists.postgresql.org; Thu, 23 Oct 2025 14:17:20 +0000 Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vBw7v-003ogn-0e for pgadmin-support@lists.postgresql.org; Thu, 23 Oct 2025 14:17:19 +0000 Received: by mail-ua1-x92f.google.com with SMTP id a1e0cc1a2514c-932bc48197bso401308241.0 for ; Thu, 23 Oct 2025 07:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1761229032; x=1761833832; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3W7OarXMxlccRvhs/osdrmPHoMQNkPoqhHXU9x1coeg=; b=fLs40gmPhmua/BOyDBBC/SFBbiaji9XfUG+7+yBTA4WgsUEqBejEZM2oQ1bJl96o9K o0SBWhW4/RjsEAzFKK4miZzcghLIH3gnVU7j34P2wzz2ifwvUZ0Nhle+cqA1ic32RrMV +j0yYryYn3hvwyyZCPRF5mNpHoZc1AB01uRs9yr9PjutdRv/WEinmYb/IxgA7bBOj53j JnN5llj8kCNor6rMeOfhLqYHPty/9uV9x7ZGo3qiYz5Uaolh3qCp9CZ6tGEJreKSLjga K31Z54HTi3+bc6rGW1Kqmum1Esc/HYF/v5L0DyPpHoEY9u4SHJXo5HUic9CEeWO8diKL UXxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761229032; x=1761833832; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3W7OarXMxlccRvhs/osdrmPHoMQNkPoqhHXU9x1coeg=; b=TlHbiYPD9GyYyW7Ey+owaFSbWfFVnHcmo/4xRv7lmXRXXgjbMcZvSSLD9LYYxxuwQr zdQv59LnF0HfPY0TyyY8VqKJpnlbdHSVWZxxZF91mStlajmzLdIIfYzS23ubU/mgLReA UPAXH3JBc5tPBe9Du91yEr+3poNFKcI7KiR1DiRBzetYmGpFH0tqFYrIRiI00LNxvkV9 fKdMvfeRxJ0JP5w/X2d+3MTX8cxuTTm97RINjWCCxFqNGc19f/v2uvabANXYOtKPsNni xVrYya0tucLRM3n1JcSj1/NV6KIkicJr+Aefb/Mz/3MyMv6O44m4jmFAov+Ma01/9RHj +pYQ== X-Gm-Message-State: AOJu0YyopAt8pA5VMCCZ4mCYuCq4Ws4FKhkfhJGIXEpL8Jjepi9eWEqw pzFyGXYtV7XcJXI+3SMh4286zAgnhmOek1P685a+Wp3S6SXzYjMCaMIJ7djxim4znjkNNaBvKuV SWG112X49so4u2bTixBf9p435RLF6/lZUQlJZ9XNW X-Gm-Gg: ASbGncvixe7THibVbXC9qN6VtLXkOiGc89Ljrsu5g1Zel6MdAmqyf2nLRcm8OtzzxPs XKtXVeMjGpS8V48R16HveIzgrzq18L1kVFQy7q23j+iiBZCqQOEuiRSj4CBUHuOEhySgvbaBXiu bBBcni0pTsAr8nUCILZ0B7BZEWjqR2m+6SVQpjEFgHn4rCe5z9xt+Xq9Rut7j6UYNadjwTpHdQy AaP4tXQvCDl40SXL33tPN1snnbVU08AaPFptmmBVO/wZgTZzJqpiqLXZhcdoWw= X-Google-Smtp-Source: AGHT+IFY6RrF3/ZT4Qkful/d/pRM8DlT+wzT/FjX4ODHg/SLsxb2Tpt9hYFlrW7Iw/00GFJO3X+tq+U8BcWISVqp5e4= X-Received: by 2002:a67:e004:0:20b0:5d7:de8a:4133 with SMTP id ada2fe7eead31-5d7de8a4239mr5631542137.5.1761229032293; Thu, 23 Oct 2025 07:17:12 -0700 (PDT) MIME-Version: 1.0 References: <72B3573D-7E61-4D20-AE8B-8EB6DA2672F8@gmail.com> <5d9badc0-a454-454c-9f77-de9a122b991c@gmail.com> In-Reply-To: <5d9badc0-a454-454c-9f77-de9a122b991c@gmail.com> From: Aditya Toshniwal Date: Thu, 23 Oct 2025 19:46:36 +0530 X-Gm-Features: AWmQ_bnXGRHZzNZmBXzA5vDu1-KL5svQWa17GPXpkmutxmAuoi0HuEqvIpeI-ak Message-ID: Subject: Re: Opening and saving files (crtl-o) (in 9.6 and 9.8) results in 500 error/Access denied To: Bastiaan Wakkie Cc: "pgadmin-support@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000d69a380641d41639" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d69a380641d41639 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Bastiaan, Glad to hear that you're able to proceed with the workaround. We need to fix the root cause. On Thu, Oct 23, 2025 at 1:14=E2=80=AFPM Bastiaan Wakkie = wrote: > Hi Aditya, > > Yes!! > > > I can confirm that it was exactly the same problem. Somehow, the last > storage went into this 'None' state. > > > I altered the SELECT statement (from issues/9281) to also see the pid > > SELECT p.name, up.pid, up.uid, up.value FROM user_preferences AS up JOIN > preferences AS p ON p.id =3D up.pid order by p.name; > > which gave me: > > ... > > > last_storage|220|1|None > ... and then... > > UPDATE user_preferences SET value=3D'my_storage' WHERE pid=3D220 AND uid= =3D1; > > ... Solved it! > > > All I remember before I went into this 'None' state is that I went > somewhere to the root of the storage (maybe via the storage manager) wher= e > I normally don't go. > > > Thanks problem solved! > > Cheers, > > Bastiaan > > > On 10/22/25 14:47, Aditya Toshniwal wrote: > > Hi Bastiaan, > > Check this one - https://github.com/pgadmin-org/pgadmin4/issues/9281 > Are you able to get the same behaviour as mentioned? > > On Wed, Oct 22, 2025 at 12:21=E2=80=AFPM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi Bastiaan, >> >> Maybe we'll have to add more logs to debug the issue you're facing. If >> it's an internal server error then it should have logged it. >> >> On Sat, Oct 18, 2025 at 8:51=E2=80=AFPM Bastiaan Wakkie >> wrote: >> >>> UPDATE: >>> >>> After upgrading to 9.9 still the same problem. >>> >>> Im getting... >>> When saving: ... and [! Request failed with status code 500] error popu= p >>> and =E2=80=9CAccess denied (=E2=80=A6)=E2=80=9D in the Message pane. >>> When opening an already stored file: ... an [! Request failed with >>> status code 500] error popup. >>> >>> If Im logged in as pgadmin on the server (the user running the app) and >>> I could create a file in the storage directory. I even tried to make on= e >>> file world readable (chmod 777) but still I am getting the above errors= . I >>> do see any file created directly in the storage. >>> >>> I also started Firefox 144.0 without extensions to see if this was >>> causing the problem. But not as I expected as an 500 error indicates >>> something server side. But I am ticking off any possible way to trace w= hy >>> this problem is happening. >>> >>> Still nowhere I am able to detect any indication in the log files. >>> >>> The only thing that works is creating a new folder via the storage >>> manager and rename files =E2=80=A6 weirdly enough. >>> >>> Could it be that I open the query tool always tool in a new tab? I=E2= =80=99m >>> have trouble finding the setting to disable this btw to test this >>> hypothesis. >>> I also note that options/storage/last storage is set to None. While the >>> last directory changes when I move around. >>> >>> Ps running pgadmin4 in a venv with python 3.13.7 >>> >>> Thx, >>> Bastiaan >>> >>> > On 11 Oct 2025, at 12:10, Bastiaan Wakkie wrote: >>> > >>> > >>> > >>> > Hi all, >>> > >>> > >>> > Opening and saving files (crtl-o) (in 9.6 and 9.8) results in 500 >>> error/Access denied >>> > >>> > The rest of the pgadmin4 application is working like normal.. >>> > >>> > I can run any sql queries without problems, just cannot load or save >>> any files! >>> > >>> > >>> > What did I do/remember: >>> > >>> > 1) recently updated postgresql to 17.5 on manjaro rolling release. >>> > >>> > 2) I remember that I went to the root of the storage when it started >>> to act weird. Not sure this is connected though >>> > >>> > 3) When I try opening any file stored in the storage, I'm getting ... >>> > "Request failed with status code 500" >>> > ... error in the application but I cannot find *anywhere* in the logs >>> an indication of what is happening (Also not in my postgresql, supervis= or, >>> nginx or journalctl logs). >>> > >>> > 4) I updated pgadmin4 from 9.6 to 9.8 like I always do (pip install -= U >>> pgadmin4) to see if this would fix it but the problem persists. >>> > >>> > 5) ...I changed CONSOLE_LOG_LEVEL =3D 10 in the hope to see more but >>> alas... >>> > >>> > 6) ...I enabled postgresql log to see something comes up there, but n= o >>> postgresql seems quietly doing it's thing.. >>> > >>> > 7) I checked the ... >>> > STORAGE_DIR =3D "/data/databases/pgadmin4/storage" >>> > ... and all is owned by the pgadmin user. >>> > >>> > 8) Via the command line I can add/delete/remove files/directories in >>> the storage folder and I will see them in the storage (manager) but sti= ll >>> unable to open or save any file. >>> > >>> > 9) BUT when I create a new sql script and try to save it or "save as" >>> I am getting an "Access denied" message : >>> > "Successfully run. Total query runtime: 311 msec. 14603 rows affected= . >>> Access denied (/new script.sql)Access denied (/new_file.sql)Access deni= ed >>> (/two.new.sql)" >>> > (The message keeps appending my last attempts, btw) >>> > >>> > >>> > Did anybody else had this problem before? >>> > >>> > ... and know how to fix it? >>> > >>> > ... or knows a way to track down the 500 error of the app. >>> > >>> > >>> > or is this git issue material? >>> > >>> > Cheers, >>> > >>> > Bastiaan >>> > >>> > >>> > >>> >>> >>> >>> >> >> -- >> Thanks, >> Aditya Toshniwal >> pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com* >> >> "Don't Complain about Heat, Plant a TREE" >> > > > -- > Thanks, > Aditya Toshniwal > pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com* > > "Don't Complain about Heat, Plant a TREE" > > --=20 Thanks, Aditya Toshniwal pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com* "Don't Complain about Heat, Plant a TREE" --000000000000d69a380641d41639 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Bastiaan,

Glad to hear that you're able to pr= oceed with=C2=A0the workaround.
We need to fix=C2=A0the root cause.

On Thu, Oct 23, 2025 at 1:14=E2=80=AFPM Bastiaan Wakkie= <bwakkie@gmail.com> wrote:<= br>
=20 =20 =20
Hi Aditya,

Yes!!


I can confirm that it was exactly the same problem. Somehow, the last storage went into this 'None' state.


I altered the SELECT statement (from issues/9281) to also see the pid

SELECT p.name, up.pid= , up.uid, up.value FROM user_preferences AS up JOIN preferences AS p ON p.id =3D up.pid order by p= .name;

which gave me:

...

> last_storage|220|1|None
... and then...

UPDATE user_preferences SET value=3D'my_storage' WHERE pid=3D= 220 AND uid=3D1;

... Solved it!


All I remember before I went into this 'None' state is that I= went somewhere to the root of the storage (maybe via the storage manager) where I normally don't go.


Thanks problem solved!=C2=A0

Cheers,

Bastiaan


On 10/22/25 14:47, Aditya Toshniwal wrote:
=20
Hi=C2=A0Bastiaan,

Are you able to get the same behaviour as mentioned?

On Wed, Oct 22, 2025 at 12:21=E2=80=AFPM Aditya Toshniwal <aditya.toshniwal@enterprisedb.c= om> wrote:
Hi=C2=A0Bastiaan,

Maybe we'll have to add more logs to debug the issue you're facing. If it'= ;s=C2=A0an internal server error then it should have logged it.

On Sat, Oct 18, 2025 at 8:51=E2=80=AFPM Bastiaan Wakkie <bwakkie@gmail.com> wrote:
UPDATE:

After upgrading to 9.9 still the same problem.

Im getting...
When saving: ... and [! Request failed with status code 500] error popup and=C2=A0 =E2=80=9CAccess denied (=E2=80=A6)= =E2=80=9D in the Message pane.
When opening an already stored file: ... an=C2=A0 [! Request failed with status code 500] error=C2=A0 popup.

If Im logged in as pgadmin on the server (the user running the app) and I could create a file in the storage directory. I even tried to make one file world readable (chmod 777) but still I am getting the above errors. I do see any file created directly in the storage.

I also started Firefox 144.0 without extensions to see if this was causing the problem. But not as I expected as an 500 error indicates something server side. But I am ticking off any possible way to trace why this problem is happening.

Still nowhere I am able to detect any indication in the log files.

The only thing that works is creating a new folder via the storage manager and rename files =E2=80=A6 weirdly enough.
Could it be that I open the query tool always tool in a new tab? I=E2=80=99m have trouble finding the setting to disa= ble this btw to test this hypothesis.
I also note that options/storage/last storage is set to None. While the last directory changes when I move around.
Ps running pgadmin4 in a venv with python 3.13.7

Thx,
Bastiaan

> On 11 Oct 2025, at 12:10, Bastiaan Wakkie <bwakkie@gmail.com> wrote:
>
>
>
> Hi all,
>
>
> Opening and saving files (crtl-o) (in 9.6 and 9.8) results in 500 error/Access denied
>
> The rest of the pgadmin4 application is working like normal..
>
> I can run any sql queries without problems, just cannot load or save any files!
>
>
> What did I do/remember:
>
> 1) recently updated postgresql to 17.5 on manjaro rolling release.
>
> 2) I remember that I went to the root of the storage when it started to act weird. Not sure this is connected though
>
> 3) When I try opening any file stored in the storage, I'm getting ...
> "Request failed with status code 500"
> ... error in the application but I cannot find *anywhere* in the logs an indication of what is happening (Also not in my postgresql, supervisor, nginx or journalctl logs).
>
> 4) I updated pgadmin4 from 9.6 to 9.8 like I always do (pip install -U pgadmin4) to see if this would fix it but the problem persists.
>
> 5) ...I changed CONSOLE_LOG_LEVEL =3D 10 in the hope to see more but alas...
>
> 6) ...I enabled postgresql log to see something comes up there, but no postgresql seems quietly doing it's thing..
>
> 7) I checked the ...
> STORAGE_DIR =3D "/data/databases/pgadmin4/storage&q= uot;
> ... and all is owned by the pgadmin user.
>
> 8) Via the command line I can add/delete/remove files/directories in the storage folder and I will see them in the storage (manager) but still unable to open or save any file.
>
> 9) BUT when I create a new sql script and try to save it or "save as" I am getting an "Access denied= " message :
> "Successfully run. Total query runtime: 311 msec. 14603 rows affected. Access denied (/new script.sql)Access denied (/new_file.sql)Access denied (/two.new.sql)"
> (The message keeps appending my last attempts, btw)
>
>
> Did anybody else had this problem before?
>
> ... and know how to fix it?
>
> ... or knows a way to track down the 500 error of the app.
>
>
> or is this git issue material?
>
> Cheers,
>
> Bastiaan
>
>
>





--
Thanks,
Aditya Toshniwal
pgAdmin Hacker=C2=A0| Sr. Staff SDE II=C2=A0|<= /font> enterprisedb.com
"Don't Complain about Heat, Plant a TREE"<= /div>


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker=C2=A0| Sr. Staff SDE II=C2=A0| enterprisedb.com
"Don't Complain about Heat, Plant a TREE"


--
Thanks,
Aditya Toshniw= al
pgAdmin Hacker=C2=A0| Sr. Staff SDE II=C2= =A0| enterprisedb.com
"Don't Complain about Heat, Plant a TREE"
--000000000000d69a380641d41639--