Pgadmin is not loading

眉间皱痕 提交于 2020-12-30 04:52:17

问题


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:

Screenshot of loading screen

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.

回答1:


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




回答2:


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.




回答3:


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




回答4:


On the official FAQ a solution is outlined here (& why it happens): https://www.pgadmin.org/faq/#12




回答5:


Same here with 4.28, and downgrading to 4.27 now doesn't work (4.27 worked fine before I upgraded to 4.28).

So I downgraded to 4.26 and it worked. Then I tried upgrading from there to 4.27 and it won't work, so I ended up downgrading again to 4.26.




回答6:


TL; dr: (new solution recommended by PGAdmin maintainers)

You can add the following lines to the " config_distro.py " and restart the pgAdmin 4 server:

import mimetypes
mimetypes.add_type('text/javascript', '.js')

For the long version:

See this answer for the long explanation.




回答7:


I also had the same issue, it was working normally and suddenly stopped to work. I tried lots of different approaches, updating version, uninstall/install, and others, but nothing changed, just an HTML screen with 6 links not working and a message saying PGadmin was loading.... finally I tried to turn off my adblocker, and it worked. Probably it is some issue regarding an update from the adblocker or PGAdmin



来源:https://stackoverflow.com/questions/64829748/pgadmin-is-not-loading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!