Lychee icon indicating copy to clipboard operation
Lychee copied to clipboard

Infinite loop after mobile logins to pw protected public albums

Open brentkearney opened this issue 5 years ago • 3 comments

Detailed description of the problem

Accessing a password protected album with iPhone (Safari, Chrome, Brave) sometimes causes an infinite loop of POSTs. Safari and Chrome end in an error message: "A problem repeatedly occurred on ...". Brave just repeats posting in an infinite loop. Hitting refresh sometimes works to clear the problem and access the album. I don't have an Android phone to test.

Possibly relevant: my gallery is behind an nginx proxy service. No issues on non-mobile, or any other sites behind the proxy.

Proxy logs when accessing with mobile Chrome, entering password, then getting the error:

nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:01:40 +0000] "POST /php/index.php HTTP/2.0" 200 17320 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:01:40 +0000] "POST /api/Album::get HTTP/2.0" 200 26 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:01:54 +0000] "POST /api/Album::getPublic HTTP/2.0" 200 4 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:01:54 +0000] "POST /api/Album::get HTTP/2.0" 200 546886 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1"

Same, only with Brave, which apparently doesn't bail on an infinite loop:

nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:18:59 +0000] "GET /Lychee-front/images/apple-touch-icon-iphone-plus.png HTTP/2.0" 200 2438 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:18:59 +0000] "POST /php/index.php HTTP/2.0" 200 17320 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:18:59 +0000] "POST /api/Album::get HTTP/2.0" 200 26 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:21 +0000] "POST /api/Album::getPublic HTTP/2.0" 200 4 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:21 +0000] "POST /api/Album::get HTTP/2.0" 200 546886 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:23 +0000] "GET /dist/main.css?1581964633 HTTP/2.0" 200 88909 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:24 +0000] "POST /php/index.php HTTP/2.0" 200 17320 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:24 +0000] "POST /api/Album::get HTTP/2.0" 200 546886 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:26 +0000] "POST /php/index.php HTTP/2.0" 200 17320 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:26 +0000] "POST /api/Album::get HTTP/2.0" 200 546886 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:28 +0000] "POST /php/index.php HTTP/2.0" 200 17320 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:28 +0000] "POST /api/Album::get HTTP/2.0" 200 546886 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:29 +0000] "POST /php/index.php HTTP/2.0" 200 17320 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:30 +0000] "POST /api/Album::get HTTP/2.0" 200 546886 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:31 +0000] "POST /php/index.php HTTP/2.0" 200 17320 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
nginx.1    | photos.mydomain.com 96.12.34.56 - - [24/Feb/2020:23:19:32 +0000] "POST /api/Album::get HTTP/2.0" 200 546886 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
...

I created a test album with 4 photos to reproduce the problem, and the problem did not occur. I added 500 images to the test album, and the problem was reproduced. So it might have something to do with the size of the album.

Steps to reproduce the issue

Steps to reproduce the behavior: I'm running in a docker container with the image: lycheeorg/lychee-laravel.

  1. Create a password-protected public album.
  2. Upload a large number of photos.
  3. Access the album with an iPhone (possibly other mobile devices).
  4. See infinite loop.

Screenshots

Output of the diagnostics

Diagnostics
    -----------
    Info: Latest version of PHP is 7.4
    Warning: Dropbox import not working. dropbox_key is empty.

    System Information
    ------------------
    Lychee-front Version:      3.2.16
    Lychee Version (git):      bae5f2b (master) - Data not in Cache
    DB Version:                040000
    System:                    Linux
    PHP Version:               7.3
    MySQL Version:             5.7.29
    
    Lychee total space:        74.73 MB
    Upload folder space:       8.00 B
    System total space:        78.30 GB
    System free space:         51.24 GB (65%)
    
    Imagick:                   1
    Imagick Active:            1
    Imagick Version:           1690
    GD Version:                2.2.5

    Config Information
    ------------------
    version:                   040000
    check_for_updates:         1
    sorting_Photos_col:        title
    sorting_Photos_order:      DESC
    sorting_Albums_col:        max_takestamp
    sorting_Albums_order:      DESC
    imagick:                   1
    skip_duplicates:           1
    small_max_width:           0
    small_max_height:          360
    medium_max_width:          1920
    medium_max_height:         1080
    lang:                      en
    layout:                    1
    image_overlay:             0
    image_overlay_type:        desc
    default_license:           none
    compression_quality:       90
    full_photo:                1
    delete_imported:           0
    Mod_Frame:                 1
    Mod_Frame_refresh:         30
    thumb_2x:                  1
    small_2x:                  1
    medium_2x:                 1
    landing_page_enable:       1
    landing_owner:             Foo
    landing_title:            Media Gallery
    landing_subtitle:          The best thing about memories is making them
    landing_facebook:          
    landing_flickr:            
    landing_twitter:           
    landing_instagram:         
    landing_youtube:           
    landing_background:        /uploads/medium/c92086d5af5a39ac85bf6e83c66ec443.JPG
    site_title:                Media Gallery
    site_copyright_enable:     0
    site_copyright_begin:      2020
    site_copyright_end:        2999
    additional_footer_text:    Footer Text
    display_social_in_gallery: 1
    public_search:             0
    public_recent:             0
    recent_age:                1
    public_starred:            0
    downloadable:              1
    photos_wraparound:         1
    map_display:               0
    zip64:                     1
    map_display_public:        0
    map_provider:              Wikimedia
    force_32bit_ids:           0
    map_include_subalbums:     0
    update_check_every_days:   3
    has_exiftool:              1
    share_button_visible:      0
    import_via_symlink:        0
    has_ffmpeg:                1

Browser and system

brentkearney avatar Feb 24 '20 22:02 brentkearney

That's weird.

ildyria avatar Feb 25 '20 12:02 ildyria

Reproduced on Safari with my ridiculous album. Firefox on android is fine.

d7415 avatar Mar 20 '20 10:03 d7415

@d7415 I don't have an iPhone to try to reproduce it myself, maybe you could once again. Does this problem still exist after the massive refactoring of the backend?

nagmat84 avatar Aug 02 '22 06:08 nagmat84

No response, closing.

qwerty287 avatar Dec 13 '22 18:12 qwerty287