Status Update
Comments
te...@gmail.com <te...@gmail.com> #2
Thank you for the very detailed and comprehensive issue report!
Just to confirm - are all media items shown in the Google Photos apps (and with the correct dates)?
I have forwarded it to our engineering team for further investigation. We will reach out when we have any updates or have any further follow-up questions.
jf...@google.com <jf...@google.com> #3
I have found cases with more recent date ranges where more than 2 pages are returned, but the last page is still an empty response and not all of the expected media items have been returned yet.
In one particular case is when searching around 2018-08-31 in my library. On that day I have 294 images and videos which show in the Google Photos site. When I execute a search for 2018-08-30
to 2018-08-31
, I receive 9 pages with a total of 210 media items. The last page includes a nextPageToken, but if I retrieve that next page it returns an empty response. Interestingly, if I add a day to the search, 2018-08-30
to 2018-09-01
, then only 183 images are retrieved before encountering an empty page response. I have tried other various date ranges including Aug 31, starting as early as Aug. 1st, and the most I have been able to retrieve is 210 images. When I change the end date from Aug. 31 to Sept. 1, the media items are returned in a slightly different order, but it always seems to end with the same file, P8310169.JPG
. In the Google Photos site I compared this image to the surrounding images including those that are and are not returned. The photos are nearly identical, all of them taken together on the same camera with the same settings and uploaded together through Google Backup and Sync for Windows. There is no clear indication why it would stop at that file without returning the next few in sequence.
I have also found 6 other 1-month date ranges between 2016 and 2018 which also end in an empty responses when paging through the results and where not all of the media items for the given range are never returned.
te...@gmail.com <te...@gmail.com> #4
Hi, thanks for the response! Yes, all of the media items show on both the Google Photos site and Google Photos on Android including those that are not returned by the API. Please let me know if there is any additional data I can provide to help troubleshoot the issue.
jf...@google.com <jf...@google.com> #5
Hello! Is there any update on this issue? Please let me know if I can provide any additional information. Thanks!
Description
Wrong results returned for some searches with albumId on v1/mediaItems:search
# Detailed description
For some of my albums (which have been created also over the api) I get wrong results when trying to get all media items in that album with a search. The correct mediaItemsCount is returned when listing albums v1/albums, it is also consistent with what I see on
The behavior is consistent when doing repeated searches for the same album. For some other albums the result is always correct.
Additionally, when setting a different pageSize the results will change. Some of the previously empty albums now return some items, but in that case there are many duplicate entries and still some items missing. It seems two pages just return the same content (all from the requested album).
## API calls
Response:
[
{
"id": "ID_A"
"title": "A"
"mediaItemsCount": 454
...
}
,
{
"id": "ID_B"
"title": "B"
"mediaItemsCount": 438
...
}
,
{
"id": "ID_C"
"title": "C"
"mediaItemsCount": 124
...
}
]
# Correct result for first album
Params:
{
"albumId": "ID_A"
}
Response: Several pages with 454 unique media items
# Empty/wrong result for second album
Params:
{
"albumId": "ID_B"
}
Response: 200 OK {}
# Empty/wrong result for third album
Params:
{
"albumId": "ID_C"
}
Response: 200 OK {}
# With different pageSize search now return too many/duplicate items
Params:
{
"albumId": "ID_C"
"pageSize": 100
}
Response: Two pages with the exact same content (i.e. all elements are duplicated)
## Steps to reproduce the problem
What steps will reproduce the problem?
1. Call mediaItems:search with albumId of affected album
## What is the expected output?
Return mediaItems from mediaItems:search should have the same amount as in mediaItemsCount and contain no duplicates.
## What do you see instead?
In some cases empty results, sometimes duplicate items are returned.
# Additional information
I can reproduce the behavior when using the API Explorer with affected albumIds.