“script error” pop-up during login page rendered within office application

Sarkar, Saurav 11 Reputation points
2021-01-25T03:39:57.187+00:00

Hi All,

We have developed MS WEB DAV server to handle the office files in our server side and open the office files on our client side when triggered from MS Office URI schema.

We are using MS-OFBA for user authentication

https://learn.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-ofba/26f3c38b-0a7a-4789-8980-adffaf58a110

As part of MS-OFBA we are supposed to return a login URL and then a corresponding HTML.

This HTML is being loaded by the Office client's embedded browser for user login form.

Now during the load of this HTML we are getting "script error" with "Syntax Error" popup.

We noticed that the login page uses javascript "const" which ends up with the following script error.

line 20 char 13 syntax error.

Const is supported by all the modern browsers, so not sure why the embedded browser view within office is not able to load it properly.

This is only happening in Windows , In Mac its works fine.

I am not able to find any way to debug this problem.

Can you please provide some hints on how to fix this problem ?

Version details

Windows 10

IE Version 1909 (OS Build 18363.1256)

Microsoft Edge 87.0.664.75

Microsoft Office 365 Pro Plus Version 2002 (Build 12527.21416)

.NET Version 4.8

Best Regards,

Saurav

Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,069 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Emi Zhang-MSFT 23,906 Reputation points Microsoft Vendor
    2021-01-25T09:39:45.823+00:00

    Hi @Sarkar, Saurav ,
    What version of Windows did you use?
    What browser did you use?
    Did you use this component? https://developer.mozilla.org/en-us/docs/web/javascript/reference/statements/const
    Try to check the browser compatibility from list:
    60241-287.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. catmanjan 21 Reputation points
    2021-10-06T03:48:24.247+00:00

    The embedded browser within Office used for MS-OFBA is running in IE8 compatibility mode so you will need to modify your login page to remove the dependency on const and other ECMAScript 6 only functionality

    0 comments No comments