Closed thesethcarter closed 1 year ago
Well, shoot. I think you've encountered this:
https://github.com/aws/aws-sdk-php/issues/2681
Oh, wait you're running the beta?
Oh, good. I think there will be time to fix this before formal release.
We need to bump aws-sdk-php
to >= v3.269.1:
Cc @come-nc @kesselb
Initially encountered the issue in the Stable release channel. Attempted to correct it by moving to Beta, however; the error persists.
That code has been the same across the most recent NC25/NC26/NC27.
Your report lead me to believe this worked for you in NC26. Is that correct?
If so, which version NC26 of specifically worked previously?
As far as I can remember everything worked without issue when running 26.0.5.
Can you show me the line declaring the seek()
function from your /var/www/vault/3rdparty/psr/http-message/src/StreamInterface.php
?
It'll either be:
public function seek($offset, $whence = SEEK_SET);
or
public function seek(int $offset, int $whence = SEEK_SET): void;
Your error suggests is the latter, but that's not what is shown in our code base:
It is currently:
public function seek($offset, $whence = SEEK_SET);
It's the camerarawpreviews
app:
FIXED! As soon as I disabled it everything started uploading without an issue. Thank you!
Awesome!
I think due to #37891 we should probably still bump up the aws-sdk-php version since I think it opened the door to psr/http-message
being bumped to 2.0:
Which the existing version of aws-sdk-php we use won't work with.
But composer dependencies are not my specialty so I'm simply noting this for the future for someone else to find. :)
If anybody has any tips on how I can avoid this problem in my app camerarawpreviews, it would be much appreciated. Is there a best practice here about using composer in nexcloud apps which I am not following or something? For instance, is there a way in my composer autoloader to namespace everything so that there is no global redeclaration of classes?
Hi @ariselseng :wave:
We recently added an article about the dependency hell to our docs: https://docs.nextcloud.com/server/latest/developer_manual/app_development/dependency_management.html
intervention/image pulls in guzzlehttp/psr7 as dependency, but install a version that is incompatible with the copy shipped by Nextcloud: https://github.com/Intervention/image/blob/54934ae8ea3661fd189437df90fb09ec3b679c74/composer.json#L17
If you require psr/http-message:^1.1 in your composer.json it should install the right version. Even better would to drop intervention/image dependency.
We should update the aws-sdk in Nextcloud. But we usually don't back port dependency updates, and thus a newer version will not be shipped before Nextcloud 28.
Hi @ariselseng :wave:
We recently added an article about the dependency hell to our docs: https://docs.nextcloud.com/server/latest/developer_manual/app_development/dependency_management.html
intervention/image pulls in guzzlehttp/psr7 as dependency, but install a version that is incompatible with the copy shipped by Nextcloud: https://github.com/Intervention/image/blob/54934ae8ea3661fd189437df90fb09ec3b679c74/composer.json#L17
If you require psr/http-message:^1.1 in your composer.json it should install the right version. Even better would to drop intervention/image dependency.
We should update the aws-sdk in Nextcloud. But we usually don't back port dependency updates, and thus a newer version will not be shipped before Nextcloud 28.
Thank you for your insight. I will try to get rid of my dependencies. I wonder if it is possible to somehow patch the namespaces in the local vendor folder with a prefix or something, so that er can avoid all this together. Or tie the local composer with the core's composer so that the local composer is aware of where to find core's dependencies.
@ariselseng I'm afraid your last comment is going to get lost since this issue has been closed out. Would you mind opening a dedicated issue with your comment? It's a fair question (and one that I don't feel qualified to address, but I'll do my best to direct to other qualified project participants). Feel free to ref this issue as the latest field example of this situation arising in the new issue you create.
⚠️ This issue respects the following points: ⚠️
Bug description
After upgrading to version 27 from 26 I have been unable to upload any files larger than 150mb with S3 primary storage. The following error is continually displayed in the logs:
Steps to reproduce
Expected behavior
Successful file upload.
Installation method
Community manual installation with Archive
Nextcloud Server version
27
Operating system
Ubuntu
PHP engine version
8.2
Web server
Nginx
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Upgraded from a MAJOR version.
Are you using the Nextcloud Server Encryption module?
Encryption is disabled.
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response