Skip to content

Conversation

@Art4
Copy link

@Art4 Art4 commented Aug 10, 2025

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".

$ php occ app:update spreed -vvv
spreed new version available: 20.1.9
spreed couldn't be updated
$ php occ app:install spreed
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

            if (\is_bool($options['sink'])) {
                throw new InvalidArgumentException('sink must not be a boolean');
            }

(For unknown reasons, my tmp folder suddenly became unwritable. I solved this problem with chmod)

This PR adds a type check for $tempFile similar to #52911.

TODO

  • Create fix for branch nextcloud:stable31

Checklist

Signed-off-by: Artur Weigandt <Art4@users.noreply.github.com>
@solracsf solracsf requested review from a team, ArtificialOwl, leftybournes and provokateurin and removed request for a team August 11, 2025 07:33
@solracsf solracsf added the 3. to review Waiting for reviews label Aug 11, 2025
@solracsf solracsf added this to the Nextcloud 32 milestone Aug 11, 2025
@solracsf
Copy link
Member

/backport to stable31

@Art4
Copy link
Author

Art4 commented Aug 11, 2025

@solracsf Please note: #52911 fixes this issue on master (stable32). This PR targets stable30 and respective stable31. Should I change the PR against stable31 so it can be backported to stable30?

@solracsf
Copy link
Member

solracsf commented Aug 11, 2025

Please commit to master so it can be backported to 31 and 30.

@Art4 Art4 changed the base branch from stable30 to master August 12, 2025 06:07
@Art4 Art4 changed the base branch from master to stable30 August 12, 2025 06:07
@Art4
Copy link
Author

Art4 commented Aug 12, 2025

I'm sorry, I cannot commit this changes into master, because they are already there from #52911. This PR backports only the type check to stable30. Should I create a new PR against the stable31 branch instead?

@nextcloud nextcloud deleted a comment from backportbot bot Aug 12, 2025
@skjnldsv skjnldsv closed this Aug 12, 2025
@skjnldsv
Copy link
Member

Thanks for this PR @Art4
I opened the partial backports

@Art4 Art4 deleted the patch-1 branch August 12, 2025 07:40
@github-actions
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants