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
670 stars 96 forks source link

Syntax error when loading updated office.js in Outlook 2016 with IE11 #4181

Closed qystaubai closed 6 months ago

qystaubai commented 6 months ago

Starting today an error occurs when office.js loads in older Outlook client like 2016 that uses IE11.

Office.js is loaded using CDN https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js

SCRIPT1002: Syntax error office.js (80; 15) the line is var oteljs;(()=>{"use strict";

SCRIPT5009: Office not defined the line is Office.onReady(...)

image

Provide required information needed to triage your issue

Your Environment

Expected behavior

Office js should not give syntax errors and run on IE11

Current behavior

I believe it has to do with with arrow functions () => that are not transpiled and cannot run on IE11

Steps to reproduce

  1. Run any web add-in in Outlook 2016 that uses IE11
ChenNima commented 6 months ago

The issue also occurs for Word, Office 2016 on WIndows.

ndreisg commented 6 months ago

This issue also occurs in Excel 2016 and was reported by multiple customers. I reproduced it with Excel 2016 VLSC. I assume the customers also have VLSC.

theusner-thing commented 6 months ago

Seeing that as well since today in Outlook 2016 with IE11

JackDallSoelbeck commented 6 months ago

Seeing issues loading Dynamics CRM app for Outlook today that could be related to this issue. It gives this error that normally means it can't load office.js: "Error: window.Office not available"

https://learn.microsoft.com/en-us/troubleshoot/dynamics-365/sales/dynamics-365-app-outlook-did-not-load

els-ts commented 6 months ago

We also got reports from our users with the Word 2019 volume license (using IE as add-in engine).

Update: We've did quick investigation on our side and have exactly same error in Word, from office.js (80, 15) image

@exextoc - can you update flag that this affects all Office applications that are using IE11 as their engine?

atsopuronen commented 6 months ago

Our Outlook 2016 customers are also affected by this. They are reporting about Task Pane getting stuck at loading, and the underlying error is "Office" in undefined" and/or "OfficeRuntime" is undefined.

xTNTx666 commented 6 months ago

Our Outlook 2016 customers are also affected by this. They are reporting about Task Pane getting stuck at loading, and the underlying error is "Office" in undefined" and/or "OfficeRuntime" is undefined.

The same with our customers who use Trinity in Outlook

onestep commented 6 months ago

@exextoc is there any workaround for now? Would installation of WebView2 and registry change described in Understanding the Office Add-ins runtime article help for users of non-Office365 versions of Outlook?

darren-pex commented 6 months ago

The same with our customers who use Trident in Outlook on both 2016 and 2019 (VL), is there an ETA on a fix or rollback?

https://learn.microsoft.com/en-us/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins#perpetual-versions-of-office-on-windows

billzeman commented 6 months ago

we are seeing this also. Looking at the office.js file it looks like it's using arrow notation and throwing syntax errors in IE11

carlcarlsoniv commented 6 months ago

Same issue. Word 2016/2019 versions that load IE11 can no longer load some add-ins.

awelters commented 6 months ago

Our Excel add in is no longer working in Windows Desktop Excel 2019 using IE 11. This breaks the promise that we can have add ins work with that platform/browser. Super disappointing as that is still used in Corporate America.

BrentonWildes commented 6 months ago

Also had this problem today. Solved it by switching from the CDN to a locally hosted copy of the files. I grabbed them via npm per the instructions on the main page here. The office.js file is in the /dist/ folder, you just need to load the entire folder to your project and switch your script CDN declaration to use it instead. Something like: <script src="/js/office-js/dist/office.js">

Hope this helps someone out there!

ndreisg commented 6 months ago

@exextoc is there any workaround for now? Would installation of WebView2 and registry change described in Understanding the Office Add-ins runtime article help for users of non-Office365 versions of Outlook?

Installing WebView2 would probably work for Office 2019 and Office 2016 retail but not for Office 2016 VLSC.

zacfarnsworth commented 6 months ago

Hi all, so sorry about the issues you are facing! We have initiated a rollback of this update to office-js and are taking care to ensure IE11 compatibility with any future updates. The rollback should be completed soon - in the meantime, @BrentonWildes and @ndreisg are correct about these potential short-term workarounds.

JackDallSoelbeck commented 6 months ago

Any update on when this might be solved ?

zacfarnsworth commented 6 months ago

We completed the rollback to a stable version late last night. Please let me know if issues persist.

JackDallSoelbeck commented 6 months ago

Ok great, the customer has testet addin in Outlook for CRM and it is working now. Thanks

PeterLanguage commented 6 months ago

Thank you, here in the EU everything is working now, since this morning.