pgadmin4 is running perfectly before the system update of ubuntu 16.04 I didn't actually check what are those updates.
But after the update and I tried running pgAdmin, it boots up and shows the pgAdmin loading screen. Then it loads for a long while and eventually gives me the error:
The application server could not be contacted.
I checked the pgAdmin4 logs and it gives me:
AttributeError: 'Request' object has no attribute 'is_json'
2020-05-18 16:08:46,684: ERROR pgadmin: 'Request' object has no attribute 'is_json'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/flask/app.py", line 1473, in full_dispatch_request
rv = self.preprocess_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1666, in preprocess_request
rv = func()
File "/usr/lib/python3/dist-packages/flask_principal.py", line 477, in _on_before_request
identity = loader()
File "/usr/lib/python3/dist-packages/flask_security/core.py", line 515, in _identity_loader
if not isinstance(current_user._get_current_object(), AnonymousUserMixin):
File "/usr/lib/python3/dist-packages/werkzeug/local.py", line 307, in _get_current_object
return self.__local()
File "/usr/lib/python3/dist-packages/flask_login/utils.py", line 26, in <lambda>
current_user = LocalProxy(lambda: _get_user())
File "/usr/lib/python3/dist-packages/flask_login/utils.py", line 302, in _get_user
current_app.login_manager._load_user()
File "/usr/lib/python3/dist-packages/flask_login/login_manager.py", line 313, in _load_user
return self._load_from_request(request)
File "/usr/lib/python3/dist-packages/flask_login/login_manager.py", line 370, in _load_from_request
user = self.request_callback(request)
File "/usr/lib/python3/dist-packages/flask_security/core.py", line 475, in _request_loader
if request.is_json:
File "/usr/lib/python3/dist-packages/werkzeug/local.py", line 348, in __getattr__
return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute 'is_json'
I already tried searching for it, but I am not a python guy. My guess is python version incompatibility. I saw a previous question about this 4 days ago. And it was deleted. I am not sure why.
Note: There is no config changes or anything.
EDIT (thanks to @Des Magner comment): This bug is already being tracked by PostgreSQL team https://redmine.postgresql.org/issues/5565