inaturalist / iNaturalistAndroid

Android app for iNaturalist.org
https://market.android.com/details?id=org.inaturalist.android
MIT License
168 stars 57 forks source link

JSONException in ObservationViewerFragment$PhotosViewPagerAdapter.instantiateItem #1320

Open kueda opened 11 months ago

kueda commented 11 months ago

https://console.firebase.google.com/u/1/project/inaturalist-ios/crashlytics/app/android:org.inaturalist.android/issues/088761ec159d881ab0a6abf7de3b8122

Fatal Exception: java.lang.RuntimeException: org.json.JSONException: Index 0 out of range [0..0)
       at org.inaturalist.android.ObservationViewerFragment$PhotosViewPagerAdapter.instantiateItem(ObservationViewerFragment.java:489)
       at androidx.viewpager.widget.ViewPager.addNewItem(ViewPager.java:1010)
       at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1158)
       at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
       at androidx.viewpager.widget.ViewPager.setAdapter(ViewPager.java:540)
       at org.inaturalist.android.ObservationViewerFragment.reloadPhotos(ObservationViewerFragment.java:3184)
       at org.inaturalist.android.ObservationViewerFragment.access$300(ObservationViewerFragment.java:112)
       at org.inaturalist.android.ObservationViewerFragment$ObservationReceiver.onReceive(ObservationViewerFragment.java:3096)
kueda commented 11 months ago

Still happening in 1.30.5: https://console.firebase.google.com/u/0/project/inaturalist-ios/crashlytics/app/android:org.inaturalist.android/issues/088761ec159d881ab0a6abf7de3b8122?time=last-seven-days&types=crash&versions=1.30.5%20(598)&sessionEventKey=6591BC4400BB00013CC91EC3AA793F26_1897283500305201752