inaturalist / iNaturalistReactNative

Cross-platform version of the iNat mobile app
MIT License
59 stars 19 forks source link

Suggestions wrong when choosing a photo #1563

Closed kueda closed 3 months ago

kueda commented 3 months ago

Describe the bug Sometimes Suggestions shows insane results when choosing the photo to show suggestions for.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://www.inaturalist.org/observations/216975011 in the app
  2. Tap on SUGGEST ID
  3. When you land on Suggestions no photo is selected, which seems like a bug, but the actual suggestions look ok: IMG_0842
  4. Tap on the first photo totally different suggestions: IMG_0843
  5. Tap on the second photo and you get increasingly weird suggestions: IMG_0844
  6. Tap on the last photo and you get suggestions in the wrong kingdom: IMG_0845

Expected behavior

  1. The first photo should be selected when you load Suggestions and that should be what gets sent to score_image
  2. Tapping on other photos should show suggestions for those photos (the suggestions in my screenshots are too bizarre for me to believe this is really happening)

Context (please complete the following information):

Additional context While I see all these requests in the app's network logger, I don't see them all in Kibana, so maybe this is a weird caching issue? Seems like there might be something odd going on with handling response data as well.

albullington commented 3 months ago

I tried to replicate by opening this observation in the app, and I'm seeing a majority of allium suggestions when tapping all three photos. I made a change in a recent suggestions PR that ensures we're resizing and submitting the medium-sized photo for any photo selected, rather than only the first photo selected, and I suspect that fixed this issue. Before, we would have been resizing and submitting the small square photos for the second and third photo, which wouldn't have resulted in very accurate suggestions.

I can see inaccurate suggestions when checking the latest TestFlight build (0.32.6), so it was definitely fixed since then.

Closed by #1649 (I believe).