Cap-go/capacitor-inappbrowser

Browser web context remains open after using close() method

Closed this issue · 1 comments

I am developing a hybrid iOS application based on Capacitor using Angular. To open links, I use the openWebView(...) method from the @capgo/inappbrowser plugin, version ^6.0.48. The main task of the plugin is to open a web page to perform actions such as user authentication. After that, I want to fully close the In-App Browser using the close() method.

However, despite calling the close() method, I notice that the web context of the In-App Browser does not fully close. When I inspect the application through Safari Developer tools, I can still see the web context active, leaving me with two contexts: one for my Angular application and one for the In-App Browser. It seems that the browser process is not fully terminated, even though the close() method was called.

Steps to Reproduce:

  1. Open a link from the Angular app using the openWebView(...) method of the @capgo/inappbrowser plugin.
  2. Perform actions on the web page (e.g., authentication).
  3. Call the close() method of the plugin to close the In-App Browser.
  4. Open Safari Developer tools and check whether the web context remains active.

Expected Behavior:

After calling the close() method, the In-App Browser and its web context should fully close, leaving no active processes or accessible contexts.

Actual Behavior:

The close() method visually closes the session, but the web context remains active and accessible through Safari Developer tools, indicating that the In-App Browser process has not been fully closed.

Logs and Errors:

There are no errors in the console, but the context remains available

This is the best we can do, I have try and there is no way to kill it more.
It's managed by OS, please re open if you have issue with this