Status Update
Comments
jb...@google.com <jb...@google.com> #2
Android build
Which Android build are you using? (e.g. OPP1.170223.012)
Device used
Which device did you use to reproduce this issue?
Steps to reproduce
What steps are needed to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report capturing
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory. Attach the bug report file to this issue.
Alternate method
After reproducing the issue, navigate to “developer settings”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen capture of the issue
Press the volume down and power buttons simultaneously. The image will appear in your gallery. Attach the screenshot file to this issue.
NOTE : To avoid leaking private information, please share screenshots and bugreports only in Google Drive. Share files with android-bugreport@google.com and include only Google drive links in your bug. Bug report attachments should not be included directly in issue reports.
jo...@meterapp.co <jo...@meterapp.co> #4
- when long pressing text (e.g. the headline)
- when opening a select
Both will ultimately load an alert dialog with a list adapter that has the layout ids for the content set to 0.
This is reproducible on an API 21 emulator (Nexus 5 configuration, no Chrome installed).
NB There is a second issue when loading the web view in the first place which in this sample project is worked around by using a resource wrapper. This is already reported under
jo...@meterapp.co <jo...@meterapp.co> #5
jb...@google.com <jb...@google.com>
fa...@gmail.com <fa...@gmail.com> #6
We can't do anything to fix this - you need to solve the underlying problem with appcompat and stop wrapping it like this, and then resources will work.
jo...@meterapp.co <jo...@meterapp.co> #7
Surprisingly,
> in Android 6.0 (API 23) it crashes on tapping the <select> element.
---
From
> This change is the root cause:
>
> sAlwaysOverrideConfiguration forces updating the Resources configuration and therby messing up the webview inflation on older devices.
Chis, any chance this checks out? I didn't look too closely into this, so I'm not sure if there are consequences to not overriding the configuration on L-M only, or perhaps further limited old WebView versions only.
ap...@google.com <ap...@google.com> #8
jb...@google.com <jb...@google.com> #9
jo...@meterapp.co <jo...@meterapp.co> #10
jb...@google.com <jb...@google.com> #11
jo...@meterapp.co <jo...@meterapp.co> #12
jb...@google.com <jb...@google.com> #13
Here is one of them.
It will be great if you can take some time to revisit duplicate tickets. I believe a lot of developer are looking for the fix or workaround.
Thank you!
jo...@meterapp.co <jo...@meterapp.co> #14
jo...@meterapp.co <jo...@meterapp.co> #15
jb...@google.com <jb...@google.com> #16
W/System.err: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
at android.view.ViewRootImpl.setView(ViewRootImpl.java:566)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at com.android.org.chromium.content.browser.input.SelectPopupDialog.show(SelectPopupDialog.java:133)
at com.android.org.chromium.content.browser.ContentViewCore.showSelectPopup(ContentViewCore.java:2229)
at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
kl...@gmail.com <kl...@gmail.com> #17
ha...@gmail.com <ha...@gmail.com> #19
8h...@gmail.com <8h...@gmail.com> #21
jo...@meterapp.co <jo...@meterapp.co> #22
This is a project created by New Android Project -> Blank Activity -> Add WebView to layout/main_activity.xml, run on API21 emulator and it crashes with the following trace
11-27 14:12:26.160 3218-3218/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.crashingwebview, PID: 3218
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.crashingwebview/com.example.crashingwebview.MainActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class android.webkit.WebView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.webkit.WebView
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.example.crashingwebview.MainActivity.onCreate(MainActivity.kt:10)
at android.app.Activity.performCreate(Activity.java:5937)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.example.crashingwebview.MainActivity.onCreate(MainActivity.kt:10)
at android.app.Activity.performCreate(Activity.java:5937)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040002
at android.content.res.Resources.getText(Resources.java:274)
at android.content.res.Resources.getString(Resources.java:360)
at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:702)
at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:608)
at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:619)
at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:758)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:608)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:546)
at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:312)
at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:97)
at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:264)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:124)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:111)
at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:108)
at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:261)
at android.webkit.WebView.<init>(WebView.java:548)
at android.web
changing appcompat library version to 1.1.0-rc01, the app launches with an empty webview without crashing.
il...@google.com <il...@google.com> #23
Anyway, I've found a workaround which I *think* works, at least the tests are now all passing on API 21/22. Apologies for the delay in reaching this. It unfortunately wasn't an easy bug to find a workaround for.
Pending CL:
jb...@google.com <jb...@google.com>
ud...@gmail.com <ud...@gmail.com> #24
Besides, `Context.getAssets()` and `Context.getResources().getAssets()` are returning the same object on latest versions of Android in the same condition. I found that `ContextImpl.getAssets()` is returning `getResources().getAssets()` in the latest source code.
fa...@cosmoconnected.com <fa...@cosmoconnected.com> #25
ap...@google.com <ap...@google.com> #26
Branch: androidx-master-dev
commit 0850be80d556fc23a6f39a094c923665c24e3de2
Author: Chris Banes <chrisbanes@google.com>
Date: Thu Nov 28 16:39:07 2019
DayNight rewrite v2.5
We've now moved to using createConfigurationContext(),
instead of applyOverrideConfiguration(). Certain older versions
of WebView have an issue when an app uses
applyOverrideConfiguration(), but they seem to work fine
using createConfigurationContext() /shruggie.
To use createConfigurationContext(), I've had to refactor a
lot of updateNightMode() code to also have another entry
point which returns a Context for attachBaseContext().
Test: ./gradlew appcompat:connectedCheck
BUG: 141351441
Change-Id: I7a5b59071f82b79820c6df695bfa622d727f2030
M appcompat/appcompat/api/1.2.0-alpha01.txt
M appcompat/appcompat/api/current.txt
M appcompat/appcompat/api/public_plus_experimental_1.2.0-alpha01.txt
M appcompat/appcompat/api/public_plus_experimental_current.txt
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatActivity.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegate.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java
M samples/Support7Demos/src/main/res/layout/appcompat_night_mode.xml
M samples/Support7Demos/src/main/res/values/strings.xml
jb...@google.com <jb...@google.com> #27
This should be out in AppCompat v1.2.0-alpha02
.
If you'd like to try this now, you can try the 1.2.0-SNAPSHOT
version, available at the following repository:
repositories {
maven {
url 'https://ci.android.com/builds/submitted/6043188/androidx_snapshot/latest/repository/'
}
}
nu...@idoctus.com <nu...@idoctus.com> #28
jo...@meterapp.co <jo...@meterapp.co> #29
na...@google.com <na...@google.com> #30
#29: Probably not. The fix is quite invasive and moves AppCompat to using yet-another-way to implement custom configuration handling. The change itself may uncover more issues so we need some soak time in alpha.
jo...@meterapp.co <jo...@meterapp.co> #31
la...@gmail.com <la...@gmail.com> #32
Hmmm, confirmed. Looks like my change didn't actually make it into the snapshot I listed above. /facepalm I just tried the latest snapshot repository available, and that is working:
androidx.appcompat:appcompat:1.2.0-SNAPSHOT
repositories {
maven {
url 'https://ci.android.com/builds/submitted/6052626/androidx_snapshot/latest/repository/'
}
}
bi...@gmail.com <bi...@gmail.com> #33
jb...@google.com <jb...@google.com> #34
I know there are lots of people getting mail on each comment, apologies, but I wanted to confirm that the fix will still be landing in 1.2.0-alpha02? I'll be ready to test it but don't waste the time if the last couple comments mean it will be in the release after alpha02 now
Thanks!
bi...@gmail.com <bi...@gmail.com> #35
Yep, should be in 1.2.0-alpha02
.
The last few comments are just about the snapshots release.
am...@gmail.com <am...@gmail.com> #36
nu...@idoctus.com <nu...@idoctus.com> #37
`1.2.0-alpha02` still not release in google maven. When you'll release this modification for everyone?
li...@gmail.com <li...@gmail.com> #38
The desire to let this change "soak" because it is a major implementation change suggests that I am probably better with "the devil I know," and should stay with the alpha01 release, particularly since it is only an issue on Android 5 and only triggered by a particular activity that is not routinely performed by most users.
Thoughts?
jb...@google.com <jb...@google.com> #39
jo...@meterapp.co <jo...@meterapp.co> #40
si...@gmail.com <si...@gmail.com> #41
jo...@meterapp.co <jo...@meterapp.co> #42
pr...@google.com <pr...@google.com> #43
Thanks for any info.
sh...@gmail.com <sh...@gmail.com> #44
Apologies for the delay in releasing, it slipped through the cracks. AppCompat 1.2.0-alpha02 is currently scheduled for release later this week, but may slip to next week.
[Deleted User] <[Deleted User]> #46
nu...@idoctus.com <nu...@idoctus.com> #47
This is the crash when i press (NOT LONG PRESS) and select a popup:
W/System.err: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
W/System.err: at android.view.ViewRootImpl.setView(ViewRootImpl.java:566)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at com.android.org.chromium.content.browser.input.SelectPopupDialog.show(SelectPopupDialog.java:133)
at com.android.org.chromium.content.browser.ContentViewCore.showSelectPopup(ContentViewCore.java:2229)
W/System.err: at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
jo...@meterapp.co <jo...@meterapp.co> #49
Hey guys
If you have this argument
Wrapping Resources is not supported by the framework and you must not create your own instances of Resources at all (the APIs to do so are now marked deprecated after they were accidentally exposed).
Then you must supply a way to implement custom translations, there are many companies out there using translations on the runtime via 3rd party integration. How can we dynamically intercept the "getString" calls?
Description
Component used: Navigation Version used: lastest Devices/Android versions reproduced on: any
java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 1 at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) at java.util.Objects.checkIndex(Objects.java:359) at java.util.ArrayList.get(ArrayList.java:434) at androidx.navigation.compose.NavHostKt$NavHost$17$1.invokeSuspend(NavHost.kt:342) at androidx.navigation.compose.NavHostKt$NavHost$17$1.invoke(Unknown Source:8) at androidx.navigation.compose.NavHostKt$NavHost$17$1.invoke(Unknown Source:4) at androidx.activity.compose.OnBackInstance$job$1.invokeSuspend(PredictiveBackHandler.kt:154) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:204) at android.os.Looper.loop(Looper.java:291) at android.app.ActivityThread.main(ActivityThread.java:8134) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1019) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@5863fee, androidx.compose.runtime.BroadcastFrameClock@1b7ec8f, StandaloneCoroutine{Cancelling}@afd7b1c, AndroidUiDispatcher@d182325]