-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Cannot find runtime for instance=com.tns.gen.android.webkit.WebViewClient_vendor #1667
Comments
anyone? :( |
Those crashes are still happening randomly. It is the most frequent crash we can obersve both in the Google Play Console and Crashlytics. Can anybody provide any insights or clues on how to address the issue? Current environment: node: 16.15.0
npm: 8.13.1
nativescript: 8.2.3
# android
java: 11.0.14.1
ndk: Not Found
apis: 29, 30, 31, 32
build_tools: 29.0.2, 30.0.3, 31.0.0
system_images:
- android-29 | Google APIs Intel x86 Atom
- android-29 | Google Play Intel x86 Atom
- android-30 | Google APIs Intel x86 Atom
- android-30 | Google Play Intel x86 Atom
- android-31 | Google APIs Intel x86 Atom_64
- android-32 | Google Play Intel x86 Atom_64 Dependencies"dependencies": {
"@angular/animations": "~13.3.11",
"@angular/common": "~13.3.11",
"@angular/compiler": "~13.3.11",
"@angular/core": "~13.3.11",
"@angular/forms": "~13.3.11",
"@angular/platform-browser": "~13.3.11",
"@angular/platform-browser-dynamic": "~13.3.11",
"@angular/router": "~13.3.11",
"@nativescript-community/ui-collectionview": "~4.0.52",
"@nativescript-community/ui-material-activityindicator": "6.2.14",
"@nativescript-community/ui-material-bottomsheet": "6.2.14",
"@nativescript-community/ui-material-tabs": "6.2.14",
"@nativescript-community/ui-pulltorefresh": "~2.5.1",
"@nativescript/angular": "13.0.4",
"@nativescript/core": "~8.2.5",
"@nativescript/firebase-core": "~2.1.0",
"@nativescript/firebase-crashlytics": "~2.1.0",
"@nativescript/firebase-messaging": "~2.1.0",
"@nativescript/iqkeyboardmanager": "~2.0.0",
"@nativescript/local-notifications": "~6.0.0",
"@nativescript/secure-storage": "~3.0.0",
"@nativescript/theme": "~3.0.2",
"@nota/nativescript-webview-ext": "~8.0.2",
"@nstudio/nativescript-barcodescanner": "~5.0.1",
"@nstudio/nativescript-snackbar": "~2.1.0",
"@triniwiz/nativescript-image-cache-it": "~7.0.15",
"nativescript-clipboard": "~2.1.1",
"nativescript-ui-listview": "~10.1.1",
"rxjs": "~7.5.4",
"zone.js": "0.11.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.8",
"@angular/cli": "~13.3.8",
"@angular/compiler-cli": "~13.3.11",
[...]
"@nativescript/android": "~8.2.4",
"@nativescript/ios": "~6.5.5",
"@nativescript/types": "~8.2.0",
"@nativescript/unit-test-runner": "~3.0.4",
"@nativescript/webpack": "~5.0.6",
"@ngtools/webpack": "~13.3.8",
[...]
"patch-package": "~6.4.7",
"typescript": "~4.6.4"
} |
@jessorlisa this is a gc issue, seems like the java ref is still around but the runtime already removed the instance kept. I believe updating the plugin to keep instances around & proper usage of |
@triniwiz thanks for the insights. Thats what i guessed as well. I would have a deeper look. But sadly its unclear for me where to start.. this code seems to be platform/sdk dependend generated code and not "simple" source code, which would be easy to fix. Any hints where we could start digging deeper? |
I also can see quite a high number of crashes in Google Play Console, that look similar to this:
|
@jessorlisa @felixkrautschuk I think your errors are not related (not directly). I think they both comes from unreleased objects but not the same. EDIT: you can try the change i applied in my fork here Akylas/NativeScript@dad92a4. If someone can confirm it fixes it i'll create a PR |
It could prevent errors when the client would be called while the runtime is dead NativeScript/android#1667
@farfromrefug We also see this in our app, but we use the ui-webview module (version 1.3.5). We get the following traceback:
I believe that ui-webview already calls |
@cdroege not good. is there any chance you can reproduce the bug with N |
I could not reproduce this problem on my own devices yet. I see that about 2-4% of our Android user base had this problem once in about 2 weeks, so it could take a while until I see this issue myself. When I look at the breadcrumbs and the other data from Sentry, there is also no obvious condition that triggers this issue. Sometimes the current activity in our app is resumed and the issue is triggered directly, but sometimes this issue also happens during the usage of the webview (a user scrolls down, scrolls then up and after a few seconds interacts with the webview again and the app crashes). It also happens with a lot of different Android versions (9-12). |
It's a tough one to recreate, but it's usually a gc issue. Proper use of weakrefs for callbacks/listeners can help prevent these kind of issues |
@farfromrefug I will try your suggestion immediately and keep you posted! |
@farfromrefug Unfortunately the error is still occuring, despite the suggested patch (I also patched our version of @nota/nativescript-webview-ext accordingly). Sorry for my late feedback, Google's review process is taking forever this days. |
@jessorlisa do you have logs (like logcat) of whats happening before that? |
I am afraid no. I will give it a try and see if I can reproduce it locally. Sentry is not an option right now. |
Seen this today for first time. Might be related or the same issue:
device: galaxyS9+, Android 10 package.json: "@nativescript-community/ui-webview": "^1.4.3",
"@nativescript/angular": "^14.0.0",
"@nativescript/core": "~8.4.7",
"@nativescript/android": "~8.4.0", cannot reproduce though. |
Receiving this same error, when uploading a test build to google play it highlights the issue for this specific device on SDK 31... not sure if helps, not sure where to start...
|
We've been encountering these crash reports for years now, yet we've never been able to pinpoint the root cause for the missing runtime. Any tips would be greatly appreciated. |
As a test, I've removed the Therefore, we are closing the ticket—although it would still be interesting to know what caused the crashes. |
@jessorlisa very interesting ! you removed it from @nativescript-community/ui-webview ? |
@farfromrefug Exactly. |
seems solved, thanks to @jessorlisa ! |
Environment
Ubuntu 20.04 LTS
Node.js v14.17.0
Nativescript CLI 7.2.1
Android SDK 30.0.3
package.json
MinSDK 23
To Reproduce
Not possible
Expected behavior
Should not crash
Sample project
Not possible
Describe the bug
Started to use the beatiful webview with @nota for more and more things.
Sadly im currently fighting with crashes reaching firebase:
Looking at the stack, it seems that the android application is crashing cause of a missing java/script reference.
Sadly im not even sure whos responsible for the crash, thats why i created it here. Is the bug in chromium,@nota or in tns-core?
I tried to look deeper into the cause of this problem. Looking at https://developer.android.com/reference/android/webkit/ServiceWorkerClient i saw plenty of changes in SDK 24, so i tried to raise minSDK to 24, which sadly didnt solve the issue.
Also i dont completly understand exactly when and how this "com.tns.gen.android.webkit.WebViewClient_vendor" is generated. Sometimes (at least on my windows machine) theres multiple of this classes in platforms\android\app\src\main\java\com\tns\gen\android\webkit even with different (version=$1? and sdk=$2?) WebViewClient_vendor_$1_$2 parameters.
Anyone can point me in the right direction what could cause this crashes and how to patch them?
The text was updated successfully, but these errors were encountered: