Using Xojo 2015 in windows, today a form that includes an HTMViewer set to Native, doesnt work any more, when it was working just fine 2 days ago, using unchanged code.
It works when set to webkit
Might this be due to Google enforcing 2Factor verification this week?
(If so, Im about to be hit by thousands of complaints from people who bought from me over the last few years… :< )
It could simply be that they updated the page to use a newer technology that’s not available in the browser version that “Native” offers. Remember, it’s whatever browser the OS decides to serve up. On Windows 7, the default was IE9 I believe, and while Windows 10 never had IE, it certainly could be providing a version of the Edge engine before they switched over to Chromium.
In Windows, I had lots of problems in the past with corrupted systems. Each machine had an “environment”, sometimes a “hacked environment” were the user removed things or fine tuned it to some special case he had. So instead of landing on systems with alien HTML engines, I decided to carry them with me. That’s why when using HTMLView I always want the Chrome Engine (CEF) set as the default engine.
Whatever, it’s clearly time to lose the HTMLViewer control from my project
(Its been unreliable for a long time for me)
Sadly, displaying RTF isn’t easy cross platform… MBS has stuff that uses Mac libraries, but nothing for Windows.
Ditto displaying PDF in a scrollable control.
Its looking like boring plain text is the only safe option.
I currently use HTML viewer to display local HTM files and to display update info from the web.
What works for one doesnt work for the other.
The version I use seems not dependent, not sure Xojo 2015. Try it in a new clean VM, see it by yourself. In case of needing it you could detect it and ask the user to install it.
I just had a client of mine try to authorize an older (non-Xojo) app with Gmail this morning and it failed, likely due to this reason. Seems Edge is now trying to emulate IE which doesn’t work with the older method used to get Google authorization.
The ‘quick’ fix in this case was to disable that feature in Edge by going to:
edge://settings/defaultbrowser (in Edge) and changing the setting “Let Internet Explorer open sites in Microsoft Edge” to Never. It then reverted to IE handing the authorization.
This registry key makes a world of difference, but WebView2 is even better. So my policy is this:
For Windows 7, don’t even try to show web content.
For Windows 10, use the following code to add the registry key if WebView2 is not available. Use WebView2 if it is available.
For Windows 11, use WebView2.
If WebView2ControlMBS.AvailableCoreWebView2BrowserVersionString.IsEmpty Then
Var Reg As New RegistryItem("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION")
Reg.Value(Self.ExecutableFile.Name) = &h2AF8
End If
Then I have a container control instance that uses WebView2 when available, or HTMLViewer when it isn’t. It’s a bunch of effort, but saves about 100MB on the installer and doesn’t risk zombie CEF processes.
Such is life. I’ve still got to finish my Gmail re-implementation and the Goggle needs to approve the app. Which sounds about as much fun as a root canal.