HTMLViewer.LoadURL

In a simple window with an HTMLViewer control, this simple line of code
HTMLViewer1.LoadURL(“https://google.com”)
runs OK
but this other not
HTMLViewer1.LoadURL(“https://test.recetaonline.ar”)
and in a browser this last page works fine, like as follows:


may be something not supported by HTMLViewer ???

Make sure the useragent property is set.

@Greg_O Thanks…
I noticed that there is property UserAgent and a string parameter it is supposed to be set… Sorry by my ignorance, but which string is supposed to be set ?

in devtools of the page (https://test.recetaonline.ar/) I found this in the elements tab:

All that’s saying is that if JavaScript isn’t enabled, that text would be shown on screen.

Try using one from this page:

https://www.whatismybrowser.com/guides/the-latest-user-agent/safari

@Greg_O

  1. I do see an empty page, so I supposed that I need to enable JavaScript. But the question is how to enable JavaScript fir a HTMLViewer a Xojo Desktop App.

  2. I include this in the open event of the HTMLViewer

    Var agent As String
    agent = “Mozilla/5.0 (Macintosh; Intel Mac OS X 13_2_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15”
    Me.UserAgent = agent

and I am steel seeing an empty page

Two new data:
a) in a WebApp I can see the page OK
b) in the same desktop app in Windows I also see the page OK

So the only problem is in the Desktop App in Mac

It would not be blank. It would have that text you quoted visible.

When you say that it works in a browser on the mac, which browser were you using?

If you have a MacOS computer, fire Safari and take one UserAgent from the Developer Menu.

Thanks @Greg_O and @Emile_Schwarz
To clarify the problem:
This is what I saw if I browse the url https://test.recetaonline.ar in Safari or in Google Chrome


this is a xojo web app

and finally this is a xojo dektop app on window and on mac

As you see in the xojo desktop app in mac shows a blank page
I am using Xojo version 2022 R1
Thanks for any assistance !!!

This is what I see in a Xojo 2022R4.1 app running on Ventura 13.2.1 without setting a user agent string:

Thanks @Anthony_G_Cyphers
I will download Xojo 2022R4.1 and test it.
I have not Ventura and I I hope that it is only a XOJO problem solve in newer versions after 2022R1

It could potentially be an issue with your version of macOS. For HTMLViewer on macOS, the built-in WebKit renderer is always used, and the older the version of macOS, the more unsupported features and unfixed bugs you may run in to.

@Anthony_G_Cyphers
I notice more than that… I am running macOS High Sierra and I downloaded XOJO version 2022R4.1 and I have the following error just when I try to compile a so easy and simple project of 2 lines of code !!!

If you’d like to see the use a single rendering engine on all platforms for consistency, give this issue a thumbs up:
#50301 - Use CEF on all Platforms when not selecting “Native” option of HTMLViewer

Was this a brand new, unsaved project?

What do you have set for Minimum OS Version in the Build Settings? if you set nothing there, the default minimum appears to be 10.14.1 (Mojave).

Edit: 10.14.0, sorry.

No… But I made a brand new one and also save it and I receive the same error message

It looks like High Sierra is no longer supported by Xojo. I would expect it to still work, but I haven’t used High Sierra outside of VMs in years, and haven’t even needed the VMs in a year or more.

I would try @TimStreater 's suggestion of setting the macOS Minimum Version in the macOS Built Settings in your Xojo project, but I suspect that may not fix this:

@TimStreater
Where to set the minimun OS Version in the Build Settings ?