i have recently installed pgadmin4 onto my laptop and when I launch the application, it just gets stuck on the loading. I had a look at the logs and this is what I see:
The logs
2020-11-14 00:22:46: Checking for system tray...
2020-11-14 00:22:46: Starting pgAdmin4 server...
2020-11-14 00:22:46: Creating server object, port:64222, key:2a079549-63da-44d2-8931-efa9de3a847f, logfile:C:/Users/yonis/AppData/Local/pgadmin4.d41d8cd98f00b204e9800998ecf8427e.log
2020-11-14 00:22:46: Python Path: C:/Program Files/PostgreSQL/13/pgAdmin 4/venv/Lib/site-packages;C:/Program Files/PostgreSQL/13/pgAdmin 4/venv/DLLs;C:/Program Files/PostgreSQL/13/pgAdmin 4/venv/Lib
2020-11-14 00:22:46: Python Home: C:/Program Files/PostgreSQL/13/pgAdmin 4/venv
2020-11-14 00:22:46: Initializing Python...
2020-11-14 00:22:46: Python initialized.
2020-11-14 00:22:46: Adding new additional path elements
2020-11-14 00:22:46: Redirecting stderr...
2020-11-14 00:22:46: stderr redirected successfully.
2020-11-14 00:22:46: Initializing server...
2020-11-14 00:22:46: Webapp Path: C:/Program Files/PostgreSQL/13/pgAdmin 4/web/pgAdmin4.py
2020-11-14 00:22:46: Server initialized, starting server thread...
2020-11-14 00:22:46: Open the application code and run it.
2020-11-14 00:22:46: Set the port number, key and force SERVER_MODE off
2020-11-14 00:22:46: PyRun_SimpleFile launching application server...
2020-11-14 00:22:47: Application Server URL: http://127.0.0.1:64222/?key=2a079549-63da-44d2-8931-efa9de3a847f
2020-11-14 00:22:47: The server should be up. Attempting to connect and get a response.
2020-11-14 00:22:53: Attempt to connect one more time in case of a long network timeout while looping
2020-11-14 00:22:53: Everything works fine, successfully started pgAdmin4.
If pgAdmin displays this message, there are two possible reasons for this: the database server isn't running - simply start it. the server isn't configured to accept TCP/IP requests on the address shown.
To open pgAdmin, select pgAdmin4 from the EDB Postgres menu. The client opens in your default browser. To connect to the Advanced Server database server, expand the Servers node of the Browser tree control, and right click on the EDB Postgres Advanced Server node. When the context menu opens, select Connect Server .
The File Menu¶ Click to open the Preferences dialog to customize your pgAdmin settings. If you have modified the workspace, click to restore the default layout.
Why? pgAdmin 4 v4.28 includes additional security features, one of which is intended to prevent security issues caused by Content Sniffing. Unfortunately some Windows systems are mis-configured such that this causes Javascripts used by pgAdmin to fail to load.
When I launch pgAdmin 4 v4.28 or later on Windows, the loading page never closes. Why? pgAdmin 4 v4.28 includes additional security features, one of which is intended to prevent security issues caused by Content Sniffing. Unfortunately some Windows systems are mis-configured such that this causes Javascripts used by pgAdmin to fail to load.
pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. pgAdmin may be used on Linux, Unix, macOS and Windows to manage PostgreSQL and EDB Advanced Server 9.5 and above.
(Win 7) My pgadmin4 stopped working in firefox but it works in chrome. Now i use this configuration to open pgadmin 4 using chrome. It is interesting that pgadmin4 now open in his own window. I think this is the correct way to use pgadmin4.
Have a look at following link: https://www.postgresql-archive.org/pg-Admin-4-v4-28-Errors-on-launch-td6162407.html I think this is the fix you need
Hi All We were not able to reproduce this issue on any of our machines during pre-release testing for v4.28. Then after some R&D, we are able to reproduce this issue. Cause of the problem: if value of "HKEY_CLASSES_ROOT.js\Content Type" is set to "text/plain" then issue is reproducible. In any javascript file, the content type should be “text/javascript” in the response header but in the above registry setting it is "text/plain", so the browser won't allow it. Solution: Open the registry and changed the value of "HKEY_CLASSES_ROOT.js\Content Type" to "text/javascript".
Update:
PgAdmin4 5.0 is out now, you can check it out here. It seems this problem is no longer an issue. take a look at my screen shot below:
My registry value is still "text/plain" and my PgAdmin works as below shows:
So, if you still have this problem, try upgrade to PgAdmin4 5.0.
with according with this fix explain here
If someone have this problem on windows,
first the reason of that is the value of "HKEY_CLASSES_ROOT\.js\Content Type" is set to "text/plain"
on registry manager and windows not accept it.
Now change that value to "text/javascript"
it all.
Shut down the pgAdmin server to see those changes.
Now all can work fine, you don't have to uninstall anything or downgrade anything.
Same problem with v4.28 get stuck loading screen. and v4.27 cannot open, it crashes. now I downgrade to v4.26 it's ok
On the official FAQ a solution is outlined here (& why it happens): https://www.pgadmin.org/faq/#12
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With