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

errors after update to 8.7.20 #47

Closed
dni opened this issue Dec 4, 2018 · 5 comments
Closed

errors after update to 8.7.20 #47

dni opened this issue Dec 4, 2018 · 5 comments

Comments

@dni
Copy link
Contributor

dni commented Dec 4, 2018

Hi! i have a big exception output in the frontend after updateing to 8.7.20.
I narrowed down the problem, somehow the fileExists function is trying to check an empty string, i dont know why, but my quickfix was just to check for an empty string in AmazonS3Driver.php

294 public function fileExists($identifier)
295 {
296 if ($identifier === "" || substr($identifier, -1) === '/') {
297 return false;
298 }
299 return $this->objectExists($identifier);
300 }

not sure if this fix is any good.

@cehret
Copy link

cehret commented Dec 11, 2018

Same Problem here (TYPO3 8.7.20 / PHP 7.1)
The fix of @dni works for me as far as I could test until now...

@dni
Copy link
Contributor Author

dni commented Dec 11, 2018

didnt have any error, either this whole week

@twstrunz
Copy link

I can confirm the behavior in TYPO3 8.7.22 / PHP 7.2 as well. Fix by @dni did the trick.

@felixbuenemann
Copy link

Also running into this after Upgrading to 8.7.22, Backtrace looks like:

#0 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/Middleware.php(79): Aws\Api\Validator->validate('HeadObject', Object(Aws\Api\StructureShape), Array)
#1 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/S3/S3Client.php(354): Aws\Middleware::Aws\{closure}(Object(Aws\Command), NULL)
#2 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/S3/S3Client.php(377): Aws\S3\S3Client::Aws\S3\{closure}(Object(Aws\Command), NULL)
#3 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/S3/S3Client.php(311): Aws\S3\S3Client::Aws\S3\{closure}(Object(Aws\Command), NULL)
#4 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/S3/S3Client.php(330): Aws\S3\S3Client::Aws\S3\{closure}(Object(Aws\Command), NULL)
#5 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/Middleware.php(55): Aws\S3\S3Client::Aws\S3\{closure}(Object(Aws\Command), NULL)
#6 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/S3/SSECMiddleware.php(59): Aws\Middleware::Aws\{closure}(Object(Aws\Command), NULL)
#7 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/AwsClientTrait.php(65): Aws\S3\SSECMiddleware->__invoke(Object(Aws\Command))
#8 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/AwsClientTrait.php(59): Aws\AwsClient->executeAsync(Object(Aws\Command))
#9 typo3conf/ext/aus_driver_amazon_s3/Resources/Private/PHP/Aws/Aws/AwsClientTrait.php(78): Aws\AwsClient->execute(Object(Aws\Command))
#10 typo3conf/ext/aus_driver_amazon_s3/Classes/Driver/AmazonS3Driver.php(1107): Aws\AwsClient->__call('headObject', Array)
#11 typo3conf/ext/aus_driver_amazon_s3/Classes/Driver/AmazonS3Driver.php(1091): AUS\AusDriverAmazonS3\Driver\AmazonS3Driver->getMetaInfo('')
#12 typo3conf/ext/aus_driver_amazon_s3/Classes/Driver/AmazonS3Driver.php(293): AUS\AusDriverAmazonS3\Driver\AmazonS3Driver->objectExists('')
#13 typo3_src-8.7.22/typo3/sysext/core/Classes/Resource/ResourceStorage.php(1583): AUS\AusDriverAmazonS3\Driver\AmazonS3Driver->fileExists('')
#14 typo3_src-8.7.22/typo3/sysext/core/Classes/Resource/AbstractFile.php(386): TYPO3\CMS\Core\Resource\ResourceStorage->hasFile('')
#15 typo3_src-8.7.22/typo3/sysext/core/Classes/Resource/ProcessedFile.php(279): TYPO3\CMS\Core\Resource\AbstractFile->exists()
#16 typo3_src-8.7.22/typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php(47): TYPO3\CMS\Core\Resource\ProcessedFile->exists()
#17 typo3_src-8.7.22/typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php(68): TYPO3\CMS\Core\Resource\OnlineMedia\Processing\PreviewProcessing->needsReprocessing(Object(TYPO3\CMS\Core\Resource\ProcessedFile))
#18 [internal function]: TYPO3\CMS\Core\Resource\OnlineMedia\Processing\PreviewProcessing->processFile(Object(TYPO3\CMS\Core\Resource\Service\FileProcessingService), Object(AUS\AusDriverAmazonS3\Driver\AmazonS3Driver), Object(TYPO3\CMS\Core\Resource\ProcessedFile), Object(TYPO3\CMS\Core\Resource\File), 'Image.CropScale...', Array, 'TYPO3\\CMS\\Core\\...')

Full Backtrace

Interestingly this gets printed to the response body followed by the normal body and no exception get's logged in our Sentry and the correct body appears after the backtrace, so it looks like the error is caught explicitly, printend and then ignored.

@TildBJ
Copy link
Contributor

TildBJ commented Jan 28, 2019

Steps to reproduce this Error:

  1. Upload File via Filelist to an AWS Storage
  2. Use Fluids <f:image> ViewHelper without any width- and height definitions and reference the File you just uploaded
  3. In this case TYPO3 should generate a new entry in sys_file_processedfile without a value in identifier and the error should be visible in Frontend

I'm not sure why TYPO3 generates the empty entry in sys_file_processedfile so maybe the bug is in TYPO3 core.

I guess the quick fix @dni provided should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants