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

OCM. server crash after deleting share for ocm user #10213

Closed
Tracked by #9735
ScharfViktor opened this issue Oct 2, 2024 · 2 comments
Closed
Tracked by #9735

OCM. server crash after deleting share for ocm user #10213

ScharfViktor opened this issue Oct 2, 2024 · 2 comments
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug

Comments

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Oct 2, 2024

Web UI 10.3.0
Ocis: 6.5.0

Steps:
And "Alice" has generated invitation
And using server "REMOTE"
And "Brian" has accepted invitation
And using server "LOCAL"
When "Alice" shares folder to "Brian"
When "Alice" deletes access of folder to "Brian"

Expected:
Actual: server of the Brian is crashed
log:

2024-10-02T09:35:33+02:00 WRN http end="02/Oct/2024:09:35:33 +0200" host=127.0.0.1 line=/Users/scharfviktor/Work/ocis/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/log/log.go:112 method=GET pkg=rhttp proto=HTTP/1.1 service=storage-system size=0 start="02/Oct/2024:09:35:33 +0200" status=404 time_ns=179791 traceid=9ce5ac0a09ff79ad2a22fafdcb0b37f9 uri=/data/spaces/jsoncs3-share-manager-metadata%21jsoncs3-share-manager-metadata/users/4c510ada-c86b-4815-8820-42cdf82c3d51/received.json url=/users/4c510ada-c86b-4815-8820-42cdf82c3d51/received.json
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x30 pc=0x103a39ea8]

goroutine 5024 [running]:
github.com/owncloud/ocis/v2/services/graph/pkg/service/v0.federatedRoleConditionForResourceType(...)
        /Users/scharfviktor/Work/ocis/services/graph/pkg/service/v0/utils.go:504
github.com/owncloud/ocis/v2/services/graph/pkg/service/v0.cs3ReceivedOCMShareToLibreGraphPermissions({0x1067dbaf8, 0x14004d3f770}, 0x14002314190, {0x14001a58a00?, 0x14001a58b00?, {0x1067b6cb8?, 0x14001682550?}}, 0x14004efc6c0, 0x0, {0x14004e35d40, ...})
        /Users/scharfviktor/Work/ocis/services/graph/pkg/service/v0/utils.go:806 +0x418
github.com/owncloud/ocis/v2/services/graph/pkg/service/v0.fillDriveItemPropertiesFromReceivedOCMShare({0x1067dbaf8, 0x14004d3f770}, 0x14002314190, {0x14001a58a00?, 0x14001a58b00?, {0x1067b6cb8?, 0x14001682550?}}, {0x14002fa7260, 0x1, 0x1026730fc?}, ...)
        /Users/scharfviktor/Work/ocis/services/graph/pkg/service/v0/utils.go:721 +0x2a0
github.com/owncloud/ocis/v2/services/graph/pkg/service/v0.cs3ReceivedOCMSharesToDriveItems.func1()
        /Users/scharfviktor/Work/ocis/services/graph/pkg/service/v0/utils.go:570 +0x270
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/scharfviktor/Work/ocis/vendor/golang.org/x/sync/errgroup/errgroup.go:78 +0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 2113
        /Users/scharfviktor/Work/ocis/vendor/golang.org/x/sync/errgroup/errgroup.go:75 +0x98

Uploading Screen Recording 2024-10-02 at 09.35.19.mov…

@ScharfViktor
Copy link
Contributor Author

ScharfViktor commented Oct 2, 2024

test agains this fix #10219
no panic - ✅️

but request GET https://federation-ocis-server:10200/graph/v1beta1/me/drive/sharedWithMe gets 400 and user cannot longer see all shared with him files

{
    "error": {
        "code": "invalidRequest",
        "innererror": {
            "date": "2024-10-02T10:13:41Z",
            "request-id": "fc71fb01-e2d6-4c22-8859-6c61df484021"
        },
        "message": "unsupported resource type for federated role"
    }
}

log:

2024-10-02T12:13:36+02:00 WRN http end="02/Oct/2024:12:13:36 +0200" host=127.0.0.1 line=/Users/scharfviktor/Work/ocis/vendor/github.com/cs3org/reva/v2/internal/http/interceptors/log/log.go:112 method=GET pkg=rhttp proto=HTTP/1.1 service=storage-system size=0 start="02/Oct/2024:12:13:36 +0200" status=404 time_ns=304583 traceid=bc80d4a13e146c8dcf4d2c7b39d00bc8 uri=/data/spaces/jsoncs3-share-manager-metadata%21jsoncs3-share-manager-metadata/users/some-admin-user-id-0000-000000000000/received.json url=/users/some-admin-user-id-0000-000000000000/received.json
2024-10-02T12:13:41+02:00 ERR could not convert received shares to drive items error="invalidRequest: unsupported resource type for federated role" line=/Users/scharfviktor/Work/ocis/services/graph/pkg/service/v0/sharedwithme.go:58 service=graph
2024-10-02T12:13:41+02:00 ERR listSharedWithMe failed error="invalidRequest: unsupported resource type for federated role" line=/Users/scharfviktor/Work/ocis/services/graph/pkg/service/v0/sharedwithme.go:21 service=graph

@ScharfViktor
Copy link
Contributor Author

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Projects
Status: Done
Development

No branches or pull requests

2 participants