New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 820756 link

Starred by 11 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Chrome update crashes stock mail app

Reported by tslee1...@gmail.com, Mar 10 2018

Issue description

Steps to reproduce the problem:
1. Update Chrome
2. Open Stock email app on HTC One M9 Verizon (Nougat 7.0)
3. Send email - crashes when try to type

What is the expected behavior?
Email app won't crash

What went wrong?
The most recent Chrome update crashes the stock mail app on the HTC One M9 Verizon.  When I try to reply to an email, as soon as I try to type the reply, the mail program crashes.  When I uninstalled the Chrome update, the mail app started working again.  I installed and uninstalled Chrome, and verified that it is the Chrome update that is causing the crash.  This similar to the Android System Webview bug identified in this article:  https://www.huffingtonpost.com/2015/04/29/android-apps-crashing_n_7170556.html except that Andreoid System Webview is now integrated into Chrome (as I understand it) in Nougat.

Did this work before? Yes 61.0.3163.98

Chrome version: 65.0.3325.109  Channel: stable
OS Version: 7.o
Flash Version: 

My mail app worked again when I uninstalled the Chrome update
 
Components: Platform>Apps>ARC Mobile>WebView
Labels: Needs-triage-Mobile
Cc: sandeepkumars@chromium.org
Labels: WV-Triaged Needs-Feedback
Tested the issue in WebView and could not reproduce the issue.

Steps Followed:
1. Launched Stock Email
2. Composed a Mail, and sent
3. No Crash is seen

Chrome Versions tested:
65.0.3325.109

Android Version:
HTC One M9; 6.0.0

@tslee1968: Could you please try the same using latest WebView version and update?

Thanks!!

Comment 3 by tslee1...@gmail.com, Mar 13 2018

Thanks for testing.  I'm running Android 7.0, rather than Android 6.0.  Can
you try on Nougat?  Webview I don't think is available with 7.0 as it's
been integrated into Chrome with Nougat - but I could be wrong on that.
Please let me know.  Appreciate you trying to trouble shoot.
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 13 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by ctzsm@chromium.org, Mar 13 2018

Cc: changwan@chromium.org cma...@chromium.org
Components: -Platform>Apps>ARC
Labels: -Pri-2 Pri-1
I can repro this with HTC One M9 on Android 7.0 with the newest stable version of WebView from Play store (65.0.3325.109).

There was not crash with previous stable version of WebView.

The mail app version is 10.50.854801.

There is no obvious change to ThreadedInputConnection.java though. I'll try to do per build bisect, looks like this is a user device, can't install local build.

crash stack:

03-13 10:59:53.848 22184 22184 E AndroidRuntime: FATAL EXCEPTION: main
03-13 10:59:53.848 22184 22184 E AndroidRuntime: Process: com.htc.android.mail, PID: 22184
03-13 10:59:53.848 22184 22184 E AndroidRuntime: java.lang.AssertionError
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at org.chromium.content.browser.input.ImeUtils.checkCondition(ImeUtils.java:1)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at org.chromium.content.browser.input.ThreadedInputConnection.assertOnImeThread(ThreadedInputConnection.java:64)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at org.chromium.content.browser.input.ThreadedInputConnection.beginBatchEdit(ThreadedInputConnection.java:132)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at com.htc.android.mail.compose.j.beginBatchEdit(EditableWebViewInputConnection.java:265)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:488)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:91)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:173)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6523)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:938)
03-13 10:59:53.848 22184 22184 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828)
03-13 10:59:53.850  1543  3517 E ActivityManager: App crashed! Process: com.htc.android.mail

Comment 6 by ctzsm@chromium.org, Mar 13 2018

per build bisect range https://chromium.googlesource.com/chromium/src/+log/65.0.3325.47..65.0.3325.53

good 65.0.3325.47
bad 65.0.3325.53

(We have no success build in between.)

Comment 7 by ctzsm@chromium.org, Mar 13 2018

Cc: -changwan@chromium.org
Owner: changwan@chromium.org
Status: Assigned (was: Unconfirmed)
There is a change in between https://chromium.googlesource.com/chromium/src/+/57f1913bf21906302d122f4e05baa4b06da5ecf4 looks very suspicious, Changwan you might want to take a look.
Cc: satyavat...@chromium.org candr...@chromium.org
Components: UI>Input>Text>IME
Satya / Christine, do we have smoke test for this? If we don't, can we add one?

BTW, I can reproduce this by installing this on a Nexus device: https://apkdot.com/apk/htc-corporation/htc-mail/htc-mail-10-50-870589-480dpi-android-7-0/

Let me try to land a workaround ASAP.
Cc: alek...@chromium.org
Also, could we test other OEM email such as lge?
Cc: startm2...@gmail.com
cc'ing HTC: startm2000@, any idea how HTC mail ends up calling beginBatchEdit() on UI thread?
Labels: Merge-Request-66 Merge-Request-65 M-67
A temporary fix will land in ToT soon: https://chromium-review.googlesource.com/c/chromium/src/+/961276

Requesting merge request to 65/66. We can merge to M66 first and test it before landing it to M65.
Project Member

Comment 12 by sheriffbot@chromium.org, Mar 13 2018

Labels: -Merge-Request-65 Merge-Review-65 Hotlist-Merge-Review
This bug requires manual review: Request affecting a post-stable build
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
#8 - changwan@
We do have test cases for OEM emails (like HTC, Samsung, Sony etc) for app launch, compose, reply, reply all etc. We do run for releases.

alekyoo@ would update the bug soon.


Thanks!
WebView was able to reproduce on OEM email: 
HTC One A9 / NRD90M  vs 65.0.3325.109 (oem mail version: 10.50.870589) 
HTC U11 / NMF26X vs 65.0.3325.109 
Nexus 5x / N2G48J vs 65.0.3325.109 (htc mail version: 10.50.828204) 

no repro on OEM email: 
LG V20 / NRD90M vs 65.0.3325.109 
Sony Xperia Z3+ / 7.1.1 vs 65.0.3325.109 
HTC X9 / MRA58K vs 65.0.3325.109 

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f70d2f254255e1fddeadb34f37cf350415c2cb69

commit f70d2f254255e1fddeadb34f37cf350415c2cb69
Author: Changwan Ryu <changwan@google.com>
Date: Tue Mar 13 21:56:13 2018

Fix for a crash in HTC mail

For some reason, InputConnection#beginBatchEdit() is called on UI thread,
only after
https://chromium-review.googlesource.com/c/chromium/src/+/894499
has landed. One theory is that HTC mail has been doing this the entire
time, but beginBatchEdit() and some other methods were being ignored at
the beginning while delayed onCreateInputConnection was running.

Since this is observed only on HTC mail, let me land a temporary fix
for HTC mail for now, and investigate this further as necessary.

TBR: tedchoc@chromium.org
Bug:  820756 
Change-Id: Ib33dfa57372b0d914ccc294d91a9e00899366c1b
Reviewed-on: https://chromium-review.googlesource.com/961276
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542926}
[modify] https://crrev.com/f70d2f254255e1fddeadb34f37cf350415c2cb69/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java

Comment 16 by ctzsm@chromium.org, Mar 13 2018

Cc: changwan@chromium.org
 Issue 820788  has been merged into this issue.
Cc: macw@google.com
macw@: Hi, this is an issue in HTC mail on Android. We have a fix, but we're already late - WebView/Chrome M65 is already 100%. HTC will have to wait for 6 weeks for the fix on this. Can HTC investigate this and update their email app to avoid calling beginBatchEdit() on UI thread if necessary?

Comment 18 by macw@google.com, Mar 13 2018

changwan@ sure. They are chasing me for this as well. Thanks!

Comment 19 by cmasso@google.com, Mar 13 2018

Let's make sure to get the fix in M66 though. After canary verification.
Still we are able to repro this issue on latest M67: 67.0.3370.0 canary following below steps.
1.Open Email->Tap on compose and observe.
Tested device:HTC 10 / OPR1.170623.027

Thanks!
changwan@:
It seems like fix didnt make into last night canary:  https://chromium.googlesource.com/chromium/src/+log/67.0.3369.0..67.0.3370.0?pretty=fuller&n=10000 ?

Thanks!
macw@, could you confirm the following?

1) HTC mail is updatable through Play Store on Android N and above. (This crash only occurs on N and above).
2) HTC mail is fixing this issue.

I'm trying to assess whether we still need the workaround for M66 or not. Thanks!
Labels: Hotlist-ConOps
Project Member

Comment 24 by sheriffbot@chromium.org, Mar 14 2018

Labels: -Merge-Request-66 Merge-Approved-66 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M66. Please go ahead and merge the CL to branch 3359 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 25 by bugdroid1@chromium.org, Mar 14 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd1fe787db608dad32966bcdb8318c36b9370b7c

commit cd1fe787db608dad32966bcdb8318c36b9370b7c
Author: Changwan Ryu <changwan@google.com>
Date: Wed Mar 14 22:12:08 2018

Fix for a crash in HTC mail

For some reason, InputConnection#beginBatchEdit() is called on UI thread,
only after
https://chromium-review.googlesource.com/c/chromium/src/+/894499
has landed. One theory is that HTC mail has been doing this the entire
time, but beginBatchEdit() and some other methods were being ignored at
the beginning while delayed onCreateInputConnection was running.

Since this is observed only on HTC mail, let me land a temporary fix
for HTC mail for now, and investigate this further as necessary.

TBR: tedchoc@chromium.org
Bug:  820756 
Change-Id: Ib33dfa57372b0d914ccc294d91a9e00899366c1b
Reviewed-on: https://chromium-review.googlesource.com/961276
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Changwan Ryu <changwan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#542926}(cherry picked from commit f70d2f254255e1fddeadb34f37cf350415c2cb69)
Reviewed-on: https://chromium-review.googlesource.com/963582
Cr-Commit-Position: refs/branch-heads/3359@{#249}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/cd1fe787db608dad32966bcdb8318c36b9370b7c/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java

Comment 26 by cmasso@google.com, Mar 14 2018

Labels: -Hotlist-Merge-Review -Merge-Review-65
We are not sure whether your change fixes the issue or not. Please verify in Canary first before merging into the release branch.
 Issue 822056  has been merged into this issue.
 Issue 821932  has been merged into this issue.

Comment 29 by macw@google.com, Mar 15 2018

changwan@,

1) HTC mail is updatable through Play Store on Android N and above. (This crash only occurs on N and above).
Yes.

2) HTC mail is fixing this issue.
Yes, they are working on it. Their initial test is okay after remove calling beginBatchEdit(). They will provide the update to Play store after complete the test.
Fix issue verified on latest M66: 66.0.3359.33 and M67: 67.0.3371.0 
Mail version(10.70.1008405)

Tested Device:HTC 10 / OPR1.170623.027

Thanks!
Status: Verified (was: Assigned)
verified on latest M66: 66.0.3359.33 and M67: 67.0.3371.0 

HTC ONE A9 / NRD90M  

Comment 32 by ctzsm@chromium.org, Mar 19 2018

Cc: ctzsm@chromium.org
 Issue 823349  has been merged into this issue.
macw@,

Thanks. We've also landed a workaround in 66 just in case, but we may remove it at some point (M70).
macw@, please note that

 issue 823349  is slightly different. Could you check if there is any other InputConnection methods that you call on UI thread?

Comment 35 by macw@google.com, Mar 20 2018

changwan@. Relayed to HTC team already. Will feedback the updates.

Comment 36 by franka...@aol.com, Mar 20 2018

Iam on Android 8.0.0 software number 3.16.401.2 HTC 10
have the same issue unable to reply or send emails directly otherwise all working fine. Quick fix is uninstalling Chrome and returning to factory setting


Hi guys,
I can only download 65.0.3325.109, buggy version from the Play Store. Where can I download fixed version?
Is it anything I can do to make the Play Store refresh it's content?


download chrome cannary version from playstore, then go to Settings->Developer Options->WebView Implementation and choose Chrome Canary there.
Or simply uninstall chrome from playstore. That resets it to the factory version. Or got to apkmirror and look for the 64.x version of chrome.
Jantay, thank you very much! I've decided not to uninstall Android System WebView but to install Chrome Canary - better to have the latest, even unstable software instead of reverting to one that is old and has security issues. To avoid malware I've installed Chrome Canary from Play Store: https://play.google.com/store/apps/details?id=com.chrome.canary

Thanks again for a great, helpful reply, Jantay!

Comment 40 by ubhej...@gmail.com, Mar 23 2018

OK, so quite clearly there is a problem with chrome, I have android 8,htc10 and my mail crashes. What is being done about it? 
what about reading back? Seems it has been fixed by HTC, but google will provide a temp fix as well. But will take a while to get on the stable branch
Fix is available on the cannary version though that you can download from playstore. Read three comments back to see how to fix it for now.

Comment 42 by ubhej...@gmail.com, Mar 23 2018

I did read back but figured this was no fix for me. I use Firefox but keep all apps updated. You say htc have a fix, this would suggest it is an htc fault? The problem only occurred when chrome was updated. I've looked for a software update from hTc and have not found one. Solution is to uninstall updates to chrome and wait for a fix I suppose. Appreciate the response though. 

Comment 43 by macw@google.com, Mar 24 2018

Guys, HTC will provide new EMail apps to Play store for everyone to update on 3/28. FYI.
 Issue 826358  has been merged into this issue.
 Issue 826368  has been merged into this issue.

Sign in to add a comment