Cannot GET /hosting/wopi/word/edit

Hi,
I am trying to connect onlyoffice with my existing WOPI Host Application. I run onlyoffice in my dockercompose setup with the following configuration:

  onlyoffice-app:
    image: onlyoffice/documentserver
    container_name: onlyoffice-app
    expose:
      - 80
    ports:
      - "80:80"
    environment:
      WOPI_ENABLED: "true"

My application can successfully resolve the hosting/discovery URL. So I think wopi is enabled correctly.

But when I try to open the editor I get the error message:

Cannot GET /hosting/wopi/cell/edit

My Request URL looks like this (where imixs-documents is my wopi host):

http://localhost/hosting/wopi/cell/edit?&<rs=DC_LLCC&><dchat=DISABLE_CHAT&><e=EMBEDDED&><fs=FULLSCREEN&><hid=HOST_SESSION_ID&><rec=RECORDING&><sc=SESSION_CONTEXT&><thm=THEME_ID&><ui=UI_LLCC&><wopisrc=WOPI_SOURCE&>&WOPISrc=http://imixs-documents:8080/api/wopi/35ae501d-ac67-4a1a-99ac-930587800671/files/Motion%20Invoice%20template.xlsx?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NTY3NzkzMzYsInN1YiI6IndvcGktaG9zdCIsInVzZXJpZCI6InJzb2lrYSIsInVzZXJuYW1lIjoiUmFscGggU29pa2EifQ.5Qln7_-lo6fxEVIpOg76V7Ek-3L2NxlMhTQbnda79vM

I cant find out what the error message is trying to tell me. Can anybody give me a hint what I am doing wrong?

===
Ralph

Hello @rsoika
Does wopi integrated example work? Please go to Document server domain name (https://name/example) > click on [Go to WOPI page] > check if there are any issues.
After that please reproduce your situation and provide us with error screenshots and whole Document server logs folder (/app/onlyoffice/DocumentServer/logs/documentserver/)

Yes, the example/wopi-action is working. So this indicates that something with my host-page is wrong - right?

Probably, but we need to take a closer look at Document server logs and error screenshots first.

Thanks again for your support. I think things get working now.
I have written a Debug-Page which helps to test the wopi integration. And I can see now that OnlyOffice is now loading

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width" />

    <title>ONLYOFFICE Document Editors</title>
    <link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />

    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            -ms-content-zooming: none;
        }
        
        #office_frame { 
            width: 100%;
            height: 500px;
            position: absolute;
            top: 70;
            left: 0;
            right: 0;
            bottom: 0;
            margin: 0;
            border: none;
            display: block;
        }
    </style>
</head>

<body>
	<h3>OnlyOffice Debug Page</h3>

    <form id="office_form" name="office_form" target="office_frame" action="<%= actionUrl %>" method="post">
        <input name="wopi_uri" id="wopi_uri_input" value="<%= wopi uri %>" type="text" />
        <input name="access_token" value="<%= token %>" type="text" />
        <input name="access_token_ttl" value="<%= tokenTtl %>" type="text" />
        <button onclick="loadWopi();">load</button>
    </form>

    <span id="frameholder"></span>

    <script type="text/javascript">
    
    
    
        var frameholder = document.getElementById('frameholder');
        var office_frame = document.createElement('iframe');
        office_frame.name = 'office_frame';
        office_frame.id = 'office_frame';

        office_frame.title = 'Office Frame';
        office_frame.setAttribute('allowfullscreen', 'true');

        office_frame.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation allow-popups-to-escape-sandbox allow-downloads allow-modals');
        office_frame.setAttribute('allow', 'autoplay camera microphone display-capture');
        frameholder.appendChild(office_frame);

         function loadWopi() {
        	 var uri=document.getElementById("wopi_uri_input").value;
             console.log('set action uri='+uri);
             document.getElementById("office_form").action = uri;
             console.log('submit page...');
             document.getElementById('office_form').submit();
     	 }
         
    </script>

</body>

</html>

Hello @rsoika
Do I understand right that the issue is solved?

Yes, the wopi integration is mostly working. Thanks.
I have only an issue with the save event. I expect that, each time the user saves the document, or the autosave was triggered, I should receife the WOPI Post request to update my stored document. But this does not happen. When the Editor is destroed (closed) I got the post event.

Should I open a separate question regarding this save issue?

I have opened a new Issue describing my WOPI POST Issue.

The problem described here is definitely solved.

1 Like