Status Update
Comments
jf...@google.com <jf...@google.com> #2
Base URLs should generally be valid for 60 minutes. (We are not aware of any current issues related to the expiry time.)
Here are a few questions that might help us understand this issue:
- Does this issue only occur with a specific Google Photos account or have you encountered this with multiple accounts?
- How frequently are you seeing this? Does this occur consistently for all base URLs, or only for specific media items?
- How are you accessing the base URLs? (central server, client device, via a specific library or in a web browser?)
- What
are you using? Does the issue occur for all parameters?base URL parameters - What is the exact HTTP response that is returned? (Is it always a 403 error status?)
Thanks!
ba...@gmail.com <ba...@gmail.com> #3
The return code is a 403 (Your client does not have permission to get URL). Maybe the auth is expiring?
Use case - I have photos on display on a monitor at home. I generate base urls for a random selection of photos once every 45 mins. Generally, I notice the base url's start seeing a 403 after 20-25 mins.
- Does this issue only occur with a specific Google Photos account or have you encountered this with multiple accounts? I've tried with one account only
- How frequently are you seeing this? Does this occur consistently for all base URLs, or only for specific media items? It occurs consistently after 25-30 mins. For the same media item, I can regenerate the base url and fetch it
- How are you accessing the base URLs? (central server, client device, via a specific library or in a web browser?) Chromium on Raspberry Pi, curl on OSX
- What base URL parameters are you using? Does the issue occur for all parameters?
=w1920-h1080
all the time - What is the exact HTTP response that is returned? (Is it always a 403 error status?) Always 403
If you need more debug info, let me know. Client id is 971054227870-efl05socd1h06sb6b99cpds2a8qcbl7l.apps.googleusercontent.com
.
ba...@gmail.com <ba...@gmail.com> #4
Manually ran a test, the bug is easy to reproduce.
- 2:57pm - generated base url -
https://lh3.googleusercontent.com/lr/AFBm1_a5s5p26Ern2-J70Jq-Zjbgx62n32YKJDgNHH4C9bSJ51wWQnJZCVyKg4ZOML3b_fdsczCk5miR1sXVJNYsi_L9WK-KIls82YuvJD_Iek-9tuTlA5KLCQqqEJdCc59fqSNoWP_QAHKw8k_00fdllaJLgLWIFDywq96Rtam2MAIGuEZUBhXehY9LBIZAE9pZEp1jqPbo01RwLNAzuclWR_MKsPgBU_AY7F0KXKQe6xmOkvEvXA8gdLC6QtyMqmHA04rHg_MlvXTs6kmtQ2zSvhe4w6WrxuKdUqcJXC5-K0_O7A2upACKG0RVzsVepUm7aJGMnDGDfqPy96MHXSgK55C9G5SGouer427PlZDubAxuz3Zqqi6A44e24uzwx92U3suQHXBmZa6t_VQAnH3-ptYByFvmAqX_soFo0tnJBb-LTqrvIPJ17qIFeS7xcy6kftxqCUcGf5YR86IZ8g0dAVIHLLGGSTexU55_DjtPTH7eTiN5-uSlsPQy_L2F8cGY1Hxkeg8zs8xQ6DWmfm9WJAij5GmdKspwZfZRZLOsDVzxYnQAxEL81Pf6JBhBdtiBBaVjkKkg859gRynHjanfzcHKvWyg9qRCeJLKeHfkvTWEB4uak6bO71VbcGfRNajd9SmaLB-3u1o66ulsuZ2phW1KFp8_b7bcwuBaBKpreKKSXDfNUTP4nQHVvScd9rhb8vqbKtJqIvcQ8zi9ziW6dAWOD2V0Z81y2dMg0ciS8tWehb7Fei-aXVZZRnpoHxWtgojqBLOT0tv0qprsFJQtGuPM_4l1UTER4CstZ2X4sf4XnMLbSHyJyOjhNuHBjuVM=w1920-h1080 - 2:58pm - working
- 4:39pm - 403 error
ba...@gmail.com <ba...@gmail.com> #5
Noticed the time is off, sorry. Will retry and post fresh results.
ba...@gmail.com <ba...@gmail.com> #6
Here's a proper example from today. I'm generating these url's using the Java client and then loading them from Chrome. Could it be the request is missing some header that you start looking for only after some time?
10:12am - generated
jf...@google.com <jf...@google.com> #7
A few more questions:
It occurs consistently after 25-30 mins. For the same media item, I can regenerate the base url and fetch it
- Could you clarify if this issue occurs with different media items or does this only occur with a set of specific (or the same) media items?
- Are they part of a shared album or are they just part of the library itself?
- How did you retrieve the media item IDs initially? (For example - was this from a search request or from a mediaItems.list request?)
We are also wondering if there's a network or access issue on your end that might be triggering this. Do you have any trouble accessing and using the Photos web app (
Thanks!
ba...@gmail.com <ba...@gmail.com> #8
Thanks for looking into this.
- Could you clarify if this issue occurs with different media items or does this only occur with a set of specific (or the same) media items? I see this happening across all media items
- Are they part of a shared album or are they just part of the library itself? All the media items are from shared albums that the user does not directly own
- How did you retrieve the media item IDs initially? (For example - was this from a search request or from a mediaItems.list request?)
- I use the
listSharedAlbums
api to get the album ids - run the
searchMediaItems
api to get the individual media items - cache the media item ids for 6 hours
- For the next 6 hours, randomly select some media items from the cache
- fetch the new base url every time an item is selected via the
batchGetMediaItems
api - The base urls are then put into an HTML page and displayed via Chromium
- The relevant code extract is you want to take a look is available here -
https://docs.google.com/document/d/1mRvqvGBL-p7M6RR7JDjThp089CHdW416CXzDVBINdAE/edit
- I use the
Dont think its a network issue, I can see a 403 in the developer console in Chromium.
ba...@gmail.com <ba...@gmail.com> #9
Posting a developer console screen shot and the response headers, if you want to take a look.
Don't read too much into the frequency of image loads in the screenshot (new image every 3 seconds). It's for debugging, usually its one image every 2 mins.
Request Method: GET
Status Code: 403
Remote Address: 172.217.26.193:443
Referrer Policy: no-referrer-when-downgrade
Response headers:
alt-svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
cache-control: private
content-encoding: gzip
content-length: 1516
content-type: text/html; charset=UTF-8
date: Wed, 02 Sep 2020 08:42:54 GMT
server: fife
status: 403
x-content-type-options: nosniff
x-xss-protection: 0
:authority: lh3.googleusercontent.com
:method: GET
:path: /lr/AFBm1_ZGvIyS_GZxtD3qMW-8xY-nWPwq_sZ6EwYNOznyGew8o7-fXVt7uYz1uHAjcUqo-1sozuHuKfLXy1Sx-rwgmpJMDd9wjMvfceLoVHdnaY-ma2Sq-S8Iu-8k7FtyaaZAUdexAt8XV2Kf9cRd5YY09M64rzgYbTeVs4fum6Bax16m2P6-yT6WcL253Dy4RS40O3XOh_SYbkuuz1CvCZxQZczQGKh6MR-1nFE1YtGg4H5xIiZ2s5vWnY4NbIs2HT4xylYUcB1nukw2cybVDeqrxTQ7pM1jzenX4PtAVNTPPsA2nYSZYRbRoC2_kPUCAJuqr2kaS4a5-TazLWQqyjWkhYRjvA8Xju5_w3OrrgO285WLVPz8Hz8AgyUWMslmfvAzr5iutC8O3DCSipxc8p3Aactv4jHilrPaZPq_qifiqVfY0z0_Zp2t_JQ6mYajayZ3ObwysAbPiyB8-UbRmvyTpMFeSGDiuEDccRcGponmnWoPt5bDRCJhfSrULtEmmeStQmJSF0q-k7XggvUaDfBBvg92_Cn1itCMnP6lUzKupDsuOBS_gc9PEjBlEPSEuSEGpLEw0ndwrh0wrlA2JBdVuWsC3gB3c4WhQuaRurweN65mRkhs5naORR466lvflFPTrfuSQicf9bkqXaI1B-3SqSGFlwUfUgzEVrIuAdkPQ4KIrKOQ8GxxSVERdDzzIbE0GHhzQw8anMGkjbHx2zZFl4MjMK7Jd-nGfoiJhYP4Yn65ILf4c8ShKWQwcPyaWObWR8VGdGv1ZzOaoSFvlP5mOySzEi3AlDLbJQM_k83VNP5aI7VYSuvgN12DN1aCfjKU=w1920-h1080
:scheme: https
accept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4250.0 Safari/537.36
x-client-data: CKG1yQEIhrbJAQiitskBCKudygEInbDKAQiKtMoBCO+1ygEIvrbKAQirx8oBCPHHygEIhsjKAQjnyMoBCOvIygEI8MjKAQioycoBCNrJygEI68nKAQi4ysoBCLXLygEIgM3KAQifzcoBCNvVygEY67fKARi3v8oBGL2/ygE=
Decoded:
message ClientVariations {
// Active client experiment variation IDs.
repeated int32 variation_id = [3300001, 3300102, 3300130, 3313323, 3315741, 3316234, 3316463, 3316542, 3318699, 3318769, 3318790, 3318887, 3318891, 3318896, 3318952, 3319002, 3319019, 3319096, 3319221, 3319424, 3319455, 3320539];
// Active client experiment variation IDs that trigger server-side behavior.
repeated int32 trigger_variation_id = [3316715, 3317687, 3317693];
}'''
jf...@google.com <jf...@google.com> #10
Thanks for providing the headers and details.
A few more clarifying questions to help us understand if there's something special about the albums where you are seeing this:
- Does this happen for other users as well (or just this one user)?
- Are the shared albums updated or changed in any way after you have retrieved the base URL? (For example, users are added or removed, media is uploaded, etc? Either through your app or through the Google Photos app?)
ba...@gmail.com <ba...@gmail.com> #11
- Does this happen for other users as well (or just this one user)?
- I use this with one account only, so dont know if others are affected by it
- Are the shared albums updated or changed in any way after you have retrieved the base URL? (For example, users are added or removed, media is uploaded, etc? Either through your app or through the Google Photos app?)
- The albums are shared albums. Different users share their albums to a common account from where the photos are queried and displayed. At best, a couple of these albums might get additional media 1-2 times a month. The issue happens even on days when there are no changes to any of the albums
jf...@google.com <jf...@google.com> #12
I have just reached out directly via email with the next steps that will help us debug this issue. Thanks!
be...@gmail.com <be...@gmail.com> #13
I seem to be experiencing a similar issue however it is related to
Our image seems to work for a while then start serving 403 after some time. Then after about 1 hour return to normal.
Any assistance will be appreciated.
We also see this experiment ID on the requested image serving url.
message ClientVariations {
// Active client experiment variation IDs.
repeated int32 variation_id = [3300010, 3300116, 3300133, 3300161, 3313321, 3318700, 3318774, 3318889, 3319143, 3319459, 3320540, 3320566, 3329304, 3329346];
// Active client experiment variation IDs that trigger server-side behavior.
repeated int32 trigger_variation_id = [3317740, 3317899];
}
jf...@google.com <jf...@google.com> #14
I just heard back from the engineering team: We will also need the headers (and responses) for both calls to the Library API to investigate this further. This means 1) the call to batchGetMediaItems
to retrieve the URLs and 2) the request to access a base URL that results in a 403 error. Could you please provide both of these?
Thanks!
jf...@google.com <jf...@google.com> #15
I'm closing this issue for now, but please reopen if you are still able to reproduce this problem and you are able to provide the additional information requested in
Description
Description
Base urls expire before 60 minutes
Detailed description
The Photos API docs indicate the direct media links/base urls expire in 60 minutes . But the links seem to expire within 40 mins in some cases, return a 4xx when accessed. Example: this base url returns a 403 after 30 mins. I'm well within the usage quota as well (1000 of 75000 used).
API calls
Java client
Steps to reproduce the problem
What steps will reproduce the problem?
1.Fetch base url for 50 media items 2.Fetch one media item every 2 mins (slideshow) 3. After 20-30 mins, base url returns a HTTP 403 error
What is the expected output?
HTTP 200 with image or video
What do you see instead?