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 = up.pid order by p.name;

which gave me:

...

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

UPDATE user_preferences SET value='my_storage' WHERE pid=220 AND uid=1;

... 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!

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 PM Aditya Toshniwal <[email protected]> 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 PM Bastiaan Wakkie
    <[email protected]> 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  “Access denied (…)” 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 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 … weirdly enough.

        Could it be that I open the query tool always tool in a new
        tab? I’m 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
        <[email protected]> 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 = 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 = "/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 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 | Sr. Staff SDE II |*enterprisedb.com*
    <https://www.enterprisedb.com/>
    "Don't Complain about Heat, Plant a TREE"



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Staff SDE II |*enterprisedb.com* <https://www.enterprisedb.com/>
"Don't Complain about Heat, Plant a TREE"

Reply via email to