-
-
Couldn't load subscription status.
- Fork 4.6k
Add check for temp file #54351
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
Add check for temp file #54351
Conversation
Signed-off-by: Artur Weigandt <Art4@users.noreply.github.com>
|
/backport to stable31 |
|
Please commit to |
|
I'm sorry, I cannot commit this changes into |
|
Thanks for this PR @Art4 |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
After upgrade nextcloud v29.0.16 to v30.0.13 I've noticed that some apps were deactivated and couldn't be updated. After running the cli commands I've got the error "Error: sink must not be a boolean".
The log tells me the reason for this error:
{ "exception": { "Exception": "GuzzleHttp\\Exception\\InvalidArgumentException", "Message": "sink must not be a boolean", "Code": 0, "Trace": [ [...] ], "File": "[redacted]/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php", "Line": 438, "message": "sink must not be a boolean", "exception": [], "CustomMessage": "sink must not be a boolean" } }Detailed error log
{ "reqId": "aJiyFr7ys6gPt1pipcv5YgAAzSE", "level": 3, "time": "2025-08-10T14:52:06+00:00", "remoteAddr": "[redacted]", "user": "[redacted]", "app": "no app in context", "method": "GET", "url": "/settings/apps/update/spreed", "message": "sink must not be a boolean", "userAgent": "[redacted]", "version": "30.0.13.1", "exception": { "Exception": "GuzzleHttp\\Exception\\InvalidArgumentException", "Message": "sink must not be a boolean", "Code": 0, "Trace": [ { "file": "[redacted]/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php", "line": 328, "function": "applyOptions", "class": "GuzzleHttp\\Client", "type": "->", "args": [ { "__class__": "GuzzleHttp\\Psr7\\Request" }, "*** sensitive parameters replaced ***" ] }, { "file": "[redacted]/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php", "line": 169, "function": "transfer", "class": "GuzzleHttp\\Client", "type": "->", "args": [ { "__class__": "GuzzleHttp\\Psr7\\Request" }, "*** sensitive parameters replaced ***" ] }, { "file": "[redacted]/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php", "line": 189, "function": "requestAsync", "class": "GuzzleHttp\\Client", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "[redacted]/nextcloud/lib/private/Http/Client/Client.php", "line": 205, "function": "request", "class": "GuzzleHttp\\Client", "type": "->", "args": [ "*** sensitive parameters replaced ***", "*** sensitive parameters replaced ***", { "verify": "[redacted]/nextcloud/resources/config/ca-bundle.crt", "timeout": 120, "allow_redirects": { "on_redirect": { "__class__": "Closure" } }, "sink": false, "nextcloud": { "allow_local_address": false }, "headers": { "User-Agent": "Nextcloud Server Crawler", "Accept-Encoding": "gzip" }, "synchronous": true } ] }, { "file": "[redacted]/nextcloud/lib/private/Installer.php", "line": 246, "function": "get", "class": "OC\\Http\\Client\\Client", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "[redacted]/nextcloud/lib/private/Installer.php", "line": 144, "function": "downloadApp", "class": "OC\\Installer", "type": "->", "args": [ "*** sensitive parameters replaced ***", false ] }, { "file": "[redacted]/nextcloud/apps/settings/lib/Controller/AppSettingsController.php", "line": 612, "function": "updateAppstoreApp", "class": "OC\\Installer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "[redacted]/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 208, "function": "updateApp", "class": "OCA\\Settings\\Controller\\AppSettingsController", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "[redacted]/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 114, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ { "__class__": "OCA\\Settings\\Controller\\AppSettingsController" }, "updateApp" ] }, { "file": "[redacted]/nextcloud/lib/private/AppFramework/App.php", "line": 161, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ { "__class__": "OCA\\Settings\\Controller\\AppSettingsController" }, "updateApp" ] }, { "file": "[redacted]/nextcloud/lib/private/Route/Router.php", "line": 303, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OCA\\Settings\\Controller\\AppSettingsController", "updateApp", { "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer" }, { "appId": "*** sensitive parameters replaced ***", "_route": "settings.appsettings.updateapp" } ] }, { "file": "[redacted]/nextcloud/lib/base.php", "line": 1010, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/settings/apps/update/spreed" ] }, { "file": "[redacted]/nextcloud/index.php", "line": 24, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "[redacted]/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php", "Line": 438, "message": "sink must not be a boolean", "exception": [], "CustomMessage": "sink must not be a boolean" }, "id": "[redacted]" }This exception is thrown by Guzzle, see https://github.com/guzzle/guzzle/blob/7.9.3/src/Client.php#L438
(For unknown reasons, my tmp folder suddenly became unwritable. I solved this problem with
chmod)This PR adds a type check for
$tempFilesimilar to #52911.TODO
nextcloud:stable31Checklist