pgAdmin won't start (eternal loading)

I had the same problem and I resolved it following the steps on link https://www.pgadmin.org/faq/#12

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. Opening the developer tools on your browser will show an error similar to this:

Refused to execute script from 'http://127.0.0.1:57313/static/vendor/require/require.min.js?ver=42800' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

(index):39 Uncaught ReferenceError: require is not defined at (index):39 This will occur when the value of the registry key at HKEY_CLASSES_ROOT.js\Content Type is set to text/plain. To resolve the issue, use the Registry Editor and reset the value of HKEY_CLASSES_ROOT.js\Content Type to: text/javascript

Finally, restart the pgAdmin server.


I just had this problem on macOS so I went to Terminal and typed ps aux | grep -i pgadmin and made a note of the process id (second column from the left). Then I killed that process with kill -s TERM <process id>. You can also use the simpler form with killall pgAdmin4. Then I was able to start "pgAdmin 4" from the Applications directory.


I just had the same issue on a Windows 7, 64bit machine, DBA told me to "upgrade" to pgAdmin 3 (latest build) and it works.