-
Notifications
You must be signed in to change notification settings - Fork 1
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
Nextcloud to Seafile sending federated share problems #136
Comments
Replicating that in dev-stock is successful. Nextcloud version {
"reqId": "WQSVctaCCBSqOYCUITNc",
"level": 3,
"time": "2024-08-17T07:45:20+00:00",
"remoteAddr": "172.18.0.4",
"user": "einstein",
"app": "no app in context",
"method": "POST",
"url": "/ocs/v2.php/apps/files_sharing/api/v1/shares",
"message": "OC\\OCM\\Model\\OCMResource::import(): Argument #1 ($data) must be of type array, string given, called in /var/www/html/lib/private/OCM/Model/OCMProvider.php on line 189 in file '/var/www/html/lib/private/OCM/Model/OCMResource.php' line 103",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0",
"version": "29.0.4.1",
"exception": {
"Exception": "Exception",
"Message": "OC\\OCM\\Model\\OCMResource::import(): Argument #1 ($data) must be of type array, string given, called in /var/www/html/lib/private/OCM/Model/OCMProvider.php on line 189 in file '/var/www/html/lib/private/OCM/Model/OCMResource.php' line 103",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/html/ocs/v1.php",
"line": 66,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/html/ocs/v2.php",
"line": 23,
"args": [
"/var/www/html/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 170,
"Previous": {
"Exception": "TypeError",
"Message": "OC\\OCM\\Model\\OCMResource::import(): Argument #1 ($data) must be of type array, string given, called in /var/www/html/lib/private/OCM/Model/OCMProvider.php on line 189",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/lib/private/OCM/Model/OCMProvider.php",
"line": 189,
"function": "import",
"class": "OC\\OCM\\Model\\OCMResource",
"type": "->"
},
{
"file": "/var/www/html/lib/private/OCM/OCMDiscoveryService.php",
"line": 98,
"function": "import",
"class": "OC\\OCM\\Model\\OCMProvider",
"type": "->"
},
{
"file": "/var/www/html/lib/private/Federation/CloudFederationProviderManager.php",
"line": 121,
"function": "discover",
"class": "OC\\OCM\\OCMDiscoveryService",
"type": "->"
},
{
"file": "/var/www/html/apps/federatedfilesharing/lib/Notifications.php",
"line": 395,
"function": "sendShare",
"class": "OC\\Federation\\CloudFederationProviderManager",
"type": "->"
},
{
"file": "/var/www/html/apps/federatedfilesharing/lib/Notifications.php",
"line": 320,
"function": "tryOCMEndPoint",
"class": "OCA\\FederatedFileSharing\\Notifications",
"type": "->"
},
{
"file": "/var/www/html/apps/federatedfilesharing/lib/Notifications.php",
"line": 90,
"function": "tryHttpPostToShareEndpoint",
"class": "OCA\\FederatedFileSharing\\Notifications",
"type": "->"
},
{
"file": "/var/www/html/apps/federatedfilesharing/lib/FederatedShareProvider.php",
"line": 229,
"function": "sendRemoteShare",
"class": "OCA\\FederatedFileSharing\\Notifications",
"type": "->"
},
{
"file": "/var/www/html/apps/federatedfilesharing/lib/FederatedShareProvider.php",
"line": 191,
"function": "createFederatedShare",
"class": "OCA\\FederatedFileSharing\\FederatedShareProvider",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/lib/private/Share20/Manager.php",
"line": 748,
"function": "create",
"class": "OCA\\FederatedFileSharing\\FederatedShareProvider",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/apps/files_sharing/lib/Controller/ShareAPIController.php",
"line": 805,
"function": "createShare",
"class": "OC\\Share20\\Manager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 232,
"function": "createShare",
"class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 138,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/html/ocs/v1.php",
"line": 66,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/html/ocs/v2.php",
"line": 23,
"args": [
"/var/www/html/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/lib/private/OCM/Model/OCMResource.php",
"Line": 103
},
"message": "OC\\OCM\\Model\\OCMResource::import(): Argument #1 ($data) must be of type array, string given, called in /var/www/html/lib/private/OCM/Model/OCMProvider.php on line 189 in file '/var/www/html/lib/private/OCM/Model/OCMResource.php' line 103",
"exception": {},
"CustomMessage": "OC\\OCM\\Model\\OCMResource::import(): Argument #1 ($data) must be of type array, string given, called in /var/www/html/lib/private/OCM/Model/OCMProvider.php on line 189 in file '/var/www/html/lib/private/OCM/Model/OCMResource.php' line 103"
}
} Just like the one Vincent has reported. |
The problem is on the Seafile based on the OCM-API documentation
"resourceTypes": {
"name": "file",
"protocols": {
"webdav": "/seafdav/"
},
"shareTypes": [
"user"
]
} correct format would be: "resourceTypes": [
{
"name": "file",
"protocols": {
"webdav": "/seafdav/"
},
"shareTypes": [
"user"
]
}
] full {
"apiVersion": "1.0-proposal1",
"enabled": true,
"endPoint": "https://test.seafile.com/ocm-via-webdav/",
"resourceTypes": [
{
"name": "file",
"protocols": {
"webdav": "/seafdav/"
},
"shareTypes": [
"user"
]
}
]
} |
From Vincent Lee via
cs3org/OCM
Matrix chat :Hello, I'm a Seafile developer and currently working on integrating Seafile and Nextcloud via OCM.
I encountered some issues during development. Let me first describe the problems in detail.
The Seafile server I'm using is https://test.seafile.com
Accessing https://test.seafile.com/ocm-provider/ returns the following:
The Nextcloud server is https://nextcloud.seafile.top, deployed on Ubuntu 22.04.4 LTS, using the snap-installed version 29.0.4snap2.
I can successfully log in to Nextcloud, but when I try to share a file remotely with lian@lian.com@test.seafile.com (where lian@lian.com is a user on test.seafile.com), the page displays "Error creating the share" and the admin-logs page shows the following error.
I also checked the Apache log on test.seafile.com, and only got one log:
The text was updated successfully, but these errors were encountered: