Lychee icon indicating copy to clipboard operation
Lychee copied to clipboard

Shared Album Download does not work

Open 72quadrat opened this issue 6 years ago • 4 comments

Detailed description of the problem [REQUIRED]

The Album-Download-Link-Icon (Cloud with arrow) produces nearly empty ZIP-Files of 2KB or even no ZIP at all when a public album is viewed. The direct download of images work. Also the Album-Download as admin or as extra user works.

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Go to 'Album settings'
  2. Click on 'Eye-Icon make Album public
  3. Enter Album URL in other (not logged in) browser
  4. Go to Album
  5. Click on Cloud-Icon
  6. See error*

Output of the diagnostics [REQUIRED]

    Diagnostics
    -----------
    Info: Latest version of PHP is 7.4
    Warning: Dropbox import not working. dropbox_key is empty.
    Warning: Image optimizer enabled but pngquant not found!
    Warning: Image optimizer enabled but svgo not found!

    System Information
    ------------------
    Lychee Version (git):            master (55d9dac) - Data not in Cache
    DB Version:                      4.0.6
    
    composer install:                --no-dev
    APP_ENV:                         production
    APP_DEBUG:                       false
    
    System:                          Linux
    PHP Version:                     7.3
    Max uploaded file size:          500M
    Max post size:                   500M
    MySQL Version:                   5.7.30
    
    Imagick:                         1
    Imagick Active:                  1
    Imagick Version:                 1690
    GD Version:                      2.2.5

    Config Information
    ------------------
    version:                         040006
    check_for_updates:               0
    sorting_Photos_col:              title
    sorting_Photos_order:            ASC
    sorting_Albums_col:              max_takestamp
    sorting_Albums_order:            ASC
    imagick:                         1
    skip_duplicates:                 0
    small_max_width:                 0
    small_max_height:                360
    medium_max_width:                1920
    medium_max_height:               1080
    lang:                            de
    layout:                          1
    image_overlay:                   0
    image_overlay_type:              desc
    default_license:                 reserved
    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:             0
    landing_owner:                   Lesfauxtigres
    landing_title:                   Lesfauxtigres
    landing_subtitle:                Lene Fotografie & Timo Grafik
    landing_facebook:                
    landing_flickr:                  
    landing_twitter:                 
    landing_instagram:               
    landing_youtube:                 
    landing_background:              dist/cat.jpg
    site_title:                      Bilder der Basismaschine
    site_copyright_enable:           0
    site_copyright_begin:            2019
    site_copyright_end:              2020
    additional_footer_text:          
    display_social_in_gallery:       0
    public_search:                   0
    SL_enable:                       0
    SL_for_admin:                    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:                      0
    location_decoding:               0
    location_decoding_timeout:       30
    location_show:                   1
    location_show_public:            0
    rss_enable:                      0
    rss_recent_days:                 7
    rss_max_items:                   100
    prefer_available_xmp_metadata:   0
    editor_enabled:                  1
    lossless_optimization:           1
    swipe_tolerance_x:               150
    swipe_tolerance_y:               250
    local_takestamp_video_formats:   .avi|.mov

Browser and system

Mac OS

**Chrome 85.0.4183.83 ** throws Error 500

Safari downloaded 2KB Files some seconds ago but now:

[Error] The source list for Content Security Policy directive 'script-src' contains an invalid source: ''report-sample''. It will be ignored.
[Error] The source list for Content Security Policy directive 'style-src' contains an invalid source: ''report-sample''. It will be ignored.
[Error] Unrecognized Content-Security-Policy directive 'worker-src'.

[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (Album::getArchive, line 0, x2)
[Error] Failed to load resource: Das Laden des Frames wurde unterbrochen (Album::getArchive, line 0)

Firefox downloads nothing

Console Error GEThttp://bilder.basismaschine.de/api/Album::getArchive?albumIDs=15992550899976
[HTTP/1.1 500 Internal Server Error 80ms]

72quadrat avatar Sep 06 '20 20:09 72quadrat

Update: Safari again produces 1-2KB ZIPs which decompresses to samefile.zip.cpgzand then again to a samefile.zip 2 ...

72quadrat avatar Sep 06 '20 20:09 72quadrat

I believe I may have fixed this bug the other day as part of the work going on here: https://github.com/LycheeOrg/Lychee/pull/704. You may want to try that branch (you will need to migrate your database though to make it work) or wait until it's merged into the mainline, which should be very soon!

kamil4 avatar Sep 07 '20 03:09 kamil4

That branch was merged earlier today so could you update your tree, retest, and report back? Thanks!

kamil4 avatar Sep 08 '20 02:09 kamil4

Works perfect now.

72quadrat avatar Sep 08 '20 06:09 72quadrat