Open wilk opened 9 years ago
How does your app behave with UIWebView, memory-wise?
@EddyVerbruggen it crashes (and sometimes happens with WKWebView too). The mainly difference is on the app memory and the "Other Processes" memory: with WKWebView the first one remains fixed and the second one increases while with UIWebView is exactly the opposite.
I'm guessing WKWebView's memory is represented in 'Other Processes' as well. Are you constantly adding data in your app?
Yep, that's right for both! Basically there's a login page: when the user performs the login, the app starts to sync its db (PouchDB replicate) and data is constantly added for 10 minutes more or less. Then, the application stands by for user interactions but the memory is not freed anyway. Now, I don't know if the problem regards the Javascript garbage collector or the WKWebView but I know that is not freed in both cases.
It seems as if the memory is freed only when receiving memory warning or going to background mode. After such events everything seems to go back to normal.
For anyone wondering: This issue appears is also present with the official WKWebview plugin
For iPhone 6S the barrier for the webview crash seems to be around the 1,75GB memory mark.
It seems as if the memory is freed only when receiving memory warning or going to background mode. After such events everything seems to go back to normal.
What exactly do you mean with background mode?
It's possible there is also a link to Microsoft/cordova-plugin-code-push#158 -- even though in that case, we're talking the official WKWebview plugin.
Is this something restricted to IOS9 or lower or does it occur even for IOS 10 and above ?
I am facing this issue even on iPhoneX, iOS11.4.1 with the WKWebView.
@manish0282 I eventually got rid of the WKWebView and used the native IOS webview. Although the crashes do occur it is slower in comparision to WKWebView. You would have to do appropriate garbage collection to address the issues you face in your application.
It is happening to me too. After making some Firebase calls, the webview, in some devices, eventually crashes. I have returned my app to the UIWebView, even with several problems faced with it... Somone has discovered a solution?
Hi there,
first of all, thanks for this plugin! I'm using WKWebView 0.6.5 for an hybrid application built with Ionic 1.0.0 + AngularJS 1.4, PouchDB 5.1.0 and cordova-sqlite-storage plugin 0.7.11. The application is launched on iOS 9.1 with XCode and it's the only running app on the system. The starting memory snapshot is the following:
start
At the beginning, the memory is about 400MB: keep watching "Other Processes" memory. The application starts to download a 90MB db with PouchDB from a CouchDB server. As you can see, the memory always increases:
3 mins later -> 480MB
7 mins later -> 700MB
11 mins later -> 800MB
The app memory is fixed (from 10 to 30 MB) while the rest of the memory is increased from 400MB to 800+MB (as I said, is the only running app on the system).
To workaround it, I tried to reload the page with location.reload() and only 30MB of memory has been freed. The only way is to restart manually the entire app (so the WKWebView) but that's not a good solution.
Is there a way to free the memory? Why WKWebView is not freeing the memory?