owncloud / owncloud/ocis

[QA] OCM: failing invite produces no readable error messge

Open
#10,208 3 comments 0 reactions 0 assignees View on GitHub
Priority:p3-medium Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

## Describe the bug
A clear and concise description of what the bug is.

## Steps to reproduce
Setup three machines with e.g.
```
env OCIS_DNSNAME=ocis1-DATE OCIS_VERSION=v6.4.0 ./deploy_ocis_bare_metal.sh
env OCIS_DNSNAME=ocis2-DATE OCIS_VERSION=v6.4.0 ./deploy_ocis_bare_metal.sh
env OCIS_DNSNAME=ocis3-DATE OCIS_VERSION=v6.4.0 ./deploy_ocis_bare_metal.sh
```
* mutually register the machines in their ocmproviders.json; service ocis restart
* user alice at ocis2 generates an invite token.
* user bob at ocis3 tries to accept the token, but wrongly chooses ocis1 in the 'Select institution of inviter' dropdown.
* an error appears. OK

![image](https://github.com/user-attachments/assets/f50e7ab0-4ea9-433d-b2e4-9a098d551f22)

* The error has no hint what is wrong. the user should be able to understand, what he clicked wrong, without analyzing log files. BAD
* `journalctl -u ocis | grep e1039eae-a842-4154-8008-466f05788dcc` does not ave a good hint either. BAD

```
Oct 01 15:32:28 jw-ocis-v6-4-0-oj9 ocis[49923]: {"level":"debug","service":"ocm","pkg":"rhttp","traceid":"22167da66ff7aa1d6582baa1fff08375","request-id":"e1039eae-a842-4154-8008-466f05788dcc","path":"/accept-invite","time":"2024-10-01T15:32:28Z","line":"github.com/cs3org/reva/v2@v2.24.1/internal/http/services/sciencemesh/sciencemesh.go:139","message":"sciencemesh routing"}
Oct 01 15:32:28 jw-ocis-v6-4-0-oj9 ocis[49923]: {"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"e1039eae-a842-4154-8008-466f05788dcc","traceid":"f75aa12d8850867ba4f3b0117c4525c8","remote-addr":"87.148.40.122","method":"POST","status":401,"path":"/sciencemesh/accept-invite","duration":42.635172,"bytes":74,"time":"2024-10-01T15:32:28Z","line":"github.com/owncloud/ocis/v2/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}

```

## Expected behavior
* The error message could e.g. say "The invite token was not found on ~instance~ institution ocis1"

FYI: @hodyroff @nicholas-wilson-au

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.