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

IllegalArgumentException in ObservationViewerFragment.formatObservedOn #1359

Open
kueda opened this issue Sep 3, 2024 · 0 comments
Open
Assignees
Labels

Comments

@kueda
Copy link
Member

kueda commented Sep 3, 2024

https://console.firebase.google.com/u/0/project/inaturalist-ios/crashlytics/app/android:org.inaturalist.android/issues/06b4d0820c9a8a12b4bf1f1a828b4480

Fatal Exception: java.lang.IllegalArgumentException: Illegal pattern component: YY
       at org.apache.commons.lang3.time.FastDatePrinter.parsePattern(FastDatePrinter.java:282)
       at org.apache.commons.lang3.time.FastDatePrinter.init(FastDatePrinter.java:149)
       at org.apache.commons.lang3.time.FastDatePrinter.<init>(FastDatePrinter.java:142)
       at org.apache.commons.lang3.time.FastDateFormat.<init>(FastDateFormat.java:384)
       at org.apache.commons.lang3.time.FastDateFormat.<init>(FastDateFormat.java:369)
       at org.apache.commons.lang3.time.FastDateFormat$1.createInstance(FastDateFormat.java:91)
       at org.apache.commons.lang3.time.FastDateFormat$1.createInstance(FastDateFormat.java:88)
       at org.apache.commons.lang3.time.FormatCache.getInstance(FormatCache.java:82)
       at org.apache.commons.lang3.time.FastDateFormat.getInstance(FastDateFormat.java:148)
       at org.inaturalist.android.ObservationViewerFragment.formatObservedOn(ObservationViewerFragment.java:2425)
       at org.inaturalist.android.ObservationViewerFragment.loadObservationIntoUI(ObservationViewerFragment.java:2067)
       at org.inaturalist.android.ObservationViewerFragment.onResume(ObservationViewerFragment.java:749)
       at androidx.fragment.app.Fragment.performResume(Fragment.java:2649)
       at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:922)
       at androidx.fragment.app.FragmentManagerImpl.performPendingDeferredStart(FragmentManagerImpl.java:713)
       at androidx.fragment.app.FragmentManagerImpl.startPendingDeferredFragments(FragmentManagerImpl.java:1325)
       at androidx.fragment.app.FragmentManagerImpl.doPendingDeferredStart(FragmentManagerImpl.java:2178)
       at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManagerImpl.java:1703)
       at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:299)
       at androidx.fragment.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:259)
       at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1244)
       at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
       at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
       at android.view.View.measure(View.java:28571)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7390)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
       at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
       at android.view.View.measure(View.java:28571)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7390)
       at androidx.appcompat.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:403)
       at android.view.View.measure(View.java:28571)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7390)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
       at android.view.View.measure(View.java:28571)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7390)
       at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
       at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
       at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
       at android.view.View.measure(View.java:28571)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7390)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
       at com.android.internal.policy.DecorView.onMeasure(DecorView.java:1036)
       at android.view.View.measure(View.java:28571)
       at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:5203)
       at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:3603)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3973)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3288)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:11344)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1689)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1698)
       at android.view.Choreographer.doCallbacks(Choreographer.java:1153)
       at android.view.Choreographer.doFrame(Choreographer.java:1079)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1646)
       at android.os.Handler.handleCallback(Handler.java:958)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:230)
       at android.os.Looper.loop(Looper.java:319)
       at android.app.ActivityThread.main(ActivityThread.java:8919)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)   

FWIW this is probably an invalid date format string, so in addition to fixing the translation on Crowdin, we should look into why this wasn't caught by https://github.com/inaturalist/iNaturalistAndroid/blob/main/crowdin.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants