social
social copied to clipboard
Exception when accessing a toot: "stream not found"
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to https://cloud.nextcloud.com/apps/social/@jos/1681913107317703
Expected behavior I see the toot
Screenshots

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