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

buggy behavior when clicking on a file in trashbin, server version dependent #2680

Closed
blizzz opened this issue Dec 15, 2023 · 2 comments
Closed
Labels
1. to develop Issues that are ready for development bug

Comments

@blizzz
Copy link
Member

blizzz commented Dec 15, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Delete a file from a groupfolder
  2. Go to trashbin
  3. Click on that file

Expected behaviour

Either nothing, or the file would be downloaded successfully

Actual behaviour

✔️ NC 26: nothing happens

❌ NC 27: download failes with browser warning (URL like: https://my.nc.srv/remote.php/dav/trashbin/$UID/trash/$FILENAME.$EXR.d1675427849
{
  "reqId": "vI8Cn44J6jkCKVxnEB5S",
  "level": 3,
  "time": "2023-12-15T19:25:52+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "stable27",
  "app": "webdav",
  "method": "GET",
  "url": "/stable27/remote.php/dav/trashbin/stable27/trash/reverseproxy.ods.d1675427849",
  "message": "fwrite(): Argument #2 ($data) must be of type string, bool given",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
  "version": "27.1.2.1",
  "exception": {
    "Exception": "TypeError",
    "Message": "fwrite(): Argument #2 ($data) must be of type string, bool given",
    "Code": 0,
    "Trace": [
      {
        "file": "/srv/http/nextcloud/stable27/3rdparty/sabre/http/lib/Sapi.php",
        "line": 127,
        "function": "fwrite",
        "args": [
          null,
          false,
          27379
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 490,
        "function": "sendResponse",
        "class": "Sabre\\HTTP\\Sapi",
        "type": "::",
        "args": [
          [
            "Sabre\\HTTP\\Response"
          ]
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          [
            "Sabre\\HTTP\\Request"
          ],
          [
            "Sabre\\HTTP\\Response"
          ]
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/apps/dav/lib/Server.php",
        "line": 365,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/remote.php",
        "line": 172,
        "args": [
          "/srv/http/nextcloud/stable27/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/srv/http/nextcloud/stable27/3rdparty/sabre/http/lib/Sapi.php",
    "Line": 127,
    "message": "fwrite(): Argument #2 ($data) must be of type string, bool given",
    "exception": {},
    "CustomMessage": "fwrite(): Argument #2 ($data) must be of type string, bool given"
  }
}
{
  "reqId": "vI8Cn44J6jkCKVxnEB5S",
  "level": 3,
  "time": "2023-12-15T19:25:52+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "stable27",
  "app": "remote",
  "method": "GET",
  "url": "/stable27/remote.php/dav/trashbin/stable27/trash/reverseproxy.ods.d1675427849",
  "message": "OCA\\DAV\\Files\\BrowserErrorPagePlugin::logException(): Argument #1 ($ex) must be of type Exception, TypeError given, called in /srv/http/nextcloud/stable27/3rdparty/sabre/event/lib/WildcardEmitterTrait.php on line 89",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
  "version": "27.1.2.1",
  "exception": {
    "Exception": "TypeError",
    "Message": "OCA\\DAV\\Files\\BrowserErrorPagePlugin::logException(): Argument #1 ($ex) must be of type Exception, TypeError given, called in /srv/http/nextcloud/stable27/3rdparty/sabre/event/lib/WildcardEmitterTrait.php on line 89",
    "Code": 0,
    "Trace": [
      {
        "file": "/srv/http/nextcloud/stable27/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "logException",
        "class": "OCA\\DAV\\Files\\BrowserErrorPagePlugin",
        "type": "->",
        "args": [
          [
            "TypeError"
          ]
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 256,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "exception",
          [
            [
              "TypeError"
            ]
          ]
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/apps/dav/lib/Server.php",
        "line": 365,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/remote.php",
        "line": 172,
        "args": [
          "/srv/http/nextcloud/stable27/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/srv/http/nextcloud/stable27/apps/dav/lib/Files/BrowserErrorPagePlugin.php",
    "Line": 75,
    "message": "OCA\\DAV\\Files\\BrowserErrorPagePlugin::logException(): Argument #1 ($ex) must be of type Exception, TypeError given, called in /srv/http/nextcloud/stable27/3rdparty/sabre/event/lib/WildcardEmitterTrait.php on line 89",
    "exception": {},
    "CustomMessage": "OCA\\DAV\\Files\\BrowserErrorPagePlugin::logException(): Argument #1 ($ex) must be of type Exception, TypeError given, called in /srv/http/nextcloud/stable27/3rdparty/sabre/event/lib/WildcardEmitterTrait.php on line 89"
  }
}
{
  "reqId": "vI8Cn44J6jkCKVxnEB5S",
  "level": 1,
  "time": "2023-12-15T19:25:52+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "stable27",
  "app": "no app in context",
  "method": "GET",
  "url": "/stable27/remote.php/dav/trashbin/stable27/trash/reverseproxy.ods.d1675427849",
  "message": "Unable to generate a URL for the named route \"dashboard.dashboard.index\" as such route does not exist.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
  "version": "27.1.2.1",
  "exception": {
    "Exception": "Symfony\\Component\\Routing\\Exception\\RouteNotFoundException",
    "Message": "Unable to generate a URL for the named route \"dashboard.dashboard.index\" as such route does not exist.",
    "Code": 0,
    "Trace": [
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/Route/Router.php",
        "line": 380,
        "function": "generate",
        "class": "Symfony\\Component\\Routing\\Generator\\UrlGenerator",
        "type": "->",
        "args": [
          "dashboard.dashboard.index",
          [],
          1
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/Route/CachingRouter.php",
        "line": 65,
        "function": "generate",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "dashboard.dashboard.index",
          [],
          false
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/URLGenerator.php",
        "line": 103,
        "function": "generate",
        "class": "OC\\Route\\CachingRouter",
        "type": "->",
        "args": [
          "dashboard.dashboard.index",
          []
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/NavigationManager.php",
        "line": 320,
        "function": "linkToRoute",
        "class": "OC\\URLGenerator",
        "type": "->",
        "args": [
          "dashboard.dashboard.index"
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/NavigationManager.php",
        "line": 113,
        "function": "init",
        "class": "OC\\NavigationManager",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/apps/theming/lib/ThemingDefaults.php",
        "line": 188,
        "function": "getAll",
        "class": "OC\\NavigationManager",
        "type": "->",
        "args": [
          "guest"
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/legacy/OC_Defaults.php",
        "line": 280,
        "function": "getShortFooter",
        "class": "OCA\\Theming\\ThemingDefaults",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/public/Defaults.php",
        "line": 176,
        "function": "getLongFooter",
        "class": "OC_Defaults",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/core/templates/layout.guest.php",
        "line": 52,
        "function": "getLongFooter",
        "class": "OCP\\Defaults",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/Template/Base.php",
        "line": 180,
        "args": [
          "/srv/http/nextcloud/stable27/core/templates/layout.guest.php"
        ],
        "function": "include"
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/Template/Base.php",
        "line": 150,
        "function": "load",
        "class": "OC\\Template\\Base",
        "type": "->",
        "args": [
          "/srv/http/nextcloud/stable27/core/templates/layout.guest.php",
          null
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/legacy/OC_Template.php",
        "line": 179,
        "function": "fetchPage",
        "class": "OC\\Template\\Base",
        "type": "->",
        "args": [
          null
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/legacy/OC_Template.php",
        "line": 210,
        "function": "fetchPage",
        "class": "OC_Template",
        "type": "->",
        "args": [
          null
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/Template/Base.php",
        "line": 132,
        "function": "fetchPage",
        "class": "OC_Template",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/lib/private/legacy/OC_Template.php",
        "line": 331,
        "function": "printPage",
        "class": "OC\\Template\\Base",
        "type": "->",
        "args": []
      },
      {
        "file": "/srv/http/nextcloud/stable27/remote.php",
        "line": 88,
        "function": "printExceptionErrorPage",
        "class": "OC_Template",
        "type": "::",
        "args": [
          [
            "TypeError"
          ],
          500
        ]
      },
      {
        "file": "/srv/http/nextcloud/stable27/remote.php",
        "line": 176,
        "function": "handleException",
        "args": [
          [
            "TypeError"
          ]
        ]
      }
    ],
    "File": "/srv/http/nextcloud/stable27/3rdparty/symfony/routing/Generator/UrlGenerator.php",
    "Line": 143,
    "message": "Unable to generate a URL for the named route \"dashboard.dashboard.index\" as such route does not exist.",
    "exception": {},
    "CustomMessage": "Unable to generate a URL for the named route \"dashboard.dashboard.index\" as such route does not exist."
  }
}
❌ NC 28: download fails false positively resulting in a 0 bytes file (URL like: https://my.nc.srv/remote.php/dav/trashbin/$UID/trash/$FILENAME.$EXT.d1702664074 – like above).
{
  "reqId": "vOkvI2eM5xQEqvyz94SY",
  "level": 3,
  "time": "2023-12-15T19:29:46+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "stable28",
  "app": "PHP",
  "method": "GET",
  "url": "/stable28/remote.php/dav/trashbin/stable28/trash/reverseproxy(4).ods.d1702664074",
  "message": "fopen(/srv/http/nextcloud/stable28/data/__groupfolders/trash/1/reverseproxy(4).ods.d1702667668.d1702664074): Failed to open stream: No such file or directory at /srv/http/nextcloud/stable28/lib/private/Files/Storage/Local.php#429",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
  "version": "28.0.1.0",
  "data": {
    "app": "PHP"
  }
}

Server configuration

Nextcloud version: 27, 28

Group folders version: current branch

Logs

Nextcloud log (data/nextcloud.log)

please expand the sections above.

@blizzz blizzz added bug 0. Needs triage Issues that need to be triaged 1. to develop Issues that are ready for development and removed 0. Needs triage Issues that need to be triaged labels Dec 15, 2023
@blizzz
Copy link
Member Author

blizzz commented Dec 15, 2023

@skjnldsv @mejo- I am not sure whether the problem resides in group folders or in server, but the behaviour is differently compared to deleted files from e.g. primary/local storage.

@solracsf
Copy link
Member

solracsf commented Jan 3, 2024

Can this be related to #2657 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Issues that are ready for development bug
Projects
None yet
Development

No branches or pull requests

3 participants