Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App freezing after opening the InAppBrowser on specific URLs / Inputs #296

Closed
alan-grixti opened this issue Sep 11, 2018 · 18 comments
Closed

Comments

@alan-grixti
Copy link

alan-grixti commented Sep 11, 2018

I would like to bring to attention an issue (I believe it's a bug, could be wrong) which I've come across. I believe it is easy to reproduce, and managed to successfully reproduce it repeatedly myself on a test environment. Zip file linked bottom of issue containing the test environment. GIF showing the issue added below.

In brief, the problem is that on some particular sites, whenever navigation / keyboard is triggered in the InAppBrowser window, it is causing the underlying application to freeze and become unresponsive to any user actions.

Environment: Cordova 8, iOS 4.5.5 and Ionic 3
Affected Platform : iOS
Versions: iOS v11.4
Devices Affected: iPhone 5 up to 6S/Plus

Steps to reproduce:

  1. Create a blank project (Ionic, whatever flavour you prefer).
  2. Add reference to the InAppBrowser plugin
  3. Run use case below:
  • Open https://www.google.com in InAppBrowser
  • Locate the search bar on the page and type something.
  • Click / tap outside of the search bar
  • Close the InAppBrowser instance
  • App will be unresponsive

ezgif com-gif-maker

Link to test environment : iab-test.zip

@alan-grixti alan-grixti changed the title App freezing after opening the InAppBrowser on specific URLs App freezing after opening the InAppBrowser on specific URLs / Inputs Sep 11, 2018
@PieterVanPoyer
Copy link

Hello, it seems like we're experiencing the same issue.
We experience it after opening the InAppBrowser. A keyboard is not necessary to freeze the app afterwards.

Can you confirm that please?

@alan-grixti
Copy link
Author

Hi, yes. I have ran into that too. However could not pin point an exact trigger.

@PieterVanPoyer
Copy link

I am currently using a fork of the plugin, so it is possibly related to a development commit.
You seem to be using the version 3.0.0 for this.

@alan-grixti
Copy link
Author

At first I was using a fork of this which I created myself for development purposes, mostly dealing with the iPhone X's status bar not being handled as gracefully as desired by the plugin. And that's where I stumbled upon this issue. However, I reverted back to version 3.0.0 and saw that this behavior is present in it too.

@PieterVanPoyer
Copy link

In my app I have next line [tmpWindow setWindowLevel:baseWindowLevel+1]; from
dc5329d
I changed it back again to [tmpWindow setWindowLevel:UIWindowLevelNormal];
the old code and it works. (See line 245 of CDVInAppBrowser.m )

We are using the WebView and not yet the WkWebview. But in your zip file the line is still the old one.

@alan-grixti
Copy link
Author

So basically if I revert commit dc5329d, the mentioned issue would be fixed?

@PieterVanPoyer
Copy link

I think you should try it. But you have to be sure the line is out of the xcode project. So rebuild it after the revert by removing and adding the platform I think.

@alan-grixti
Copy link
Author

Hi Pieter, tried it but unfortunately the freezing still occurs.

@PieterVanPoyer
Copy link

Today I will be working on it a little bit. Maybe you could try to use the 2.x version (latest stable 2 version).
Does that solve your problem?

@alan-grixti
Copy link
Author

Sadly no, this issue is still present in version 2.0.2.

@PieterVanPoyer
Copy link

Is this issue still present? For me the reverting of one code line solved the problem.
If it is still present. Can you send or zip your Plugins folder of your Xcode project. (The Plugins folder in the platform/ios/YourProject/Plugins ) But make sure the issue is still present in the project.

@alan-grixti
Copy link
Author

alan-grixti commented Sep 19, 2018

I can reproduce it from my iPhone 5s. I don't know if I'm doing something wrong myself at this point. Compressed below are the complete iOS project and the plugins folder as requested. Right now it's running the 3.0.0 version with the specified line mentioned before changed manualy.

Thanks for your patience @PieterVanPoyer .

ios.zip
Plugins.zip

@PieterVanPoyer
Copy link

Hey I have no iPhone 5s to test it, and a new Cordova project with the latest stable inappbrowser (3.0.0) doesn't fail at my PC. So I won't be able to help you with this case.

I did make a testcase with a plain setup and with the latest (3.0.1-dev) version.
And then the app stalls after returning from the inappbrowser. I keep thinking it is related to: dc5329d .
So I have file an issue with a little test repo for this.

@jacobg
Copy link

jacobg commented Oct 11, 2018

I'm having this problem on version 2.0.2, and I applied the following commit fix (not on npm yet) and it works fine: https://github.com/apache/cordova-plugin-inappbrowser/pull/272/files

Does that fix not work for you?

@jcesarmobile
Copy link
Member

Closing as duplicate of #314, despite it's older, it has a PR already.
Anyway, I think #272 should have fixed it.

@ankeetasingh
Copy link

@jcesarmobile Any updates on when the plugin will be released with the fixes?

@jcesarmobile
Copy link
Member

No

@vavanish
Copy link

Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants