1. Balu Krishnasamy
  2. PowerBuilder
  3. Tuesday, 16 July 2019 18:48 PM UTC

Microsoft Web Browser Control Issue:

We Upgraded to PB 2017 R3(1858) recently. Ever since we deployed our application using PB2017, there has been intermittent issues with respect to the way how the MS Web Browser Control displays the site. We do have the FEATURE_BROWSER_EMULATION set to 8888. This issue is mostly seen on Win10.

The Activex control is embedded on a window.

An Ideal Log looks something like this. When the issue occurs, the page goes blank and it appears that its still trying to load something on the webbrowser control eventually bringing down the window(window goes not responding), the lines in the color wont get logged.

It seems like something to do with executing the java script and the cached html after that. Again, this is intermittent and wide spread on Win10. Our support concluded that its not environmental or anythign to do with windows update.

Any thoughts are highly appreciated as the list of customers getting affected is growing day by day.

ole_xyz.beforenavigate2 -  Incoming URL: http://localhost:8081/xyz-web-application/?screenId=&noCacheToken=20190716115652
ole_xyz.downloadbegin    
ole_xyz.downloadcomplete    
ole_xyz.downloadbegin    
ole_xyz.navigatecomplete2(): url: http://localhost:8081/xyz-web-application/xyzweb/?screenId=&noCacheToken=20190716115652
ole_xyz.downloadcomplete    
ole_xyz.documentcomplete: http://localhost:8081/xyz-web-application/xyzweb/?screenId=&noCacheToken=20190716115652
ole_xyz.beforenavigate2 -  Incoming URL: javascript:''    
ole_xyz.beforenavigate2 -  Incoming URL: http://localhost:8081/xyz-web-application/xyzweb/F69D5B8545FF4831FCB0189E092A7E51.cache.html    
ole_xyz.downloadbegin    
ole_xyz.navigatecomplete2(): url: http://localhost:8081/xyz-web-application/xyzweb/F69D5B8545FF4831FCB0189E092A7E51.cache.html    
ole_xyz.downloadcomplete    
ole_xyz.documentcomplete: http://localhost:8081/xyz-web-application/xyzweb/F69D5B8545FF4831FCB0189E092A7E51.cache.html    
ole_xyz.downloadbegin    
ole_xyz.downloadcomplete    
ole_xyz.beforenavigate2 -  Incoming URL: about:blank    
ole_xyz.downloadbegin    
ole_xyz.navigatecomplete2(): url: about:blank    
ole_xyz.downloadcomplete    
ole_xyz.documentcomplete: about:blank    
ole_xyz.downloadbegin    
ole_xyz.downloadcomplete    
ole_xyz.downloadbegin    
ole_xyz.downloadcomplete  

Michael Hartnett Accepted Answer Pending Moderation
  1. Wednesday, 17 July 2019 09:16 AM UTC
  2. PowerBuilder
  3. # 1

Hi Balu,

I have also had issues with the IE Control running Javascript.  It can be intermittent following updates, etc.

There is a registry setting to control whether the Browser can run Javascript.  Using the normal IE browser you would normally get prompted or a warning, but this is not the case with the activex control.

Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN

Set the value for iexplore.exe to 0.  I use the following code in my window to check and set the value.

//Set Registry Value to allow IE object to run Active Scripts, including javascript
Integer li_result

ulong lul_num, lul_set

li_result = RegistryGet("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN", "iexplore.exe", RegULong!, lul_num)

if li_result = 1 and lul_num <> 0 then

lul_set = 0

li_result = RegistrySet( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN", "iexplore.exe", RegULong!, lul_set)

if li_result = -1 then MessageBox('Error Setting Registry Value!','Error setting Active Scripts Registry Value.')

end if

I hope that helps.

Michael

Comment
  1. Olan Knight
  2. Wednesday, 17 July 2019 15:51 PM UTC
Please let us know if this fix works for you!



Thanks,

Olan
  1. Helpful
  1. Balu Krishnasamy
  2. Wednesday, 17 July 2019 17:57 PM UTC
@Olan, Absolutely. We have decided to test it out directly by changing the registry value. Our support is on it. Will keep posted when i hear from them! Thank you all!
  1. Helpful
  1. Balu Krishnasamy
  2. Thursday, 18 July 2019 14:22 PM UTC
@here Our support just got back on this and looks like there is no improvement after changing this registry.

We also heard something new today from other sites, it appears to be they are seeing a javascript error on the webbrowser(even without the registry change) and we think it could be due to some stale cached htmls thats out there. We plan on cleaning up these files and hopefully that will fix it. The registrykey change was worth a shot. Thank you all!
  1. Helpful
There are no comments made yet.
Balu Krishnasamy Accepted Answer Pending Moderation
  1. Wednesday, 24 July 2019 19:07 PM UTC
  2. PowerBuilder
  3. # 2

We tried clearing the cache and that didnt seem to fix the issue either.

Any help on why the MS Web Browser control would freeze while trying to execute a javascript would be helpful. Thanks!

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 24 July 2019 19:37 PM UTC
  2. PowerBuilder
  3. # 3

Try using my WebBrowser wrapper object and see if it makes any difference.

http://www.topwizprogramming.com/freecode_webbrowser.html

 

Comment
  1. Nasrul lah
  2. Tuesday, 20 August 2019 02:59 AM UTC
i have try using webbrowser can not work, blank data
  1. Helpful
There are no comments made yet.
Nasrul lah Accepted Answer Pending Moderation
  1. Tuesday, 20 August 2019 03:02 AM UTC
  2. PowerBuilder
  3. # 4

running in PB desktop, can work but not work after compile with appeon

Comment
There are no comments made yet.
Nasrul lah Accepted Answer Pending Moderation
  1. Tuesday, 20 August 2019 03:05 AM UTC
  2. PowerBuilder
  3. # 5

Comment
There are no comments made yet.
Balu Krishnasamy Accepted Answer Pending Moderation
  1. Wednesday, 11 September 2019 16:31 PM UTC
  2. PowerBuilder
  3. # 6

@here,

A quick update. We were able to pinpoint the issue  to google analytics and the team responsible for it made some changes in the sequence and that seems to have taken care of this. I really appreciate your time and all the ideas. Thank you!

On a different note, After upgrading our code base to 2017 R3, we had numerous crashes relating to the OLE browser control. It appears the OLE control hasn't been instantiated when the window open event makes a navigate call to the ole control resulting in an Error 35. We moved that code to pfc_postopen and check the validity of the ole control now before we make a navigate call the ole control. This seems to have fixed this issue.

This behavior was NOT observed in the previous versions of Powerbuilder. Not sure if anything to do with the event sequence or to do with the OLE browser got changed in 2017 +

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 11 September 2019 18:08 PM UTC
That is because Sybase & SAP changed some event's "firing" order in B 12.5;2 and 12.6. Appeon PB is based on the PB 12.6 baseline code. So using a "Post Open" or "Post Constructor" event is most prudent (in any PB version) IMHO.
  1. Helpful
  1. Balu Krishnasamy
  2. Wednesday, 11 September 2019 19:25 PM UTC
Thanks much for the clarification, Chris! We moved from PB 12.0 to 2017 so that explains it and i agree on the "post" event practice.
  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.