owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.36k stars 180 forks source link

OnlyOffice suddenly not working anymore #6782

Closed zjean closed 1 year ago

zjean commented 1 year ago

Describe the bug

I run ownCloud Ocis 3.0.0 in docker, based on this configuration: https://github.com/owncloud/ocis/blob/master/deployments/examples/ocis_wopi

The only office integration worked yesterday, but as of today I get an error in the web ui Error contacting the requested application, please use a different one or try again later

Steps to reproduce

Steps to reproduce the behavior:

  1. Setup owncloud Ocis with OnlyOffice integration
  2. Try to open a file with OnlyOffice
  3. Get the error

Expected behavior

OnlyOffice should open the file

Actual behavior

See above

Setup

I am not sure where to look for more info.

```console OCIS_XXX=somevalue OCIS_YYY=somevalue PROXY_XXX=somevalue ```

Additional context

app provider logs:

code=PermissionDeniedend=12/Jul/2023:09:32:57 +0000from=tcp://172.22.0.32:48540level=errormessage=unarypkg=rgrpcservice=app-providerstart=12/Jul/2023:09:32:57 +0000time=2023-07-12T09:32:57.628096869Ztime_ns=72760traceid=00000000000000000000000000000000uri=/cs3.app.provider.v1beta1.ProviderAPI/OpenInAppuser-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

ocis logs:

ocis  | {"level":"error","service":"gateway","pkg":"rgrpc","traceid":"00000000000000000000000000000000","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","from":"tcp://127.0.0.1:41806","uri":"/cs3.gateway.v1beta1.GatewayAPI/OpenInApp","start":"12/Jul/2023:09:35:47 +0000","end":"12/Jul/2023:09:35:47 +0000","time_ns":2831549,"code":"Unknown","time":"2023-07-12T09:35:47.29478133Z","line":"github.com/cs3org/reva/v2@v2.14.0/internal/grpc/interceptors/log/log.go:66","message":"unary"}
ocis  | {"level":"error","service":"frontend","pkg":"rhttp","traceid":"00000000000000000000000000000000","request-id":"276dc35d-fbde-416b-bbdd-24311524ffc4","error":"rpc error: code = Unknown desc = gateway: error calling OpenInApp: rpc error: code = PermissionDenied desc = auth: core access token is invalid","time":"2023-07-12T09:35:47.294876771Z","line":"github.com/cs3org/reva/v2@v2.14.0/internal/http/services/appprovider/errors.go:63","message":"Error contacting the requested application, please use a different one or try again later"}
ocis  | {"level":"error","service":"frontend","pkg":"rhttp","traceid":"00000000000000000000000000000000","host":"127.0.0.1","method":"POST","uri":"/app/open?file_id=957f7b3f-ebd2-4aab-b7f8-de30570c6b8c%24e1346a3b-5ede-494a-af81-364a4211f3fe%216b442e28-83b7-4a9a-90d5-243b4ca2fe49&lang=en&app_name=OnlyOffice","url":"/open?file_id=957f7b3f-ebd2-4aab-b7f8-de30570c6b8c%24e1346a3b-5ede-494a-af81-364a4211f3fe%216b442e28-83b7-4a9a-90d5-243b4ca2fe49&lang=en&app_name=OnlyOffice","proto":"HTTP/1.1","status":500,"size":134,"start":"12/Jul/2023:09:35:47 +0000","end":"12/Jul/2023:09:35:47 +0000","time_ns":6778094,"time":"2023-07-12T09:35:47.294922244Z","line":"github.com/cs3org/reva/v2@v2.14.0/internal/http/interceptors/log/log.go:112","message":"http"}
zjean commented 1 year ago

Fixed it: My problem was that the ocis and app provider container weren't sharing the same docker volume so they had a different OCIS_JWT_SECRET Added that to both containers with the same value, and got the integration working again.

farapholch commented 10 months ago

@zjean We are experiencing the same issue with our container setup, can you share how you added this to the container?