1. James Levin
  2. PowerBuilder
  3. Wednesday, 30 November 2022 21:19 PM UTC

We've almost completed testing for our PB upgrade from PB 21.0.0.1506 to PB 22 (tested with both 1878 and 1892).

99.9% of the upgrade seems to be perfect! TY to the folks at APPEON. 

However, we have one issue with Webbrowser control and downloading files.

We allow the user to specify the download directory and set the path accordingly using...

WebBrowserSet ("DownloadPath", as_path) 

 

In Pb 21, this statement works and the browser downloads the files into the selected directory.

In both versions of PB 22, the statement set works and returns 1, but the browser downloads the files into pbcefdownload verses the set directory.   Tested this with the latest runtime and IDE also.  

Are there changes the WebBrowserSet or Webbrowser control that I missed?  or is this a bug?

Thank you in advance,

Jim 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 30 November 2022 21:59 PM UTC
  2. PowerBuilder
  3. # 1

Hi Jim ;

  The Web Browser control uses the "Chromium" engine "under the hood" to drive this built-in control. The Chromium engine was updated in PB 2022 so it is possible that this might have introduced this behaviour as a bug. Please open a support ticket for this issue. Many thanks in advance!

Regards ... Chris

Comment
There are no comments made yet.
James Levin Accepted Answer Pending Moderation
  1. Thursday, 1 December 2022 18:00 PM UTC
  2. PowerBuilder
  3. # 2

attaching prototype to page for evaluations 

Attachments (2)
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 December 2022 19:45 PM UTC
  2. PowerBuilder
  3. # 3

Hi James;

 I modified your Test Cases and now they work perfectly for me in PB 2021 & 2022 on W10 & W11 versions 22H2.

HTH

Regards ... Chris

Attachments (2)
Comment
  1. James Levin
  2. Friday, 2 December 2022 13:14 PM UTC
Chris, I finished my installs on my local PC and ran your solution. It still fails for me. My laptop is Windows 10 20H2 os build 19042.2251
  1. Helpful
  1. James Levin
  2. Friday, 2 December 2022 13:46 PM UTC
I reviewed the comments from Kai and then realized that you are setting the directory in the application object.

This works!!! However, if you try to change the download path after the object is created. It does not work.



I did not realize that you could set the path prior to the object existing.

Setting the user Agent in the app open event fails with a -8 (The setting name does not exist).

However, setting the Download path did work and return 1.



Now we know the issue: Changing the download path after the web control is instantiated doesn't work.



Thank you and Armeen for your help and all your timely responses!!!

It's very much appreciated.



Thank you again

Jim



P.S.

Running on PB IDE on a VM Windows 19 server, we realize that this is not strictly supported, but it has worked for us for years. It allows us to develop and find issues faster verses waiting for a deployment.



Now that I have installed PB locally we can compare apples to apples.





  1. Helpful 1
  1. Chris Pollach @Appeon
  2. Friday, 2 December 2022 18:21 PM UTC
Hi James ... FYI: It's working on my W10 O/S version 22H2 build 19045.2311

I am now getting the distinct feeling that this issue could be environment related. It could be the O/S configuration, Windows Policy settings and/or how the Chromium engine that drives the WB control reacts to each MS-Windows environment. Just my guess.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 December 2022 22:46 PM UTC
  2. PowerBuilder
  3. # 4

Are you sure the users have rights to where you are trying to set/get?  

Was the 2021 version of the app run as administrator and the 2022 version run as guest?

This seems to be a config issue rather than regression bug otherwise we surely would have heard from many other users.

Comment
  1. James Levin
  2. Thursday, 1 December 2022 23:02 PM UTC
I was thinking about that too, and It does seem to behave like that.

However, it runs in our production vm world today with pb21 without issue.

The directories that I'm using I have full rights, example: My downloads.



My workaround is to use the user's \pbcefdownload directory only and prevent them from changing the download location.

This will allow us to move forward on the migration to PB22









  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 1 December 2022 23:18 PM UTC
Very strange indeed. Just as troubleshooting step, try running the app as administrator by right-click on .EXE and select run as administrator option.
  1. Helpful
  1. James Levin
  2. Friday, 2 December 2022 13:20 PM UTC
I just tested this theory out. I installed PB22 build 1892 locally and used Chris's solution. Built the exe and ran the exe with admin and without admin rights. I did not change the results. I see that Kai was able to reproduce my issue, so that means that I'm not crazy.
  1. Helpful
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 December 2022 05:07 AM UTC
  2. PowerBuilder
  3. # 5

Hi James,

I reproduced it on our end, we will do further research to figure it out.

For your case, you need to close and open the window again to make it take effect, please work around the issue by setting the DownloadPath before opening the window.

Regards,
Kai

Comment
  1. James Levin
  2. Friday, 2 December 2022 13:00 PM UTC


I'm glad you can see the issue. I'm not sure I understand, do we set WebBrowserSet ("DownloadPath", path) before the webbrowser exists or do you want us to set the directory as part of the constructor event of the object?
  1. Helpful
  1. Andreas Mykonios
  2. Friday, 2 December 2022 13:33 PM UTC
WebBrowserSet & WebBrowserGet are global functions, not webbrowser control functions. So you can use them event in the open event of your application object. But in your case it is ok to make that setting just before issuing open - opensheet command as Kai Zhao states.

Andreas.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 2 December 2022 13:41 PM UTC
Hi James;

FWIW: It works either way OK in my testing. Even during an open WB control "on the fly". However, I'm testing on W10 & W11 and not on Windows 2019 server.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Raymond Longoria Accepted Answer Pending Moderation
  1. Thursday, 12 January 2023 23:22 PM UTC
  2. PowerBuilder
  3. # 6

I am not sure if I should put my comment in this thread or open another one.

I have the exact same issue as the user. We have an application using the browser control in PB 2021. It worked well downloading pdf and excel files. I use the WebBrowserSet function to set the download path in the open event of the application object.

It stopped working after we upgraded to PB 2022. I read through the documentation and I did not see anything that could help. Suggestions?

Comment
  1. James Levin
  2. Friday, 13 January 2023 12:42 PM UTC
per the comment from Kai, I thought. this was an open bug for Appeon.



Kai's workaround of setting the path prior was not worth the redesign effort.



My work around, disable the feature that allowed the user to set the directory selection (since our window had the directory on the page with the browser control). However, we did provided a folder button on the window to open to the default location using the environment variable for Temp + pbcefdownload

(C:\Users\appeon\AppData\Local\Temp\pbcefdownload) -- thus our users could locate the files that were downloaded very quickly.

  1. Helpful
  1. Raymond Longoria
  2. Friday, 13 January 2023 16:31 PM UTC
Thanks Armeen. I submitted a ticket.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 13 January 2023 17:22 PM UTC
We are doing major improvement of the WebBrowser control in PB 2022 R2... so I think when you guys upgrade to that revision these issues should be resolved. But it is still best to submit a support ticket so we can track. Thanks.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.