39
Views
6
Comments
[InAppBrowser Plugin] Couldn't load the page content
Question
inappbrowser-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

We were using version 2 of the InAppBrowser but we were recently forced to upgrade to the latest version of the InAppBrowser due to needing to use MABS 11. We are now using version 3.1.2

We use the InAppBrowser to handle payments in our app (opening in the WebView). Users are redirected to a third party to verify their payments. However, we are seeing lots of users unable to perform the verification and we are finding it difficult to diagnose why.

When testing we did notice on iOS devices (also seen on Android) that some pages would display a screen saying  "Couldn't load the page content"



Is there any way of finding out why the browser could not display the page content?

2025-01-10 11-40-52
Pedro Gustavo Bilro

Hey Robin, thanks for posting this.


I'll need to ask some more information:

- Did you upgrade only the InAppBrowser and MABS version, or did you upgrade other components when testing?

- Did you test using MABS 10 and InAppBrowser 3.1.2? This is more to confirm if the issue lies with the plugin or maybe with MABS.

- Have you tried using System Browser instead of WebView? Assuming it is possible, just to confirm if it works in one or the other

- The "couldn't load the page content" could be happening for many different reasons: Are the webpages behind any authentication? Is it trying to trigger any deeplink / opening other native mobile applications?

UserImage.jpg
Robin Gray

Our application needs to POST the contents of a form to another site which handles the data and takes users through a verification process.

This was working for quite a long time with version 2 (not sure exactly which version) of InAppBrowser and MABS11. To POST the form data we are doing something similar to this https://stackoverflow.com/a/44913205

We have a client action that calls the following Javascript (based on the CallBridge javascript within the plugins OpenInWebView action)

We cannot do the same thing with the System Browser as this errors with

OS-PLUG-IABP-0010: Custom Tabs couldn't open the following URL: data:text/html;base64,[BASE 64 ENCODED DATA]


We haven't tried MABS10 as to be able to release to the Apple AppStore we had to build with MABS11. Previously we were using InAppBrowser version 2 and MABS 10 without any issues.

2025-01-10 11-40-52
Pedro Gustavo Bilro

Understood, it's not a "standard" webpage URL, but rather a data URL. Version 3 has completely different internals from version 2, so it could be that something changed along the way that caused that to break.


From your tests does that error page get shown in a specific point of the flow, is it as soon as you call OpenInWebView? 

UserImage.jpg
Robin Gray

It's difficult to tell as we have not been able to replicate the issue in testing. Is there any way of getting some logging out of the plugin? Perhaps to find out why the page was unable to load.

2025-01-10 11-40-52
Pedro Gustavo Bilro

Hey Robin. I don't think there'll be much of logging you'll be able to get.

I tried to reproduce it on my end, but with no success. For your scenario, I recommend creating a ticket with OutSystems support, so that they can assist with digging deeper into the issue.


On another topic: As far as I know, 2.4.10 is possible to use with MABS 11. I'd recommend updating to the latest version, but in case there is a question of time / urgency, you could try reverting to that version of the plugin and see if it works.

UserImage.jpg
Robin Gray

After some investigation we did find that "Couldn't load page content" was displayed if the content of the page being displayed was JSON rather than HTML.

In the end we didn't find a fix, we were able to revert back to version 2 of the InAppBrowser (it was updated to support later versions of MABS) as we we found it unreliable and this was recommended by OutSystems Support.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.