Subject: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases

From: Khushboo Vashi <[email-masked]>
Date: Wed, 10 Nov 2021 11:06:00 +0530

Hi,

Please find the attached patch to fix the RM #6905 - Impossible to load
databases.

The database nodes are not getting loaded *behind* *reverse proxy with SSL*.
This issue has been fixed in this patch.

Note: Yogesh helped me to setup the apache server with reverse proxy with
SSL and to reproduce the issue.

Thanks,
Khushboo

---

From: Akshay Joshi <[email-masked]>
Date: Wed, 10 Nov 2021 11:58:04 +0530

Thanks, the patch applied.

On Wed, Nov 10, 2021 at 11:06 AM Khushboo Vashi <
[email-masked]> wrote:

> The database nodes are not getting loaded *behind* *reverse proxy with
> SSL*. This issue has been fixed in this patch.
>

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*

---

From: Ayad Mohamed <[email-masked]>
Date: Wed, 10 Nov 2021 11:29:27 +0000

Hi Khushboo

I patched our pgadmin4 6.1 with your patch but we still have the problem.

regards

Ayad Mohamed

________________________________

-------- Videresendt brev --------
Fra: Khushboo Vashi <[email-masked]<mailto:[email-masked]%3e>>
Til: pgadmin-hackers <[email-masked]<mailto:[email-masked]%3e>>
Emne: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases
Dato: Wed, 10 Nov 2021 11:06:00 +0530

Hi,

Please find the attached patch to fix the RM #6905 - Impossible to load databases.

The database nodes are not getting loaded behind reverse proxy with SSL. This issue has been fixed in this patch.

Note: Yogesh helped me to setup the apache server with reverse proxy with SSL and to reproduce the issue.

Thanks,
Khushboo

---

From: Khushboo Vashi <[email-masked]>
Date: Wed, 10 Nov 2021 17:31:14 +0530

Hi,

The change is in the typescript file, so yarn bundle will be required. Have
you done that?

Thanks,
Khushboo

On Wed, Nov 10, 2021 at 5:00 PM Ayad Mohamed <[email-masked]> wrote:

> ------------------------------
>
>
> *Fra*: Khushboo Vashi <[email-masked]
> <[email-masked]%3e>>
> *Til*: pgadmin-hackers <[email-masked]
> <[email-masked]%3e>>
> *Emne*: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases
> *Dato*: Wed, 10 Nov 2021 11:06:00 +0530
>
> Hi,
>

---

From: Ayad Mohamed <[email-masked]>
Date: Wed, 10 Nov 2021 12:48:01 +0000

Hi Khushboo

I have pgadmin4 on ubuntu server and installed via the official postgresql repos .

and so I patched the file tree_nodes.ts with your patch file.

Kindely tell me if I should do more.

Med venlig hilsen
Ayad Mohamed
Seniorkonsulent

[https://www.uvm.dk/-/media/Billeder/Mailsignatur/UVM_STIL_DK.png]

        Børne- og Undervisningsministeriet
Styrelsen for It og Læring
Kontor for It-drift
Vester Voldgade 123
1552 København V
Tlf.: 3587 8889

Direkte tlf.: +45 4172 7259
E-mail: [email-masked]
tree_nodes.ts

________________________________
From: Khushboo Vashi <[email-masked]>
Sent: 10 November 2021 13:01
To: Ayad Mohamed
Cc: [email-masked]
Subject: Re: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases

Hi,

The change is in the typescript file, so yarn bundle will be required. Have you done that?

Thanks,
Khushboo

On Wed, Nov 10, 2021 at 5:00 PM Ayad Mohamed <[email-masked]<mailto:[email-masked]>> wrote:

Hi Khushboo

regards

Ayad Mohamed

-------- Videresendt brev --------
Fra: Khushboo Vashi <[email-masked]<mailto:[email-masked]%3e>>
Til: pgadmin-hackers <[email-masked]<mailto:[email-masked]%3e>>
Emne: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases
Dato: Wed, 10 Nov 2021 11:06:00 +0530

Hi,

Thanks,
Khushboo

---

From: Khushboo Vashi <[email-masked]>
Date: Thu, 11 Nov 2021 10:02:07 +0530

Hi Ayad,

> Kindely tell me if I should do more.
To test this patch, you need to do following:

- Install yarn and nodejs on the ubuntu machine
- Run below commands to activate virtual environment and do yarn bundle

   -  source /usr/pgadmin4/venv/bin/activate
   -  cd /usr/pgadmin4/web
   -  yarn install
   -  yarn run bundle

Now, clear the browser cache, browse the pgAdmin4 and check.

Thanks,
Khushboo

> E-mail: [email-masked] tree_nodes.ts
>
>
> *From:* Khushboo Vashi <[email-masked]>
> *Sent:* 10 November 2021 13:01
> *To:* Ayad Mohamed
> *Cc:* [email-masked]
> *Subject:* Re: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases
>
> Hi,
>

---

From: Ayad Mohamed <[email-masked]>
Date: Thu, 11 Nov 2021 06:45:27 +0000

Hi Khushboo

Many thanks for your mail.

I am in /usr/pgadmin4/web the step yarn install says

yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'

 ??

Med venlig hilsen
Ayad Mohamed
Seniorkonsulent

Sent: 11 November 2021 05:32

Hi Ayad,

On Wed, Nov 10, 2021 at 6:18 PM Ayad Mohamed <[email-masked]<mailto:[email-masked]>> wrote:

Hi Khushboo

  *    source /usr/pgadmin4/venv/bin/activate
  *    cd /usr/pgadmin4/web
  *    yarn install
  *    yarn run bundle

Thanks,
Khushboo

Med venlig hilsen
Ayad Mohamed
Seniorkonsulent

Direkte tlf.: +45 4172 7259
E-mail: [email-masked]<mailto:[email-masked]>
tree_nodes.ts

________________________________
From: Khushboo Vashi <[email-masked]<mailto:[email-masked]>>
Sent: 10 November 2021 13:01
To: Ayad Mohamed
Cc: [email-masked]<mailto:[email-masked]>
Subject: Re: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases

Hi,

Thanks,
Khushboo

Hi Khushboo

regards

Ayad Mohamed

-------- Videresendt brev --------
Fra: Khushboo Vashi <[email-masked]<mailto:[email-masked]%3e>>
Til: pgadmin-hackers <[email-masked]<mailto:[email-masked]%3e>>
Emne: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases
Dato: Wed, 10 Nov 2021 11:06:00 +0530

Hi,

Thanks,
Khushboo

---

From: Khushboo Vashi <[email-masked]>
Date: Thu, 11 Nov 2021 12:48:14 +0530

On Thu, Nov 11, 2021 at 12:15 PM Ayad Mohamed <[email-masked]> wrote:

> Probably your yarn is not installed properly.
Please refer: https://linuxize.com/post/how-to-install-yarn-on-ubuntu-20-04/

> *Sent:* 11 November 2021 05:32
> *To:* Ayad Mohamed

---

From: Aditya Toshniwal <[email-masked]>
Date: Thu, 11 Nov 2021 12:52:40 +0530

Hi Khushboo/Ayad,

Maybe you can try on the nightly build -
https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2021-11-11/
Please make sure to replace the repo URL back to the stable release URL.

On Thu, Nov 11, 2021 at 12:48 PM Khushboo Vashi <
[email-masked]> wrote:

> Please refer:
> https://linuxize.com/post/how-to-install-yarn-on-ubuntu-20-04/
>
>
>>  ??
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Med venlig hilsen
>> Ayad Mohamed
>> Seniorkonsulent
>>
>>
>>
>>
>>

-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com>
"Don't Complain about Heat, Plant a TREE"

---

From: Ayad Mohamed <[email-masked]>
Date: Thu, 11 Nov 2021 07:26:08 +0000

Hi again

now it tells

yarn run bundle
yarn run v1.22.15
error Couldn't find a package.json file in "/usr/pgadmin4/web"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Med venlig hilsen
Ayad Mohamed
Seniorkonsulent

Sent: 11 November 2021 08:18

On Thu, Nov 11, 2021 at 12:15 PM Ayad Mohamed <[email-masked]<mailto:[email-masked]>> wrote:

Hi Khushboo

yarn install

 ??

Med venlig hilsen
Ayad Mohamed
Seniorkonsulent

Hi Ayad,

Hi Khushboo

Thanks,
Khushboo

Med venlig hilsen
Ayad Mohamed
Seniorkonsulent

Hi,

Thanks,
Khushboo

Hi Khushboo

regards

Ayad Mohamed

-------- Videresendt brev --------
Fra: Khushboo Vashi <[email-masked]<mailto:[email-masked]%3e>>
Til: pgadmin-hackers <[email-masked]<mailto:[email-masked]%3e>>
Emne: [pgAdmin4][Patch] - RM 6905 - Impossible to load databases
Dato: Wed, 10 Nov 2021 11:06:00 +0530

Hi,

Thanks,
Khushboo

---

From: Khushboo Vashi <[email-masked]>
Date: Thu, 11 Nov 2021 15:14:12 +0530

Hi Ayad,

On Thu, Nov 11, 2021 at 12:56 PM Ayad Mohamed <[email-masked]> wrote:

> We don't ship package.json file as the pgadmin4 package is not intended to
support in-line patching, but if you still want to do it, I have attached
the package.json file.
Place it at /usr/pgadmin4/web and do yarn install and yarn run bundle.
Also, if you come across the node js version error, please upgrade your
nodejs version.

Thanks,
Khushboo

> *Sent:* 11 November 2021 08:18
> *To:* Ayad Mohamed