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

Adapt to new CS3API Reference #37

Merged
merged 1 commit into from
Jun 24, 2021
Merged

Adapt to new CS3API Reference #37

merged 1 commit into from
Jun 24, 2021

Conversation

wkloucek
Copy link
Contributor

@wkloucek wkloucek commented Jun 24, 2021

With latest master of the WOPI server I get following error. My fix only works with latest REVA. Changes were introduced in cs3org/cs3apis#130

wopiserver_1       | {"time": "2021-06-23T08:46:25", "host": "8463d56ab59d", "process": "WOPIServer", "level": "ERROR", msg="Unexpected exception caught" exception="Protocol message Reference has no "id" field." type="<class 'ValueError'>" traceback="['Traceback (most recent call last):\n', '  File "/usr/local/lib/python3.8/site-packages/prometheus_flask_exporter/__init__.py", line 639, in func\n    response = f(*args, **kwargs)\n', '  File "/app/wopiserver.py", line 309, in iopOpen\n    inode, acctok = utils.generateAccessToken(userid, fileid, viewmode, username, folderurl, endpoint)\n', '  File "/app/wopiutils.py", line 118, in generateAccessToken\n    statInfo = st.statx(endpoint, fileid, userid, versioninv=1)\n', '  File "/app/cs3iface.py", line 99, in statx\n    return stat(endpoint, fileid, userid, versioninv)\n', '  File "/app/cs3iface.py", line 72, in stat\n    ref = cs3spr.Reference(id=cs3spr.ResourceId(storage_id=endpoint, opaque_id=fileid))\n', 'ValueError: Protocol message Reference has no "id" field.\n']" client="172.17.4.4" requestedUrl="http://wopiserver.owncloud.test/wopi/iop/open?endpoint=1284d238-aa92-42ce-bdc4-0b0000009157&filename=1486fd00-9139-4aea-afc8-e9baa2711eeb&folderurl=%2Fusers%2F4c510ada-c86b-4815-8820-42cdf82c3d51&username=Albert+Einstein&viewmode=VIEW_MODE_READ_WRITE" token="N/A"}

@wkloucek wkloucek changed the title adapt to https://github.com/cs3org/cs3apis/pull/130 adapt to new Reference Jun 24, 2021
@wkloucek
Copy link
Contributor Author

@glpatcern please have a look

@glpatcern glpatcern changed the title adapt to new Reference Adapt to new CS3API Reference Jun 24, 2021
@glpatcern
Copy link
Member

Yes, we were discussing this yesterday, thanks for having had a look. Looks good to me, I'll merge it right away.

@glpatcern glpatcern merged commit 32bfb44 into cs3org:master Jun 24, 2021
@glpatcern
Copy link
Member

(For the record, requirements.txt now requires cs3apis > 0.1.dev66)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants