Addin Word office online: getFileAsync not working in prod environment

Iuliia TUSHKOVA 1 Reputation point
2022-05-23T07:20:55.18+00:00

Hello,

I develop a Word add-in displaying the content of .docx files and saving it with user’s modifications.

For getting the file content I use the following approch : https://learn.microsoft.com/fr-fr/javascript/api/office/office.document?view=common-js-preview#office-office-document-getfileasync-member(1)

After the application is deployed to the Apache 2.4 server, I have an issue with the Office.context.document.getFileAsync() function (just Office Online).

The execution of getFileAsync() encounters a problem and never calls the callback. Using the debugger, I get the following error:

----------------------------------------------------------------------------------------------------------------------------

DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL

Fichier : WordEditorDC.worker.js

----------------------------------------------------------------------------------------------------------------------------

Here’s the message from Network :

------------------------------------------------------------------------------------

Office Online services aren't available right now

We're working to restore all services as soon as possible. Please check back soon. If the error persists please contact Microsoft Support for assistance along with the Url you were trying to access

Error Code for Support

Ref A: 7416B85B6C5745AA867577C1F0689A36 Ref B: LON21EDGE2412 Ref C: 2022-05-20T12:58:39Z

----------------------------------------------------------------------------

The issue doesn’t occur on the desktop application and it’s ok during local developpement (Server Node 16.13.1).

Could you help me ?

Thanks !

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,532 questions
0 comments No comments
{count} votes