pondersource / sciencemesh-php

Connect your Nextcloud server to Sciencemesh
MIT License
0 stars 1 forks source link

Cannot create share through reva-cli in examples/sciencemesh #223

Closed michielbdejong closed 1 year ago

michielbdejong commented 1 year ago

Steps to reproduce:

So to einstein@revanextcloud1.docker it looks like the share was sent, but marie@revanextcloud2.docker did not see anything arrive.

michielbdejong commented 1 year ago

In the revanc1.docker logs you see this entry:

2023-06-26 08:20:01.471 DBG ../../workspace/dev-stock/reva/pkg/ocm/client/client.go:200 > Sending OCM /shares POST to https://revanc2.docker/ocm/shares: {"shareWith":"marie@revanc2.docker","name":"etoa","description":"","providerId":"\"1\"","owner":"einstein@revanc1.docker","sender":"einstein@revanc1.docker","ownerDisplayName":"","senderDisplayName":"einstein","shareType":"user","expiration":0,"resourceType":"folder","protocol":{"name":"multi","options":{},"webdav":{"sharedSecret":"76R9BwQH67wSBPBBWW4aCrXU4fIGoLxe","permissions":["read"],"url":"https://revanc1.docker/remote.php/dav/ocm/76R9BwQH67wSBPBBWW4aCrXU4fIGoLxe"}}}

Ah, but in the revanc2.docker logs you see that is probably the culprit:

2023-06-26 08:20:19.929 INF ../../workspace/dev-stock/reva/pkg/ocm/share/repository/nextcloud/nextcloud.go:452 > am.do https://nc2.docker/index.php/apps/sciencemesh/~nobody/api/ocm/GetSentShareByToken {"Spec":{"Token":""}} pid=131 pkg=rgrpc traceid=63890c0d959d48429bda8d8b32931c7c
2023-06-26 08:20:20.018 INF ../../workspace/dev-stock/reva/pkg/ocm/share/repository/nextcloud/nextcloud.go:473 > am.do response 503 <!DOCTYPE html>

We probably didn't implement GetSentShareByToken properly and also that {"Token":""} should never happen, that is a bug on the reva side.

Also, ListReceivedShares is returning an empty array:

2023-06-26 08:35:06.749 INF ../../workspace/dev-stock/reva/pkg/ocm/share/repository/nextcloud/nextcloud.go:452 > am.do https://nc2.docker/index.php/apps/sciencemesh/~marie/api/ocm/ListReceivedShares  pid=131 pkg=rgrpc traceid=8bfae297054131b44d22b18acd99290b
2023-06-26 08:35:06.94 INF ../../workspace/dev-stock/reva/pkg/ocm/share/repository/nextcloud/nextcloud.go:473 > am.do response 200 [] pid=131 pkg=rgrpc traceid=8bfae297054131b44d22b18acd99290b

Despite the fact that the share does exist in maria2.docker:

gitpod /workspace/dev-stock (main) $ ./scripts/maria2.sh 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 25
Server version: 11.0.2-MariaDB-1:11.0.2+maria~ubu2204 mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [efss]> select * from oc_share_external;
+----+--------+------------+------------------------+-----------+----------------------------------+----------+------+----------+-------+----------------------------------+----------------------------------+----------+
| id | parent | share_type | remote                 | remote_id | share_token                      | password | name | owner    | user  | mountpoint                       | mountpoint_hash                  | accepted |
+----+--------+------------+------------------------+-----------+----------------------------------+----------+------+----------+-------+----------------------------------+----------------------------------+----------+
|  1 |     -1 |          0 | https://revanc1.docker | 1         | 76R9BwQH67wSBPBBWW4aCrXU4fIGoLxe |          | etoa | einstein | marie | {{TemporaryMountPointName#etoa}} | 5dceb6f4d98c0cf731d61d4e7431ac6e |        0 |
+----+--------+------------+------------------------+-----------+----------------------------------+----------+------+----------+-------+----------------------------------+----------------------------------+----------+
1 row in set (0.000 sec)

MariaDB [efss]>
michielbdejong commented 1 year ago

Continued as https://github.com/cs3org/reva/issues/4054