LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.37k stars 298 forks source link

White page with "null" shown when navigating back in browser history #2149

Closed mashb1t closed 9 months ago

mashb1t commented 9 months ago

Detailed description of the problem [REQUIRED]

Hope this is no duplicate, but i couldn't find anything similar. When clicking on an album and navigating back using the browser back button, an empty page with content "null" is snown. Clicking the "back" button in Lychee works though.

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Go to album
  2. Click on back button in browser
  3. See empty page

Screenshots https://github.com/LycheeOrg/Lychee/assets/9307310/a9491d1e-ee17-4b26-a24d-510af3b2df69

Output of the diagnostics [REQUIRED]

(Settings => Diagnostics or https://example.com/Diagnostics or php artisan lychee:diagnostics) Diagnostics

    Warning: Dropbox import not working. dropbox_key is empty.
    Warning: zend.assertions is disabled although Lychee is in debug mode. For easier debugging code generation for assertions should be enabled.
    Info: Latest version of PHP is 8.3
    Warning: git (software) is not available.
     Foreign key: access_permissions.user_id     → users.id             : CASCADE
     Foreign key: albums.parent_id               → albums.id            : RESTRICT
     Foreign key: albums.id                      → base_albums.id       : RESTRICT
     Foreign key: albums.cover_id                → photos.id            : CASCADE
     Foreign key: base_albums.owner_id           → users.id             : RESTRICT
     Foreign key: jobs_history.owner_id          → users.id             : RESTRICT
     Foreign key: photos.album_id                → albums.id            : RESTRICT
     Foreign key: photos.owner_id                → users.id             : RESTRICT
     Foreign key: size_variants.photo_id         → photos.id            : RESTRICT
     Foreign key: sym_links.size_variant_id      → size_variants.id     : RESTRICT
     Foreign key: tag_albums.id                  → base_albums.id       : RESTRICT

System Information
------------------
    Lychee Version (git):                    ?? (33354a2) -- Could not compare.
    DB Version:                              5.0.2

    composer install:                        --no-dev
    APP_ENV:                                 production
    APP_DEBUG:                               true
    APP_URL:                                 set

    System:                                  Linux
    PHP Version:                             8.2.7
    PHP User agent:                          Lychee/4 (https://lycheeorg.github.io/)
    Timezone:                                Europe/Berlin
    Max uploaded file size:                  100M
    Max post size:                           100M
    Livewire chunk size:                     12.00 MB
    Max execution time:                      3600
    MySQL Version:                           10.11.6-MariaDB-1:10.11.6+maria~ubu2204

    exec() Available:                        yes
    Imagick Available:                       1
    Imagick Enabled:                         1
    Imagick Version:                         1691
    GD Version:                              2.3.3
    Number of foreign key:                   11 found.

Space Usage
-----------

Optimize DB
-----------

Config Information
------------------
    version:                                 050002
    check_for_updates:                       0
    sorting_photos_col:                      created_at
    sorting_photos_order:                    DESC
    sorting_albums_col:                      max_taken_at
    sorting_albums_order:                    DESC
    imagick:                                 1
    skip_duplicates:                         0
    small_max_width:                         0
    small_max_height:                        360
    medium_max_width:                        1920
    medium_max_height:                       1080
    lang:                                    en
    image_overlay_type:                      desc
    default_license:                         CC-BY-NC-ND-4.0
    compression_quality:                     90
    grants_full_photo_access:                1
    delete_imported:                         0
    mod_frame_enabled:                       1
    mod_frame_refresh:                       30
    thumb_2x:                                1
    small_2x:                                1
    medium_2x:                               1
    landing_page_enable:                     0
    site_owner:                              Manuel Schmid
    landing_title:                           Manuel Schmid
    landing_subtitle:                        Food, AI-Art and Drone Images
    sm_facebook_url:                         
    sm_flickr_url:                           
    sm_twitter_url:                          https://www.twitter.com/mashb1t
    sm_instagram_url:                        https://instagram.com/mashb1t
    sm_youtube_url:                          
    landing_background:                      dist/cat.webp
    site_title:                              Gallery
    footer_show_copyright:                   1
    site_copyright_begin:                    2023
    site_copyright_end:                      2023
    footer_additional_text:                  
    footer_show_social_media:                1
    search_public:                           1
    SL_enable:                               0
    SL_for_admin:                            0
    recent_age:                              1
    grants_download:                         0
    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
    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:                   0
    swipe_tolerance_x:                       150
    swipe_tolerance_y:                       250
    local_takestamp_video_formats:           .avi|.mov
    log_max_num_line:                        1000
    unlock_password_photos_with_url_param:   0
    nsfw_visible:                            1
    nsfw_blur:                               1
    nsfw_warning:                            1
    nsfw_warning_admin:                      1
    nsfw_banner_override:                    
    map_display_direction:                   1
    album_subtitle_type:                     oldstyle
    upload_processing_limit:                 4
    new_photos_notification:                 0
    legacy_id_redirection:                   1
    zip_deflate_level:                       6
    SA_enabled:                              1
    default_album_protection:                3
    album_decoration:                        all
    album_decoration_orientation:            row
    allow_username_change:                   1
    auto_fix_orientation:                    1
    use_job_queues:                          0
    random_album_id:                         starred
    use_last_modified_date_when_no_exif_date: 0
    ffmpeg_path:                             /usr/bin/ffmpeg
    ffprobe_path:                            /usr/bin/ffprobe
    layout:                                  justified
    date_format_photo_thumb:                 M j, Y, g:i:s A e
    date_format_photo_overlay:               M j, Y, g:i:s A e
    date_format_sidebar_uploaded:            M j, Y, g:i:s A e
    date_format_sidebar_taken_at:            M j, Y, g:i:s A e
    date_format_hero_min_max:                F Y
    date_format_hero_created_at:             M j, Y, g:i:s A T
    date_format_album_thumb:                 M Y
    upload_chunk_size:                       0
    nsfw_banner_blur_backdrop:               1
    search_pagination_limit:                 1000
    search_minimum_length_required:          4
    photo_layout_justified_row_height:       320
    photo_layout_masonry_column_width:       300
    photo_layout_grid_column_width:          250
    photo_layout_square_column_width:        200
    photo_layout_gap:                        12
    display_thumb_album_overlay:             always
    display_thumb_photo_overlay:             hover

Browser and system

Chrome Version 120.0.6099.129 (Official Build) (arm64) Linux Debian, Lychee in Docker

ildyria commented 9 months ago

Do you have a reproducible example of steps to reproduce that behaviour ? I thought I had covered my tracks pretty well but it seems I am missing some edges cases.

When clicking on an album and navigating back using the browser back button, an empty page with content "null" is shown.

When I try this on my own install I don't have this behaviour.

mashb1t commented 9 months ago

sure thing, you can test it in https://gallery.mashb1t.de/gallery (Album AI Art)or find my screen recording in https://github.com/LycheeOrg/Lychee/assets/9307310/a9491d1e-ee17-4b26-a24d-510af3b2df69

EDIT: strange thing is also that this only happens for the album "AI Art", not for the others.

ildyria commented 9 months ago

EDIT: strange thing is also that this only happens for the album "AI Art", not for the others.

Hence WTF. :open_mouth:

mashb1t commented 9 months ago

What i also tried:

It works then for sub albums again

mashb1t commented 9 months ago

if this helps here is the data from albums:

MariaDB [lychee]> select * from albums;
+--------------------------+--------------------------+-----------------+--------------------------+------------------+------+------+
| id                       | parent_id                | license         | cover_id                 | track_short_path | _lft | _rgt |
+--------------------------+--------------------------+-----------------+--------------------------+------------------+------+------+
| -8ubXvDC-HwkxOv8Oem8cabO | XgUqd6YeA6E5PdNt8ACmBiiR | none            | XsEAw-plrnIabTfVYnweoUmx | NULL             |   93 |   94 |
| 2PBhgDHOFL6TizPBNHiVmcxu | 9OwaB8_NAtZaULpAE95_DK5g | none            | NULL                     | NULL             |   49 |   50 |
| 3uP-Et3mw5XFVjJiyFgRFVzS | q0-72LItF8vSI6dDLwyC5V7N | none            | wZ52qOjEo5gBRcM_p9Qaday- | NULL             |   44 |   45 |
| 5aO0qQP1NQjp8r1SoVJKUIWc | XgUqd6YeA6E5PdNt8ACmBiiR | none            | NULL                     | NULL             |   97 |   98 |
| 9OwaB8_NAtZaULpAE95_DK5g | q0-72LItF8vSI6dDLwyC5V7N | CC-BY-NC-ND-4.0 | 6WFEXn9_jFCkWjTcxGgSUaXx | NULL             |   46 |   51 |
| 9OYhbLhy36xeWehObPpzqTU9 | q0-72LItF8vSI6dDLwyC5V7N | none            | aO5da_tjApaM3ep-sYyrZC83 | NULL             |   54 |   55 |
| b-da7CKzS0AxsVx27EksZ4Up | oixNMM0ma5SMlQFCBw8zvqIY | none            | j5WflLx4yhqFIMWLwvYl2XJF | NULL             |   36 |   37 |
| BCVKMkO7rjg3p41ydK0l0rLf | DJlKbojKjCrIJeiHA3MvPvO- | none            | cBIIAnBPyGWFLM-X5wafh138 | NULL             |   16 |   17 |
| cadyOM3car4WzLAIMKMDP2_V | oixNMM0ma5SMlQFCBw8zvqIY | none            | NULL                     | NULL             |   38 |   39 |
| ckejgU-OQP8n0QXqABQAaUqE | DJlKbojKjCrIJeiHA3MvPvO- | none            | NULL                     | NULL             |   22 |   23 |
| dEAZs8iySOZZ_yuc5dUQRazZ | q0-72LItF8vSI6dDLwyC5V7N | none            | tHV3x2cGPB8YpHWbu3gi6Qpu | NULL             |   56 |   57 |
| DJlKbojKjCrIJeiHA3MvPvO- | NULL                     | none            | W1dmRxkgs5aHd-H1U26DDG3d | NULL             |    1 |   26 |
| DkNvvHlAsU2MfKyHJlCbg7pP | xNb9AS9McUkOzkbeJrxjcStF | none            | NFI7D6prm3iFmBOvenMiFzpU | NULL             |   68 |   69 |
| gMJwktXlVgX26w0qK1JyuVEN | DJlKbojKjCrIJeiHA3MvPvO- | none            | YmF79q_xTIOQe40g7NOySsrN | NULL             |   20 |   21 |
| I2pNT_UL4WiVq5fjsTwPjqc8 | q0-72LItF8vSI6dDLwyC5V7N | none            | NULL                     | NULL             |   84 |   91 |
| i7EILRSlRC3S7VGE5tolCHrl | DJlKbojKjCrIJeiHA3MvPvO- | none            | 3PznJEtP7zhLxVZh3V91iVuG | NULL             |   12 |   13 |
| izPqF93mR_B0LY-RSyQ5XSrQ | q0-72LItF8vSI6dDLwyC5V7N | none            | mnkb1ifGBLP2N9q_8dUPRSaL | NULL             |   76 |   77 |
| kCZ4Em418Cow6yNhll9kz0jC | I2pNT_UL4WiVq5fjsTwPjqc8 | none            | NULL                     | NULL             |   89 |   90 |
| KvXsQ7RLf3hAEfIkfYIWyIYj | DJlKbojKjCrIJeiHA3MvPvO- | none            | QwfS_8zDJOpiEq2ggfUYxISX | NULL             |    8 |    9 |
| l9o4LUiuRSmjMUfeY6K4E977 | q0-72LItF8vSI6dDLwyC5V7N | none            | GQEfEPx3FfiypQEM92bpykWa | NULL             |   42 |   43 |
| LGWGLp2STRuILVed_m9j1I8f | DJlKbojKjCrIJeiHA3MvPvO- | none            | G7IBIUZPxZkvZSh81xeMlk8i | NULL             |    6 |    7 |
| LnkT4MDigvWMy1gqCYThi5DX | I2pNT_UL4WiVq5fjsTwPjqc8 | none            | F8fM0r6vn1pne8V5PZ_gvRDV | NULL             |   85 |   86 |
| loFeT6l4dBzz6nh0Ro_7HbEg | xNb9AS9McUkOzkbeJrxjcStF | none            | pFRF4AMH1l5IFm42SWJy-Hwo | NULL             |   64 |   65 |
| M5ee-hX70kCHgSuXYjSPRds5 | q0-72LItF8vSI6dDLwyC5V7N | none            | ikD3llycjNRUgJguRb3rbHLS | NULL             |   78 |   83 |
| MLL9FsQgCL0-Jf6GowaE8scn | q0-72LItF8vSI6dDLwyC5V7N | none            | kOjOu63Mgzb9SX32tNy8dsvh | NULL             |   72 |   73 |
| nf0CneWo7DOdokVvydMnqrQK | 9OwaB8_NAtZaULpAE95_DK5g | none            | TRBYFodttjhGzIhVQ5_znsgE | NULL             |   47 |   48 |
| O7BucnxyCGtqrY53ZdetOGmz | DJlKbojKjCrIJeiHA3MvPvO- | none            | YGC2sxQ3Xqvnu7aeuwhqDZZK | NULL             |   14 |   15 |
| oixNMM0ma5SMlQFCBw8zvqIY | NULL                     | none            | NULL                     | NULL             |   35 |   40 |
| piE8WsCK-JnnnR-w2mJot1XY | pyTb0YN47ZkI0DvAE7mxSkn9 | none            | NULL                     | NULL             |   61 |   62 |
| PjIH8fsxfQBMoh1f0CLs3zxD | DJlKbojKjCrIJeiHA3MvPvO- | none            | W1dmRxkgs5aHd-H1U26DDG3d | NULL             |   10 |   11 |
| POXPQCOUGTFHve-nA88vxdiu | DJlKbojKjCrIJeiHA3MvPvO- | none            | mqZM2CmtMNskkU5Cy_8CQBTD | NULL             |    2 |    3 |
| pxGrsf1fW1LEeQS3mpyQbOD7 | QMXSTEzRh1cR2roz87YFIHyr | none            | Qd9iB-aZ1mXl86MtZCc4d2yo | NULL             |   32 |   33 |
| pyTb0YN47ZkI0DvAE7mxSkn9 | q0-72LItF8vSI6dDLwyC5V7N | none            | B55SfqK2lo8vXcJJkYOAYN4v | NULL             |   60 |   71 |
| q0-72LItF8vSI6dDLwyC5V7N | NULL                     | CC-BY-NC-ND-4.0 | _aCYUI8SSFkTzrnf8v0Pzbml | NULL             |   41 |  102 |
| QMXSTEzRh1cR2roz87YFIHyr | NULL                     | none            | Qd9iB-aZ1mXl86MtZCc4d2yo | NULL             |   29 |   34 |
| slOOQdynrkcFURd7fJOxJduX | q0-72LItF8vSI6dDLwyC5V7N | none            | 8AOLl66MmBXRRRYsxzRjrVxt | NULL             |   74 |   75 |
| T_fFTkvesTnx3yQ93yTEH48U | q0-72LItF8vSI6dDLwyC5V7N | none            | zXZRpSdjemOBnsMxMr7NwM1S | NULL             |   58 |   59 |
| tcgorOXZiEgj7dlNRcbbcyra | DJlKbojKjCrIJeiHA3MvPvO- | none            | I-ZsQlOzwiDWeKNVbR7NrV_l | NULL             |    4 |    5 |
| tfSUocfCMXYrjREtg1kNfV2M | I2pNT_UL4WiVq5fjsTwPjqc8 | none            | cPEFnC-rwBr5-FKHSqLLCaCc | NULL             |   87 |   88 |
| u4A3pAFgsbHN0k-CDcxbNS_U | NULL                     | none            | _CLkHBthw5bPD_JMSh-tzUPc | NULL             |   27 |   28 |
| vEQgUO12nqZuivc_Dir3U0eY | XgUqd6YeA6E5PdNt8ACmBiiR | none            | NULL                     | NULL             |   99 |  100 |
| vY4csApMPXSIq9MZvjR0bHey | DJlKbojKjCrIJeiHA3MvPvO- | none            | Z_lDySvJjYBjRGe2IkkQ_RDD | NULL             |   18 |   19 |
| Wv5wOT9TFtbIMVxYFDklDWoO | q0-72LItF8vSI6dDLwyC5V7N | none            | vneWBmibF86LK4v9llIZLa3S | NULL             |   52 |   53 |
| XgUqd6YeA6E5PdNt8ACmBiiR | q0-72LItF8vSI6dDLwyC5V7N | none            | XsEAw-plrnIabTfVYnweoUmx | NULL             |   92 |  101 |
| XGxvOtFgIi5ptLfTznlx5HHM | DJlKbojKjCrIJeiHA3MvPvO- | none            | NULL                     | NULL             |   24 |   25 |
| XMm3X5iudPFwUwUHna8K0I0q | xNb9AS9McUkOzkbeJrxjcStF | none            | dzJBArlfBGsOfFa5Ss63IcOR | NULL             |   66 |   67 |
| xNb9AS9McUkOzkbeJrxjcStF | pyTb0YN47ZkI0DvAE7mxSkn9 | none            | B55SfqK2lo8vXcJJkYOAYN4v | NULL             |   63 |   70 |
| xRNNvVUmspydizDwH9_R3LJ0 | QMXSTEzRh1cR2roz87YFIHyr | none            | zlX1LF-gwEeweOy5JIoTDR6q | NULL             |   30 |   31 |
| XzWHNxLGMEISKCRCWRAYD5Rx | M5ee-hX70kCHgSuXYjSPRds5 | none            | NULL                     | NULL             |   79 |   80 |
| z5OHSVlbmCfLOdtJ_Ub5KnsF | XgUqd6YeA6E5PdNt8ACmBiiR | none            | Ky_igKd1WBk6utVMFiG1_6YH | NULL             |   95 |   96 |
| zZ2iCuobQUT3uUH0-H-IYb8g | M5ee-hX70kCHgSuXYjSPRds5 | CC0             | ikD3llycjNRUgJguRb3rbHLS | NULL             |   81 |   82 |
+--------------------------+--------------------------+-----------------+--------------------------+------------------+------+------+
51 rows in set (0.000 sec)
ildyria commented 9 months ago

Not able to pin point the reason why this happens. I am sorry but I am just going to close it as this seems like looking for a unicorn on the other side of the Sun. :|

SerenaButler commented 9 months ago

Ff MORE then 419 images in an album the "null" happens with browser back, if 419 images all is fine. Reproduceable.

adriy-be commented 9 months ago

Hi, I have the same issue. There is some info :

When I speak about back from navigator and Lychee there is a snip : image

I don't know how I can produce a report from the performance tool on the navigator dev tools.

I'm using docker image from linuxserver.

Hope that can help.

Thanks for your work.

SerenaButler commented 8 months ago

Error still there ... any news?

adriy-be commented 8 months ago

@SerenaButler the problem doesn't occur on 5.1.2

mashb1t commented 8 months ago

@adriy-be i can not confirm, still exists in https://gallery.mashb1t.de/gallery/q0-72LItF8vSI6dDLwyC5V7N

Screenshot 2024-02-03 at 21 05 12
SerenaButler commented 8 months ago

I can‘t confirm too. Still there.

mashb1t commented 6 months ago

@ildyria fyi 5.2.0 fixed this issue, thank you very much! @SerenaButler maybe you can check again if this is also now fixed for you.

SerenaButler commented 6 months ago

I can confirm it is fixed :-) Thanks for your work! :-)