Circle throws exceptions in cypress run logs
Describe the bug In the current cypress run logs there are a lot of exceptions thrown by circles.
Example exception
{
"reqId": "XmIybWFwQcTsxNQrtAQR",
"level": 3,
"time": "2023-09-13T21:37:47+00:00",
"remoteAddr": "",
"user": "--",
"app": "",
"method": "",
"url": "--",
"message": "",
"userAgent": "--",
"version": "28.0.0.2",
"exception": {
"Exception": "OCA\\Circles\\Tools\\Exceptions\\RequestNetworkException",
"Message": "",
"Code": 0,
"Trace": [
{
"file": "/home/runner/work/collectives/collectives/apps/circles/lib/Service/FederatedEventService.php",
"line": 443,
"function": "doRequest",
"class": "OCA\\Circles\\Service\\FederatedEventService",
"type": "->",
"args": [
[
"OCA\\Circles\\Tools\\Model\\NCRequest"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/apps/circles/lib/Service/FederatedEventService.php",
"line": 188,
"function": "initBroadcast",
"class": "OCA\\Circles\\Service\\FederatedEventService",
"type": "->",
"args": [
[
"OCA\\Circles\\Model\\Federated\\FederatedEvent"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/apps/circles/lib/Service/SyncService.php",
"line": 454,
"function": "newEvent",
"class": "OCA\\Circles\\Service\\FederatedEventService",
"type": "->",
"args": [
[
"OCA\\Circles\\Model\\Federated\\FederatedEvent"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/apps/circles/lib/Listeners/GroupMemberAdded.php",
"line": 71,
"function": "groupMemberAdded",
"class": "OCA\\Circles\\Service\\SyncService",
"type": "->",
"args": [
"Bobs Group",
"bob"
]
},
{
"file": "/home/runner/work/collectives/collectives/lib/private/EventDispatcher/ServiceEventListener.php",
"line": 86,
"function": "handle",
"class": "OCA\\Circles\\Listeners\\GroupMemberAdded",
"type": "->",
"args": [
[
"OCP\\Group\\Events\\UserAddedEvent"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 230,
"function": "__invoke",
"class": "OC\\EventDispatcher\\ServiceEventListener",
"type": "->",
"args": [
[
"OCP\\Group\\Events\\UserAddedEvent"
],
"OCP\\Group\\Events\\UserAddedEvent",
[
"Symfony\\Component\\EventDispatcher\\EventDispatcher"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 59,
"function": "callListeners",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
[
"Closure"
],
[
"Closure"
],
[
"Closure"
],
[
"Closure"
],
[
"Closure"
]
],
"OCP\\Group\\Events\\UserAddedEvent",
[
"OCP\\Group\\Events\\UserAddedEvent"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/lib/private/EventDispatcher/EventDispatcher.php",
"line": 94,
"function": "dispatch",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
"OCP\\Group\\Events\\UserAddedEvent"
],
"OCP\\Group\\Events\\UserAddedEvent"
]
},
{
"file": "/home/runner/work/collectives/collectives/lib/private/EventDispatcher/EventDispatcher.php",
"line": 106,
"function": "dispatch",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
"OCP\\Group\\Events\\UserAddedEvent",
[
"OCP\\Group\\Events\\UserAddedEvent"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/lib/private/Group/Group.php",
"line": 191,
"function": "dispatchTyped",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
"OCP\\Group\\Events\\UserAddedEvent"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/core/Command/Group/AddUser.php",
"line": 70,
"function": "addUser",
"class": "OC\\Group\\Group",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/work/collectives/collectives/3rdparty/symfony/console/Command/Command.php",
"line": 298,
"function": "execute",
"class": "OC\\Core\\Command\\Group\\AddUser",
"type": "->",
"args": [
[
"Symfony\\Component\\Console\\Input\\ArgvInput"
],
[
"Symfony\\Component\\Console\\Output\\ConsoleOutput"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/core/Command/Base.php",
"line": 177,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->",
"args": [
[
"Symfony\\Component\\Console\\Input\\ArgvInput"
],
[
"Symfony\\Component\\Console\\Output\\ConsoleOutput"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/3rdparty/symfony/console/Application.php",
"line": 1040,
"function": "run",
"class": "OC\\Core\\Command\\Base",
"type": "->",
"args": [
[
"Symfony\\Component\\Console\\Input\\ArgvInput"
],
[
"Symfony\\Component\\Console\\Output\\ConsoleOutput"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/3rdparty/symfony/console/Application.php",
"line": 301,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->",
"args": [
[
"OC\\Core\\Command\\Group\\AddUser"
],
[
"Symfony\\Component\\Console\\Input\\ArgvInput"
],
[
"Symfony\\Component\\Console\\Output\\ConsoleOutput"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/3rdparty/symfony/console/Application.php",
"line": 171,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->",
"args": [
[
"Symfony\\Component\\Console\\Input\\ArgvInput"
],
[
"Symfony\\Component\\Console\\Output\\ConsoleOutput"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/lib/private/Console/Application.php",
"line": 206,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->",
"args": [
[
"Symfony\\Component\\Console\\Input\\ArgvInput"
],
[
"Symfony\\Component\\Console\\Output\\ConsoleOutput"
]
]
},
{
"file": "/home/runner/work/collectives/collectives/console.php",
"line": 100,
"function": "run",
"class": "OC\\Console\\Application",
"type": "->",
"args": []
},
{
"file": "/home/runner/work/collectives/collectives/occ",
"line": 11,
"args": [
"/home/runner/work/collectives/collectives/console.php"
],
"function": "require_once"
}
],
"File": "/home/runner/work/collectives/collectives/apps/circles/lib/Tools/Traits/TNCRequest.php",
"Line": 100,
"message": "",
"exception": {},
"CustomMessage": ""
}
}
To Reproduce Steps to reproduce the behavior:
- Go to the actions on github, filter by cypress
- Click on a run that took at least 30 min and succeeded
- Look at the overview with the assets
- Inspect the logs
Expected behavior The circles app should not throw any exceptions.
`occ circles:check` is not happy either.
We're using different ports for `overwrite.cli.url` and cypress base url.
You might want to set https://github.com/nextcloud/richdocuments/blob/main/.github/workflows/cypress.yml#L109 as well to allow Nextcloud to connect to local addresses when running tests. Otherwise they would be blocked by OCP HTTP client (ref https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#allow-local-remote-servers)
Now that we are using port 8081 and start the server before performing the circles test at least the circles:check is happy.
Added more debug logging to circles branch debug/requests-stable27 and continue investigating in #880 as the logs still contain the errors