Thread: v4 3.0 connection issues, notices is readonly

v4 3.0 connection issues, notices is readonly

From
Cherio
Date:
Hello,

PgAdmin 4 v3.0 didn't work out of the box on my ubuntu 16.04.4. Both DEB install and python wheel generate errors. I researched the DEB install and determined that the error occurs in "/usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py" on line 313 which reads

pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)

and complains that the property is readonly. I am not a python guy but after some research I made the following tweak to make it work:

        if self.async == 1:
            pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)

The same file has similar code on line ~1250 though I didn't see errors on that line.

Another error which completely prevents from continuing on a web page is the "INTERNAL SERVER ERROR" which locks the screen with an alert popup (the title reads "AlertifyJS") that can't be closed, but I believe this was already reported and claimed to be fixed the next day.

Regards,
Yuri

Re: v4 3.0 connection issues, notices is readonly

From
Murtuza Zabuawala
Date:
Hi,

​Please create a bug for the same HERE,
Also provide us steps to reproduce the issue in the bug ticket and attach 
`pgAdmin4.log`
​ log file​
​in the ticket
​, It will help us to pinpoint the issue quickely.

- Enable debug logging (https://www.pgadmin.org/faq/#8)
- Disable the dashboard graphs temporarily to avoid unwanted logging from dashboard calls (https://www.pgadmin.org/faq/#5)
- Delete/Rename existing `pgAdmin4.log` file
- Restart pgAdmin4 and try to re-produce the issue
- Zip the log file and
​upload it on bug ticket.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Tue, Apr 17, 2018 at 10:03 PM, Cherio <cherio@gmail.com> wrote:
Hello,

PgAdmin 4 v3.0 didn't work out of the box on my ubuntu 16.04.4. Both DEB install and python wheel generate errors. I researched the DEB install and determined that the error occurs in "/usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py" on line 313 which reads

pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)

and complains that the property is readonly. I am not a python guy but after some research I made the following tweak to make it work:

        if self.async == 1:
            pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)

The same file has similar code on line ~1250 though I didn't see errors on that line.

Another error which completely prevents from continuing on a web page is the "INTERNAL SERVER ERROR" which locks the screen with an alert popup (the title reads "AlertifyJS") that can't be closed, but I believe this was already reported and claimed to be fixed the next day.

Regards,
Yuri

Re: v4 3.0 connection issues, notices is readonly

From
Cherio
Date:
I may not have time to do that this week. One possible extra clue my team member reports this happens as a result of upgrade from v4 2.1 (which was previously upgraded from v4 2.0) to v4 3.0 and using the same config directory ~/.pgadmin. Cleaning up configuration directory resolves the issue but creates another issue forcing us to recreate connection profiles for over 20 servers which is a big hassle. For this reason we will be sticking to v4 2.1 for now.

While on this subject I want to briefly mention another overlooked aspect of configuration. It is a hassle to run pgadmin 3 and pgadmin 4 in the same environment. To mitigate that we need to crete system wide (vs per user) "/usr/share/pgadmin4/web/config_local.py" as root and tweak DATA_DIR in there to e.g. /home/<user>/.pgadmin4. Tweaking configuration requires system-wide changes within the installed package. This is less of an issue when running from virtualenv because it can be installed within user environment but still it requires re-applying configuration for every new build. The simplest way to solve this is to either initialize DATA_DIR via environment variable or allow passing it via command line. This should be quite easy to implement.

On Wed, Apr 18, 2018 at 1:27 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,

​Please create a bug for the same HERE,
Also provide us steps to reproduce the issue in the bug ticket and attach 
`pgAdmin4.log`
​ log file​
​in the ticket
​, It will help us to pinpoint the issue quickely.

- Enable debug logging (https://www.pgadmin.org/faq/#8)
- Disable the dashboard graphs temporarily to avoid unwanted logging from dashboard calls (https://www.pgadmin.org/faq/#5)
- Delete/Rename existing `pgAdmin4.log` file
- Restart pgAdmin4 and try to re-produce the issue
- Zip the log file and
​upload it on bug ticket.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Tue, Apr 17, 2018 at 10:03 PM, Cherio <cherio@gmail.com> wrote:
Hello,

PgAdmin 4 v3.0 didn't work out of the box on my ubuntu 16.04.4. Both DEB install and python wheel generate errors. I researched the DEB install and determined that the error occurs in "/usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py" on line 313 which reads

pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)

and complains that the property is readonly. I am not a python guy but after some research I made the following tweak to make it work:

        if self.async == 1:
            pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)

The same file has similar code on line ~1250 though I didn't see errors on that line.

Another error which completely prevents from continuing on a web page is the "INTERNAL SERVER ERROR" which locks the screen with an alert popup (the title reads "AlertifyJS") that can't be closed, but I believe this was already reported and claimed to be fixed the next day.

Regards,
Yuri

Re: v4 3.0 connection issues, notices is readonly

From
Murtuza Zabuawala
Date:
Hi,

No need to comment anything, the repository packages have been updated with the fix.
Please update & check.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Fri, Apr 20, 2018 at 5:28 PM, frankgard <frank.von.postgresql.org@familie-gard.de> wrote:
Please have a look at  this post
<https://stackoverflow.com/questions/49919149/unable-to-connect-to-postgresql-with-pgadmin4-readonly-attribute-error>
. Perhaps commenting out might be a workaround.
Frank.



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html