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

Unknown Error when uploading via a public link into a space #8658

Closed
haary opened this issue Mar 15, 2024 · 5 comments
Closed

Unknown Error when uploading via a public link into a space #8658

haary opened this issue Mar 15, 2024 · 5 comments
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug

Comments

@haary
Copy link

haary commented Mar 15, 2024

Describe the bug

When sharing a space via a public link where everyone can upload and the user uploads a file an unkown error appears. The file is uploaded anyway and can bee seen, when the page is reloaded.

Steps to reproduce

  1. Create a space
  2. Share this space via link and "Anyone with the link can upload" permissions
  3. Open the link as a guest/anonymous user (not logged in in ocis)
  4. Upload a file
  5. A window "upload failed" and "unknown error" appears
  6. Reload the page and the uploaded file appears

Expected behavior

File can be uploaded without error

Actual behavior

An "unknown error" appears when uploading a file via a public link into a space

Setup

ocis 4.0.6 ist started via this script and ist behind a reverse proxy (HAProxy)

#!/bin/bash
SCRIPT_DIR="$(dirname "$(readlink -f "${0}")")"
cd "${SCRIPT_DIR}"
export OCIS_CONFIG_DIR=/home/ocis/ocis-sandbox-4.0.6/config
export OCIS_BASE_DATA_PATH=/home/ocis/ocis-sandbox-4.0.6/data
export OCIS_INSECURE=false
export OCIS_URL=https://ocis.example.com
export PROXY_HTTP_ADDR=10.2.3.4:9200
export PROXY_TLS=false
export PROXY_ENABLE_BASIC_AUTH=true
export OCIS_LOG_LEVEL=warning
export OCIS_LOG_FILE=/home/ocis/ocis-sandbox-4.0.6/ocis.log
./ocis-4.0.6-linux-amd64 server

Additional context

Error log

{"level":"error","service":"sharing","pkg":"rgrpc","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","user-agent":"grpc-go/1.57.0","from":"tcp://127.0.0.1:52128","uri":"/cs3.sharing.collaboration.v1beta1.CollaborationAPI/ListReceivedShares","start":"15/Mar/2024:08:39:48 +0000","end":"15/Mar/2024:08:39:48 +0000","time_ns":38863,"code":"PermissionDenied","time":"2024-03-15T08:39:48Z","message":"rpc error: code = PermissionDenied desc = auth: core access token is invalid"}
{"level":"error","service":"storage-shares","pkg":"rgrpc","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","user-agent":"grpc-go/1.57.0","from":"tcp://127.0.0.1:60822","uri":"/cs3.storage.provider.v1beta1.ProviderAPI/ListStorageSpaces","start":"15/Mar/2024:08:39:48 +0000","end":"15/Mar/2024:08:39:48 +0000","time_ns":272684,"code":"PermissionDenied","time":"2024-03-15T08:39:48Z","message":"sharesstorageprovider: error calling ListReceivedSharesRequest: sharesstorageprovider: error calling ListReceivedSharesRequest: rpc error: code = PermissionDenied desc = auth: core access token is invalid"}
{"level":"error","service":"sharing","pkg":"rgrpc","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","user-agent":"grpc-go/1.57.0","from":"tcp://127.0.0.1:52128","uri":"/cs3.sharing.collaboration.v1beta1.CollaborationAPI/ListReceivedShares","start":"15/Mar/2024:08:39:48 +0000","end":"15/Mar/2024:08:39:48 +0000","time_ns":33833,"code":"PermissionDenied","time":"2024-03-15T08:39:48Z","message":"rpc error: code = PermissionDenied desc = auth: core access token is invalid"}
{"level":"error","service":"storage-shares","pkg":"rgrpc","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","user-agent":"grpc-go/1.57.0","from":"tcp://127.0.0.1:60822","uri":"/cs3.storage.provider.v1beta1.ProviderAPI/ListStorageSpaces","start":"15/Mar/2024:08:39:48 +0000","end":"15/Mar/2024:08:39:48 +0000","time_ns":240213,"code":"PermissionDenied","time":"2024-03-15T08:39:48Z","message":"sharesstorageprovider: error calling ListReceivedSharesRequest: sharesstorageprovider: error calling ListReceivedSharesRequest: rpc error: code = PermissionDenied desc = auth: core access token is invalid"}
{"level":"error","service":"proxy","error":"gateway: grpc failed with code CODE_PERMISSION_DENIED","time":"2024-03-15T08:39:48Z","message":"error when calling Createhome"}
{"level":"error","service":"gateway","pkg":"rgrpc","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","error":"error: permission denied: access forbidden via public link","time":"2024-03-15T08:39:48Z","message":"error resolving reference resource_id:<storage_id:\"0a309786-e346-448f-bef2-ec785b27f147\" opaque_id:\"1029cf08-bf1f-4e20-9b11-732dfc79d203\" space_id:\"57923647-8b00-46a4-afde-696e66a8f057\" >  under scope publicshare:IqqZnHeiwMuNvXh"}
{"level":"error","service":"gateway","pkg":"rgrpc","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","error":"error: permission denied: access forbidden via public link","time":"2024-03-15T08:39:48Z","message":"error resolving reference resource_id:<storage_id:\"0a309786-e346-448f-bef2-ec785b27f147\" opaque_id:\"1029cf08-bf1f-4e20-9b11-732dfc79d203\" space_id:\"57923647-8b00-46a4-afde-696e66a8f057\" >  under scope publicshare:IqqZnHeiwMuNvXh"}
{"level":"error","service":"gateway","pkg":"rgrpc","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","user-agent":"grpc-go/1.57.0","from":"tcp://127.0.0.1:55656","uri":"/cs3.storage.registry.v1beta1.RegistryAPI/ListStorageProviders","start":"15/Mar/2024:08:39:48 +0000","end":"15/Mar/2024:08:39:48 +0000","time_ns":9406166,"code":"PermissionDenied","time":"2024-03-15T08:39:48Z","message":"rpc error: code = PermissionDenied desc = auth: core access token is invalid"}
{"level":"error","service":"ocdav","name":"com.owncloud.web.ocdav","traceid":"39f0a84ac826620d4b303aaa8e3f9d28","request-id":"b2ec8ee6-6506-4466-a05b-6545d7aeda3f","path":"/public/KXrjbsYXnaGiDVP/patat2.png","time":"2024-03-15T08:39:48Z","message":"No info found for uploaded file"}

Bildschirmfoto_2024-03-15_09-40-15

@haary haary added the Type:Bug label Mar 15, 2024
@rhafer
Copy link
Contributor

rhafer commented Mar 18, 2024

Might be duplicate of #8629

@rhafer rhafer added the Priority:p2-high Escalation, on top of current planning, release blocker label Mar 18, 2024
@rhafer rhafer moved this from Qualification to Prio 2 in Infinite Scale Team Board Mar 18, 2024
@haary
Copy link
Author

haary commented Mar 18, 2024

Might be duplicate of #8629

The error seems to be the same, but the OP mentions that the error occurs when using public link to folders. Public links to folders do work fine here, the problem for me is public link into a space.

@2403905
Copy link
Contributor

2403905 commented Mar 20, 2024

The cause of 500 that the file is not found right after upload #L300. Besade that after reloading the file exist and id matches.

@2403905
Copy link
Contributor

2403905 commented Apr 15, 2024

@haary Did you have a chance to validate a fix?

@2403905 2403905 closed this as completed Apr 15, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Infinite Scale Team Board Apr 15, 2024
@haary
Copy link
Author

haary commented Apr 16, 2024

@haary Did you have a chance to validate a fix?

Sorry, can't test here because the requirement was raised to Go 1.22

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
Archived in project
Development

No branches or pull requests

3 participants