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

Exception when accessing a toot: "stream not found" #1742

Open
nickvergessen opened this issue Apr 19, 2023 · 1 comment
Open

Exception when accessing a toot: "stream not found" #1742

nickvergessen opened this issue Apr 19, 2023 · 1 comment
Labels
1. to develop bug Something isn't working

Comments

@nickvergessen
Copy link
Member

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://cloud.nextcloud.com/apps/social/@jos/1681913107317703

Expected behavior
I see the toot

Screenshots

Bildschirmfoto vom 2023-04-19 16-10-48

Social app version: company

Nextcloud log (data/nextcloud.log)

{
  "reqId": "6CSD8Y7VTW8s7Y7vGNIY",
  "level": 3,
  "time": "2023-04-19T14:06:10+00:00",
  "remoteAddr": "",
  "user": "joas",
  "app": "index",
  "method": "GET",
  "url": "/apps/social/@jos/1681913107317703",
  "message": "stream not found",
  "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0",
  "version": "26.0.1.0",
  "exception": {
    "Exception": "OCA\\Social\\Exceptions\\StreamNotFoundException",
    "Message": "stream not found",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/social/lib/Db/StreamRequest.php",
        "line": 251,
        "function": "getStreamFromRequest",
        "class": "OCA\\Social\\Db\\StreamRequestBuilder",
        "type": "->",
        "args": [
          [
            "OCA\\Social\\Db\\SocialQueryBuilder"
          ]
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/social/lib/Service/StreamService.php",
        "line": 390,
        "function": "getStreamByNid",
        "class": "OCA\\Social\\Db\\StreamRequest",
        "type": "->",
        "args": [
          1681913107317703
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/social/lib/Controller/SocialPubController.php",
        "line": 184,
        "function": "getStreamByNid",
        "class": "OCA\\Social\\Service\\StreamService",
        "type": "->",
        "args": [
          1681913107317703
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/social/lib/Controller/ActivityPubController.php",
        "line": 370,
        "function": "displayPost",
        "class": "OCA\\Social\\Controller\\SocialPubController",
        "type": "->",
        "args": [
          "jos",
          1681913107317703
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "displayPost",
        "class": "OCA\\Social\\Controller\\ActivityPubController",
        "type": "->",
        "args": [
          "jos",
          "1681913107317703"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Social\\Controller\\ActivityPubController"
          ],
          "displayPost"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Social\\Controller\\ActivityPubController"
          ],
          "displayPost"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Social\\Controller\\ActivityPubController",
          "displayPost",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "jos",
            "1681913107317703",
            "social.ActivityPub.displayPost"
          ]
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/base.php",
        "line": 1056,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/social/@jos/1681913107317703"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/cloud.nextcloud.com/nextcloud/apps/social/lib/Db/StreamRequestBuilder.php",
    "Line": 175,
    "CustomMessage": "--"
  }
}
@nickvergessen nickvergessen added bug Something isn't working 1. to develop labels Apr 19, 2023
@riparise
Copy link

riparise commented Jul 6, 2023

@nickvergessen

It looks like the issue is that the tokens extracted from the URL are larger than the maximal int size of PHP, so they break when the $token is converted from string to int

For example: take a look in /lib/Controller/ActivityPubController.php line 370

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants