OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
686 stars 95 forks source link

Word - Function context.document.body.insertFileFromBase64 stopped working #3040

Open emmanuelpineda opened 1 year ago

emmanuelpineda commented 1 year ago

Without making any changes to the Add In code, the function context.document.body.insertFileFromBase64 stopped working about 2 weeks ago. I assume this is due to some Office API update.

Your Environment

Expected behavior

Calling the context.document.body.insertFileFromBase64(base64File, Word.InsertLocation.replace) function is expected to insert the content into the current document

Current behavior

The context.document.body.insertFileFromBase64(base64File, Word.InsertLocation.replace) function throws an error and does not insert the content

Steps to reproduce

Just call the function context.document.body.insertFileFromBase64(base64String, Word.InsertLocation.replace) from office on the web. Fails with any base 64 file string

Context

This function is useful for our learning project so that the user does not start from scratch to create a document

Useful logs

image

wamaina commented 1 year ago

Hello, if you go to File -> About on the document you should see some version information. Could you please provide this information as well?

emmanuelpineda commented 1 year ago

Thank you, here is the information requested:

image

RuizhiSunMS commented 1 year ago

@wamaina, thanks for the reporting and sorry for the late response since our team is encountering health issues. Will handle this issue as soon as our engs are back.

xiaoyuMS commented 1 year ago

Hi, @emmanuelpineda The error you provided does not show the error message from the JS API. Would you provide me with the relevant code to see why the "message" variable is null?

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS, I set this property (OfficeExtension.config.extendedErrorLogging = true) to try to get the error message, but still, the exception that occurs behind the Office API does not return it.

This is the detail of the error:

Image: image

Error json file: https://drive.google.com/file/d/1E5kjcPzJnJIdwexPH_BT0G_SImI7jokz/view?usp=share_link

Base 64 string: https://drive.google.com/file/d/15-9i3_6WHNQosvp08T8XIEXsjyNN1Pol/view?usp=sharing

I am attaching the base 64 string (link) to reproduce the error: just try to insert the content.

This error is very strange as it didn't happen before for the same content.

Thank you.

xiaoyuMS commented 1 year ago

@emmanuelpineda , I can repro it with your base64 string and will investigate on it.

emmanuelpineda commented 1 year ago

Thank you @xiaoyuMS.

hengchengfei commented 1 year ago

@emmanuelpineda I tried linked base64 file,it‘s OK

OfficeExtension.config.extendedErrorLogging = true;

  const base =
    "UEsDBBQABgAIAFVVc1JSWj6GTAEAABoFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC1lE1OwzAQha9ieVslblkghJp2AWyhEr2A60xSC8e27Onf2VhwJK7AJGkjhEqDaLuJlMy8972xMv58/xhPt5VhawhRO5vxUTrkDKxyubZlxldYJHd8OhnPdx4io1YbM75E9PdCRLWESsbUebBUKVyoJNJrKIWX6k2WIG6Gw1uhnEWwmGDtwSfjRyjkyiB72tLnFhvARM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AAAAAAAIAvAABkb2NQcm9wcy9hcHAueG1sUEsBAi0AFAAAAAgAfY1zUsVqx45+AAAAqAAAABIAAAAAAAAAAAAAAAAA8TEAAGN1c3RvbVhNTC9pdGVtLnhtbFBLBQYAAAAADAAMAAEDAAC7MgAAAAA=";
  Word.run(async (context) => {
    const range = context.document.getSelection();
    range.insertFileFromBase64(base, "replace");
    await context.sync();
  }).catch((e) => {
    console.log(e); 
  });

1

emmanuelpineda commented 1 year ago

Hello @hengchengfei, I just tried, but the error persists. Attached the error screen and the version of Office Web. The content (base 64 string) is the same.

image

emmanuelpineda commented 1 year ago

How can we debug/fix this error? @xiaoyuMS was able to reproduce it last week:

image

hengchengfei commented 1 year ago

Hello @hengchengfei, I just tried, but the error persists. Attached the error screen and the version of Office Web. The content (base 64 string) is the same.

image

I tried in Windows Desktop rather than Office Online web.

1

emmanuelpineda commented 1 year ago

Yes, in Desktop Office it works fine, but in Online Office (web) it doesn't

emmanuelpineda commented 1 year ago

Hi @hengchengfei,

What is the estimated time to solve this issue? I think we need to inform our clients because they are waiting for this.

Thank you.

hengchengfei commented 1 year ago

@emmanuelpineda

I am also an Office developer,only develop in Desktop Office.

xiaoyuMS commented 1 year ago

Hi @emmanuelpineda, sorry for the late response due to the holidays.

We create a bug to track this regression. It is a complex issue which used to happen on those file hosts with WOPI protocol. Unfortunately, we do not have any timelines to share at this point. We will update here if there is any progress.

By the way, which file host are you using, SPO or onedrive or something else? The API currently works fine on onedrive.

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS and @hengchengfei, thank you for your help.

The user creates and opens a document on its OneDrive, opens our add in to execute an action that replaces/inserts the content of the document.

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS, Do you have any update?

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS,

We were doing tests and we detected that there is a new version of Office Online.

In this version the insertion of content does not work: image

In this version the insertion of content works correctly: image

It seems that the versions are loaded randomly based on the user's location. How can we force the latest version of Office to load?

Thank you.

xiaoyuMS commented 1 year ago

@emmanuelpineda Sorry for the late response, just come back from holidays.

Currently we have put this bug in our backlog, but we need to handle them according to priority.

I am not familiar with the build version of Word Online. Are you still facing the version that can't not work?

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS,

It still doesn't work, this is the version I tried:

image

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS,

It still doesn't work, this is the version I tried:

image

Is there a way to load the latest version? I have noticed that this version works well: 16.0.16127.41003

Thank you.

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS,

It still doesn't work, this is the version I tried:

image

Is there a way to load the latest version? I have noticed that this version works well: 16.0.16127.41003

Thank you.

xiaoyuMS commented 1 year ago

@emmanuelpineda As far as I know, there is no way to specify a version of Word Web, which is supposed to be the latest for users. Users may be located in different deployment rings with different versions.

According to a preliminary investigation, this is not a regression related to build versions but should be deeper bug in the API execution chain.

I notice my current version works well.

image
emmanuelpineda commented 1 year ago

Thank you @xiaoyuMS,

I have checked the content loading, most of the cases have been fixed, except for one that throws me the following error:

image

Office Web Version: image

Here you can download the base64 string as a text file: https://drive.google.com/file/d/1XFB5q_-BH06sXq0vkJ-q-eBE-J8WJ1k4/view?usp=sharing

Thank you for your help.

xiaoyuMS commented 1 year ago

@emmanuelpineda Weird, I got the same error message on inserting this base64 string. Can't repro the message "err is null".

image
emmanuelpineda commented 1 year ago

Hi @xiaoyuMS,

Just to let you know, in previous versions of Word Online, content loading was already working in most cases of my product, today I did a test and it stopped working as it did at the beginning.

image

image

veysby commented 1 year ago

Any updates on this? - We've noticed this today with stack trace similar to the comments above.

Environment: Office for the web Build# 16.0.16413.41001

xiaoyuMS commented 1 year ago

Thanks for reaching us, @veysby It is a bug related to insertFileFromBase64 but not a regression. I have created a bug VSO#7367799 in the backlog for internal tracking. We'll put it on the schedule based on priority. Unfortunately, we don't have anything to update right now.

arghyadharmsft commented 1 year ago

@xiaoyuMSL Hello Yu, Please update me on the status of fix when you have resolved the issue.

emmanuelpineda commented 1 year ago

Hello @xiaoyuMS,

Do you have any update please?

dvelascozarate commented 1 year ago

Hi @xiaoyuMS. I have the same problem when inserting content, do you have any update on the correction of this error? I have to provide dates to the company I work for, so at least an estimate would be helpful.

xiaoyuMS commented 1 year ago

Hi @dvelascozarate @emmanuelpineda @arghyadharmsft, we have checked in a fix for this unexpected exception, but it needs a few weeks to deploy.

In addition, the execution time of insertFileFromBase64() may vary depending on the environment, so we add a timeout mechanism that returns a failure exception if it times out.

xiaoyuMS commented 1 year ago

Hi @dvelascozarate @emmanuelpineda @arghyadharmsft, the fix has been deployed to production yesterday, please have a try.

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS ,

I have this version: image

Unfortunately it still doesn't work, after waiting for 1 minute or so it didn't insert the content and on the console I got this error:

image

The content I tried to insert is a document with only 1 page (text only).

I'm still waiting for this bug to be fixed

xiaoyuMS commented 1 year ago

Hi @emmanuelpineda , There is a known limitation for those server-side APIs like insertFileFromBase64() on Word Online. Even if the insertion has happened on the file, it relies on the file host to synchronize the inserted content back. Sometimes it is slow, so we add the timeout mechanism to mitigate this issue.

It's a behavior that's been around for a long time, unfortunately, it seems like a regression on your part. We have noticed the flaw of this API and have put it on our list. However, due to limited resources, we don't have any concrete timeline to share yet.

gasapu commented 1 year ago

Hi @xiaoyuMS I am also facing same issue as @emmanuelpineda facing, while using insertFileFromBase64() on Word Online.

error message - "Can't find the inserted content. Please refresh the page for the result." do we have any update on it. Thank you!.

lamotik commented 1 year ago

Hi @xiaoyuMS, We experiencing same issue with Word Online and insertFileFromBase64. Are there any possible workarounds on how to load document? This but is critical for us. When can we expect it to be fixed?

xiaoyu03 commented 1 year ago

@gasapu, @lamotik Thank you for your patience and interest in this API. Unfortunately, we do not have a definite timeline for enhancing this API. In the meantime, you may want to try using the insertHtml() or other insertion APIs as alternatives.

emmanuelpineda commented 1 year ago

Hi @xiaoyuMS,

Since the insertFileFromBase64 method failed, I searched for alternatives, currently using insertHtml, as a temporary solution. I also tried using Office.context.document.setSelectedDataAsync but it still fails like insertFileFromBase64. Hopefully the API will be fixed soon because insertHtml is a very limited alternative for our product.

lamotik commented 1 year ago

@emmanuelpineda Thank you for reply, the thing is that we need not just body, but also header and footers insert, while insertHtml provides only body replacement. But as there are no other options, I guess it must be used.

@xiaoyu03 Do you have some sort of priority list where we can see when this bug will be fixed?

emmanuelpineda commented 1 year ago

Hello @xiaoyu03,

Do you have any updates on the status of this issue, I would greatly appreciate your feedback, we are still waiting.

Thank you.

emmanuelpineda commented 1 year ago

Hello @xiaoyu03,

We have 2 add-ins (XperienceED and Jasperactive) published in the Microsoft store and we have customers waiting for a solution to this issue, is it possible to set a high priority so that it is resolved as soon as possible?

xiaoyuMS commented 1 year ago

Hi @emmanuelpineda, the good news is we are working on a fix for this reloading issue, I will get back to you once it is ready ~

xiaoyuMS commented 1 year ago

Hi @emmanuelpineda @lamotik @gasapu @dvelascozarate , the fix has been deployed to production, please have a try. The full deployment may take another 1-2 days.

SirDavenport commented 1 year ago

Hi @xiaoyuMS , Will this fix be deployed for test wopi as well?

xiaoyuMS commented 1 year ago

@SirDavenport I am not sure about it, have you tried it?

lamotik commented 1 year ago

@SirDavenport I am not sure about it, have you tried it?

Unfortunately not working. Can wait few days more.

SirDavenport commented 1 year ago

Yeah seems like its working in sharepoint OfficeOnline, but not my test wopi instance.

emmanuelpineda commented 11 months ago

It seems to be working now, thank you very much!

xiaoyu03 commented 8 months ago

Hi @SirDavenport @lamotik We have deployed a fix for the WOPI issue, please have a try~