1. Matt Kleweno
  2. PowerBuilder
  3. Thursday, 7 April 2022 15:40 PM UTC

I am using PB2021 build 1311 and have a process that reads a local HTML file using the PB webbrowser control.  This HTML file is an image gallery than can vary in size from 1 image to 7000+ images.  The images are on the local network.  

Sometimes, when trying to render these HTML files, the webbrowser goes white and becomes totally unresponsive.  Pulling up the same HTML file in Chrome has no issues.  It doesn't seem to matter how large the HTML file is either.  Sometimes it goes white/unresponsive on a 10 image file but works fine on a 7000 image file.  Sometimes it fails on the same file 3 or 4 times in a row but then will work if you close/open the pb window that has the webbrowser control on it (with no changes to the HTML).

Also - I've tried to add this code in the open() of the application object as suggested on some other posts.  When running in debug mode, this code fails and returns the "Error setting the UserAgent for the WebBrowser :: -7".  Per the documentation -7 means CEF has been initialized, and the current item can only be set before CEF initialization.  

Please help! 

Is there something incorrect in my configuration or is this a PB bug?

 

int li_ret
string ls_ret
li_ret = WebBrowserGet("UserAgent", ref ls_ret)
if ls_ret = "" then
	li_ret = WebBrowserSet("UserAgent", "AppeonWebBrowser")
	if li_ret <> 1 then
		Messagebox("Information", "Error setting the UserAgent for the WebBrowser ::" + String(li_ret), information!)
	end if
end if

 

Arnd Schmidt Accepted Answer Pending Moderation
  1. Thursday, 7 April 2022 15:53 PM UTC
  2. PowerBuilder
  3. # 1

Hi Matt,

what I have seen is that PowerBuilder seems not to "unload" the CEF Browser Executable when you work with PowerBuilder IDE. (Take a look at your Taskmanager).

For the UserAgent: Why do you have to set the UserAgent?!

Check:

Navigate("chrome://version")

or Navigate to:

https://www.whatismybrowser.com/detect/what-is-my-user-agent/

hth

Arnd

PS: Working with PB 2019 R3.

Comment
  1. Tomas Beran
  2. Friday, 29 April 2022 10:36 AM UTC
Hi

"what I have seen is that PowerBuilder seems not to "unload" the CEF Browser Executable"

- I think you're right because sometimes I get

"-7 -- CEF has been initialized, and the current item can only be set before CEF initialization."

when I'm trying to set li_ret = WebBrowserSet("UserAgent", "XXXXX") at the open event in my app.

I think it depends on debugger was previously started but this is just my guess because the issue occurs randomly.

PB2021 1509



  1. Helpful
There are no comments made yet.
Matt Kleweno Accepted Answer Pending Moderation
  1. Thursday, 7 April 2022 16:03 PM UTC
  2. PowerBuilder
  3. # 2

Hi Arnd,

what I have seen is that PowerBuilder seems not to "unload" the CEF Browser Executable when you work with PowerBuilder IDE. (Take a look at your Taskmanager).

Is there something I should do to "unload" the CEF when working in the IDE?

For the UserAgent: Why do you have to set the UserAgent?!

I only did this set because I say other posts that said support recommended setting the User Agent.  The code works the same with or without it.  I only mentioned it because I saw others post it.

 

Comment
  1. Arnd Schmidt
  2. Thursday, 7 April 2022 17:45 PM UTC
Whenever I see a "opened" or "still running " number of pbcefclient.exe in the Taskmanager and the PowerBuilder IDE does not work correct, I close the PowerBuilder IDE and restart :-(
  1. Helpful 1
  1. Arnd Schmidt
  2. Thursday, 7 April 2022 18:20 PM UTC
The white screen can be a result of using an "older" CEF Version. But it is hard to report problems that "sometimes" occur.



  1. Helpful
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Friday, 8 April 2022 00:47 AM UTC
  2. PowerBuilder
  3. # 3

Hi Matt,

Can you reproduce the issue in specific steps? Please open a support ticket in the support portal and please provide a test case, Many thanks in advance.
https://www.appeon.com/standardsupport/

Regards,
ZhaoKai

Comment
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.