-
Notifications
You must be signed in to change notification settings - Fork 6
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
java.lang.RuntimeException: Using WebView from more than one process at once with the same data directory is not supported. #20
Comments
InvestigationHi, thanks for your inquiry. You are absolutely correct. We did try to attempt to fix the problem, but it seems it’s not so straightforward 🤔. I have a couple of ideas how to try to approach this, however it will take a bit of time of testing to release a new version. I’m thinking of giving access to SDK user access to change this directory during runtime and making it unique for the SDK itself. Whenever its ready, I would love to hear from you if the fix has lifted your app issue. More about the problemYou can read more about the problem here. Also, to change cache directory for a webview is to use this
Seems like, whoever is using the webview in the app, are using the same cache directory that is created. And also, we’re not the only ones that are using webview for our data loading behavior. |
@marius-m I tried to fix as you reported, but I think that it could cause an unexpected application size growth, because it creates new folder, what do you think? |
Yeah I agree. We had this behavior reported before. Let me take a bit of time to take a look and test out. I'm thinking of creating "unique enough" directory, that maybe it would not cause problem for multiple processes, but static enough for the app to do a clean-up itself. Maybe that'll solve it 🤔 |
Bugfix summaryOkay, after a bit of investigation and testing, I was not able to replicate, crash the app using multiple processes in DemoApp using Adform tracking SDK. However, I did apply some changes for the project itself that may solve your issue or at very least push us forward in the investigation itself. All the changes are available in
Hopefully, these ’tools’ should be enough to solve your issue. Please ping me if you’re still experiencing any issues. If so, could you create a ’DemoApp’, where it replicates your situation and app crashes? This would help me immensely to proceed with this issue. |
Hello @marius-m I tried the new version of the SDK (2.5.2) on my app and I still get some crashes on our Sentry... Unfortunately I am not able to replicate the crash on my devices/emulators |
Hmm, I'm a bit confused. So you're getting crashes reported to Sentry, but cannot replicate the crash on the device? Could it be, that sentry gets reports from an older version, which does not have the fixes? |
The crash was introduced in the 2.5.1 Adform SDK release and is present also in 2.5.2, I am getting the crash using 2.5.2 I am not able to replicate it because it probably involves some activity recreation and is difficult to reproduce |
Is your app using different processes to access those directories from webview? With the newer version, I've introduced a method that lets you change the data directory manually, however, I doubt this will solve the problem. It is hard for us to replicate the problem as there multiple variations that may not be working. I'd suggest trying out to isolate and replicate the problem first. Create a new empty project and put in libraries that your app is using or how it is using. I'm guessing it should not be a problem to replicate a problem, as this crash is caused in initialization phase. If you'll be able to catch it, then we could try taking a further look. |
Hi, in my project I still have report of this crash. Are there news? |
It looks like in some edge cases, Android start a new process for the application when it thinks that a previous instance of your app's process has been killed but is actually still hanging around, causing there to be two copies of your app process at the same time. We have added random string also for the data directory suffix. It should fix this issue or reduce crash repetitions significantly. Changes are in 2.5.4 version |
After updating the SDK version to the 2.5.1, we got some crashes related to this https://crbug.com/558377.
The problems in brief is that in some situations some processes try to access WebView through the same directory, that is not possible on the Android platform. Probably the bug was introduced after the fix of this issue #19.
Here the log of the crash
We are not able to find any workaround, do you have any suggestion on how to solve this?
The text was updated successfully, but these errors were encountered: