Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

photo upload ::Safe\iptcparse -- 9 -- An error occured #1482

Closed
romleinster opened this issue Aug 24, 2022 · 7 comments · Fixed by LycheeOrg/php-exif#53
Closed

photo upload ::Safe\iptcparse -- 9 -- An error occured #1482

romleinster opened this issue Aug 24, 2022 · 7 comments · Fixed by LycheeOrg/php-exif#53
Labels
bug Something isn't working

Comments

@romleinster
Copy link

romleinster commented Aug 24, 2022

Uploading this file (https://drive.google.com/file/d/12gbckQ7yf1HCyGmDo1-1yCpjLJX1GklA/view) results in Errors on file upload:

2022-08-24 14:29:55 UTC -- error -- ::Safe\iptcparse -- 9 -- An error occured
2022-08-24 14:29:55 UTC -- error -- App\Metadata\Extractor::createFromFile -- 98 -- An error occured; caused by

Other files uploads work properly.

Output of the diagnostics [REQUIRED]

Diagnostics
-------
Warning: Dropbox import not working. dropbox_key is empty.




System Information
--------------
Lychee Version (git):            master (04b1522) -- Up to date (32 minutes ago).
DB Version:                      4.6.0

composer install:                --no-dev
APP_ENV:                         production
APP_DEBUG:                       false

System:                          Linux
PHP Version:                     8.1.9
PHP User agent:                  Lychee/4 (https://lycheeorg.github.io/)
Timezone:                        America/New_York
Max uploaded file size:          500M
Max post size:                   500M
Max execution time:              200
MySQL Version:                   10.8.4-MariaDB-log

exec() Available:                yes
Imagick Available:               1
Imagick Enabled:                 1
Imagick Version:                 1808
GD Version:                      2.3.3




Config Information
--------------
version:                         040600
check_for_updates:               0
sorting_photos_col:              taken_at
sorting_photos_order:            ASC
sorting_albums_col:              max_taken_at
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:                            en
layout:                          1
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:                   
landing_title:                    
landing_subtitle:                
landing_facebook:                
landing_flickr:                  
landing_twitter:                 
landing_instagram:               
landing_youtube:                 
landing_background:              
site_title:                 
site_copyright_enable:           1
site_copyright_begin:            
site_copyright_end:              2022
additional_footer_text:          
display_social_in_gallery:       0
public_search:                   0
SL_enable:                       0
SL_for_admin:                    0
public_recent:                   0
recent_age:                      0
public_starred:                  0
downloadable:                    0
photos_wraparound:               1
map_display:                     1
zip64:                           1
map_display_public:              1
map_provider:                    Wikimedia
force_32bit_ids:                 0
map_include_subalbums:           1
update_check_every_days:         3
has_exiftool:                    0
share_button_visible:            0
import_via_symlink:              0
has_ffmpeg:                      1
location_decoding:               1
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:                       0
nsfw_warning:                    0
nsfw_warning_admin:              0
map_display_direction:           1
album_subtitle_type:             oldstyle
upload_processing_limit:         4
public_photos_hidden:            0
new_photos_notification:         0
legacy_id_redirection:           1
zip_deflate_level:               6

Browser and system

client: Firefox 103.0.2 (64-bit) / Windows 11

@kamil4 kamil4 added the bug Something isn't working label Aug 24, 2022
@kamil4
Copy link
Contributor

kamil4 commented Aug 24, 2022

Confirmed. A workaround until we fix it is to install exiftool and enable it by setting has_exiftool to 1.

@nagmat84
Copy link
Collaborator

@romleinster Do we have permission to add your photo to our automatic test suite? This sounds like an erroneous EXIF tag in your image file, but I agree that Lychee should be robust and forging to this kind of input errors and should keep trying to proceed as long as possible.

However, it is always difficult to find suitable "bad" samples for our tests.

@romleinster
Copy link
Author

romleinster commented Aug 24, 2022

yes, you can use the photo for testing.

@kamil4 Do I need to configure a path to exiftool? I installed exiftool (both through my distribution and the included script), and set has_exiftool to 1 but on upload I get:

2022-08-24 19:37:43 UTC -- error   -- PHPExif\Adapter\Exiftool::setToolPath -- 53 -- Given path () to the exiftool binary is invalid
2022-08-24 19:37:43 UTC -- error   -- App\Metadata\Extractor::createFromFile -- 98 -- Given path () to the exiftool binary is invalid; caused by
2022-08-24 19:37:43 UTC -- error   -- App\Metadata\Extractor::createFromFile -- 100 -- The configured EXIF adapter is not available; caused by

I have the bin available in my local path:

$ which exiftool
/usr/bin/vendor_perl/exiftool

but it seems like the app doesn't have access to it.

@kamil4
Copy link
Contributor

kamil4 commented Aug 24, 2022

I believe we do search for it in your $PATH, but that's done from within your http daemon, so /usr/bin/vendor_perl would need to be included in the path of that process...

@kamil4
Copy link
Contributor

kamil4 commented Aug 24, 2022

FYI, you should be able to fix it at this point by replacing the file vendor/lychee-org/php-exif/lib/PHPExif/Adapter/ImageMagick.php with the content of https://github.com/LycheeOrg/php-exif/raw/ced1f9114605f0300cd6e874ff968c1bd66df3cf/lib/PHPExif/Adapter/ImageMagick.php.

@kamil4
Copy link
Contributor

kamil4 commented Aug 25, 2022

While the fix has been merged into the dependency (where it belongs), I'm keeping this open until it lands on Lychee's master...

@kamil4 kamil4 reopened this Aug 25, 2022
ildyria added a commit that referenced this issue Sep 27, 2022
@ildyria
Copy link
Member

ildyria commented Sep 27, 2022

Closed with fd445f6

@ildyria ildyria closed this as completed Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants