-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Webview Crash With Android 8.1.0 / Chromium 67.0.3396.68 #1075
Comments
I'm running into a similar crash if the url one is visiting is redirected. The problem seems to do with the latest Chrome update and happens on Android 7.0 also. If I go with an older version of Chrome - works fine. This is with tns android 4.1.1 Is there a file I can modify to get this fixed? `An uncaught Exception occurred on "main" thread. ` |
@erjdriver the fix I have said in the first post should take care of this as well. For us also it was happening on shouldOverrideUrlLoading as well but on android 8.1. If you want to try the fix locally: |
Thanks for the quick response. Chrome 67.0.3396.68 Not sure about webview - my understanding is Chrome disables the installed webview. I don't have the setup to do a local build - I hope these guys fix it asap. Is there a change I can make in javascript from within Code editor - that'll fix this . I don't have the Android Studio etc installed. Thanks for reporting. |
@erjdriver are you sure the android version is 4.1.1? The chrome 67.0.3396.68 was not available when I checked below android 8.1. As far as I understand, I don't think you can fix this from javascript side as the issue happens during a javascript call from native side. |
I'm using tns android platform version 4.1.1 The Android version on my device is 7.0 My Chrome version is the same that's on the title of this thread. |
I am having same issue. I tested Android 7.0 and 8.1.0 and the issues occurs when Chrome 67 is installed. |
I believe the solution is provided by @sud80 above - requires you cloning and building the android module on your pc. Other is to wait for it to be fixed by NS. |
Is there a way to downgrade back to Chrome 66 ?
…On Mon, Jun 4, 2018 at 3:10 PM, erjdriver ***@***.***> wrote:
I believe the solution is provided by @sud80 <https://github.com/sud80>
above - requires you cloning and building the android module on your pc.
Other is to wait for it to be fixed by NS.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1075 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgM3s4P7jbSskSuSOILU0CaJMXeD-SFZks5t5YY2gaJpZM4UYkzZ>
.
|
@mspusta78, only unsafe methods as far as I know, you have to get the old APK and manually install it. |
You can "uninstall" Chrome to fix the issue. It will downgrade Chrome to the factory version, but it fixes the problem until we have the NS fix. |
@erjdriver I was able to clone the android module app but I am having hard time building it and I am not sure how to use it in my project. @sud80 sud80 Any insight or steps on how to do it? |
Hope this helps. |
Thanks for reporting and looking into this @sud80. I've applied the proposed changes and it's now on PR. We'll create a patch for this as long as it's ready. Meanwhile here's how you can easily debug the android runtime in your own project. |
@vtrifonov Will you apply the fix to NS 3.4.2 as well? How can we get this fix and apply this patch? If {N} wants to be used for enterprise level applications issues like these need to be prevented in the future. When issues like these arise it makes me reconsider the choice of {N} vs. pure native development. I enjoy working with {N} so I hope that {N} team will learn from this and prevent issues like these in the future from occurring. |
@mspusta78 We will create 3.4.3 patch as well so that you could easily fix your applications. In the meantime @sud80 you can check if android@rc works. We will release official package once we're ready. |
@vtrifonov Thank you for your detailed feedback. I believe that testing with Chrome Beta will prevent these issues in the future. I have updated to the latest version of {N}. Do you have ETA on the official package release to address this issue? ... or should we do tns update next |
I guess the official 4.1.2 package will be ready tomorrow. Until then please use android@rc but not @next as this is what will be released in 4.1.2. |
@vtrifonov correct. I'll be upgrading all my projects to 4.1 today |
@vtrifonov I did as you suggested: tns update @rc which installed but I still keep getting System.err: com.tns.NativeScriptException: Java Error! |
@mspusta78 can you try with tns platform add android@rc? |
I tried:
tns add android@rc
Unknown command 'add'. Use 'tns help' for help.
Did you mean?
update
then I ran:
tns update android@rc
Gradle build...
Platform android successfully removed.
Successfully removed plugin tns-core-modules
Successfully removed plugin tns-core-modules-widgets
Copying template files...
- Installing tns-android
Could not update the project!
…On Tue, Jun 5, 2018 at 5:28 PM, Vasil Trifonov ***@***.***> wrote:
Can you try with ‘tns add ***@***.***’?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1075 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgM3s7V2a3CY8fOmvr__fhdK7eVgANBPks5t5vf_gaJpZM4UYkzZ>
.
|
I agree. The solution to this issue was posted within hours of discovery
and now we are 3 days into this and still no fix.
{N} team, you need to understand that this impacts production software.
Our clients are being impacted and revenue is being lost.
If {N} wants to survive and claim to be an enterprise level software
solution issues like these must be considered as PRIORITY #1.
Please post the fix.
Thanks,
Martin
…On Tue, Jun 5, 2018 at 7:51 PM, erjdriver ***@***.***> wrote:
Dear NS,
How about this...this bug is breaking production software. The solution
has been posted by the OP.
Incorporate that fix and release 4.1.2.
With all due respect.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1075 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgM3s_yJEZHLm3vtjD_OWvnSpEbYiTV9ks5t5xmHgaJpZM4UYkzZ>
.
|
@mspusta78 Did you run |
Hi mspusta78, Thanks for reporting the issue and being active on this thread. On a separate note, I can assure you and all the community that the team will review how to improve its internal procedures for situations like this one. Best regards, |
@vtrifonov Trust me I have tried all of the above and all was failing. I just tried running and it succeed. Gradle build...
Thank you for fixing RC release so we can build it. |
@radeva I appreciate your feedback and your point of view on this matter, but I will politely disagree with your analysis and conclusion. All of our production environments have been down since May 31st. It is now June 6th! Excuse my frustration, but being down for 7 days is unacceptable and hardly considered as speedy solution. (considering that the solution was provided on day 2) Keep in mind that it will take us another day to wrap up this patch and get it implemented so our users will not get this release for another day. Someone dropped a ball here and it was definitely not us. I am sharing this feedback so you may use it in your discussion when reviewing your internal process because if you consider the delivery and time frame of this patch as acceptable I will have to consider switching our platform. Being down for 7 days is not an option in this day and age. Sincerely, Martin |
The issue is fixed and released in tns-android@4.1.2 version. |
@vtrifonov @vhristov5555 It will be helpful if you can create a patch release for 3.4.2 as well. |
Can confirm |
Thanks NS! Also big thanks to @sud80 for reporting the problem and finding the solution. |
No need to do: tns platform update android@rc
Just run:
tns update
as new version 4.1.2 has been released early this morning
…On Wed, Jun 6, 2018 at 12:52 PM, Jeff Switzer ***@***.***> wrote:
Can confirm tns platform update ***@***.*** fixed the issue here. Thanks
all!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1075 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgM3s4MfOU7F2suTQ4t2Em8A20Uoks7Sks5t6Ai6gaJpZM4UYkzZ>
.
|
@vtrifonov Is there an ETA for a 3.4.3 patch? |
@tbsf We are working on it, I hope it will be very soon. |
@tbsf @erjdriver @mspusta78 @jeffswitzer @sud80 Release notes: |
Also would like to thank @sud80 for migrating our forum concern into a github issue with much more detail. We're new to this platform and appreciate the support. |
+1 |
I updated to android 3.4.3 but still got the crash Here are my components version : │ Component │ Current version │ Latest version │ Information │ I don't want to update right now {N}4 because I don't have time to check up again the whole app, nor to make some code changes. That's why I'd like to stay on the 3rd version for the moment, but I really need to get this bug fixed. EDIT : |
Hi,
|
This issue is happening on a Samsung Galaxy S7, running with Android 8.0.0. Here is my package.json
|
Sorry for the inconvenience caused. From your package.json I could see that you are using:
The fix of the problem is introduced in tns-android 4.1.2 and above.
|
Yes I saw that (I dowgraded since yesterday because I had an other issue to solve) so I just updated. |
Could please try this project from The Playground(https://play.nativescript.org/?template=play-ng&id=dDxibY) on your device? |
Everything is working fine with your project.
Here is the code involved :
|
Can you please add the code of your |
Ok I just posted the method's code. I absolutely don't know why (didn't change any code), but the link opening is now working back on the Wiko, but is still broken on GS7. Here is the exact error I get :
|
Can you try to add all your functionality regarding the WebView in the playground session and reproduce it there, or give us a repo to reproduce it as otherwise it's hard for us to find what's causing this error. In the openWebViewLink method you've added there's a call to self.dispatcher which is null in our case. |
Sorry my bad I didn't pay attention to this ! Do you see the changes I have made in the code ? Not sure it is correctly saved in your project |
There seems to be an issue with the |
Looks like it's the point, sorry to see that the cause was so dumb ... |
@lsowmya you need to upgrade either to tns-android 3.4.3 or tns-android 4.1.3 or later where the issue is fixed. |
Did you verify this is a real problem by searching the NativeScript Forum
https://discourse.nativescript.org/t/webview-causes-app-crash-on-android-with-chrome-67-release/6202
Tell us about the problem
With the latest chrome (67.0.3396.68) update on Android 8.1.0 webview is crashing.
Please provide the following version numbers that your issue occurs with:
After further debugging,
Invoking of onReceivedError on webviewclient is causing the null pointer exception in Runtime.java (https://github.com/NativeScript/android-runtime/blob/v3.4.2/test-app/runtime/src/main/java/com/tns/Runtime.java), Line number 682: (String pname = p.getName();)
After the chrome update on the device, the 2nd(android.webkit.WebResourceRequest) and 3rd (android.webkit.WebResourceError) parameters of function onReceivedError of WebViewClient received object whose class is having empty package. This causes line 679 of https://github.com/NativeScript/android-runtime/blob/v3.4.2/test-app/runtime/src/main/java/com/tns/Runtime.java [clazz.getPackage();] to return null. And subsequently this causes null pointer exception on line 682 of same file [ String pname = p.getName(); ] .
Printing the class names inside the function getTypeMetadata, with latest chrome as webview, gives class vS, class vR.
But in the device if I select to use android webview instead of chrome webview, it gives class as com.android.webview.chromium.xz, com.android.webview.chromium.WL.
So essentially the function getTypeMetadata is not handling classes with empty packages.
So instaed of:
changing to:
This seems to be fixing the issue.
The text was updated successfully, but these errors were encountered: