Skip to content
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

Resources$NotFoundException: String resource via ChangeLog.getDialog #57

Open
johnjohndoe opened this issue May 8, 2020 · 8 comments
Open

Comments

@johnjohndoe
Copy link
Contributor

I noticed a few occurrences of the following error being reported in the Google Developer Console of my app. I am using version 1.2.2 of the library.

I am able to reproduce the crash with an Android emulator API level 21, 5.0.2, Google APIs Intel x86 Atom_64 System Image, Revision 31.

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.webkit.WebView.<init>(WebView.java:483)
    at android.webkit.WebView.<init>(WebView.java:466)
    at android.webkit.WebView.<init>(WebView.java:453)
    at android.webkit.WebView.<init>(WebView.java:443)
    at de.cketti.library.changelog.ChangeLog.getDialog(ChangeLog.java:287)
    at de.cketti.library.changelog.ChangeLog.getLogDialog(ChangeLog.java:265)
    at de.avpptr.umweltzone.base.BaseActivity.showChangeLogDialog(BaseActivity.java:174)
    at de.avpptr.umweltzone.map.MainActivity.onCreate(MainActivity.java:58)
    at android.app.Activity.performCreate(Activity.java:5937)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
    ... 10 more
@cketti
Copy link
Owner

cketti commented May 8, 2020

I believe this is an incompatibility of certain WebView versions and certain AppCompat versions.

@johnjohndoe
Copy link
Contributor Author

Can you try your app on that Android Version?

@cketti
Copy link
Owner

cketti commented May 9, 2020

See https://issuetracker.google.com/issues/141351441

Doesn't crash in K-9 Mail because we're using AppCompat 1.2.0-beta01. It does crash when I switch to AppCompat 1.1.0.

Side note: Testing this revealed that there's a vector drawable in K-9 Mail's About screen layout that will crash on Android 5 🙈

@johnjohndoe
Copy link
Contributor Author

Oh, great. So you see any chance to fix this without updating to the beta version? A try/catch could suppress the crash at least.

@cketti
Copy link
Owner

cketti commented May 9, 2020

I don't want to change the library to deal with that bug. But it looks like your own code is in the stack trace. So you can add the try/catch yourself.

@johnjohndoe
Copy link
Contributor Author

Yes. I meant the app code. Is there any better solution?

@cketti
Copy link
Owner

cketti commented May 9, 2020

AppCompat 1.0.x probably also works.

@johnjohndoe
Copy link
Contributor Author

Side note: I checked on Android 5.1. No crash there.

johnjohndoe added a commit to Umweltzone/Umweltzone that referenced this issue May 9, 2020
+ Show toast message and skip opening version information.
+ See: cketti/ckChangeLog#57.
johnjohndoe added a commit to Umweltzone/Umweltzone that referenced this issue May 9, 2020
… the changelog.

+ Show toast message and skip opening version information.
+ See: cketti/ckChangeLog#57.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants