Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Office helpers gives undefined exception on Word 2016 #124

Open
alirezastack opened this issue Jan 29, 2019 · 3 comments
Open

Office helpers gives undefined exception on Word 2016 #124

alirezastack opened this issue Jan 29, 2019 · 3 comments

Comments

@alirezastack
Copy link

When login button is clicked on add-in page I run the sample code given on README it works on office online as expected but the below problem happens when I run add-in on Word 2016 build 16.0.4300.1000:

TypeError: Unable to get property 'displayDialogAsync' of undefined or null reference

Why is this happening and how should I fix this? @Zlatkovsky @casieber

@alirezastack
Copy link
Author

Isn't there anyone who could solve this issue? Or give some help?

@Zlatkovsky
Copy link
Member

@alirezastack , see my response on OfficeDev/office-js#374.
If it solves the issue for you, please go ahead and close the bug.

@alirezastack
Copy link
Author

alirezastack commented Feb 5, 2019

@Zlatkovsky thank you for the link. I check requirements and display the login with Google button when requirements are meet. But it has shaky behaviours. In Mac Word 2016 it shows the login button but Login with Google gives the below error:

Parameter not allowed for this message type: action

It seems that OfficeJsHelpers sends an invalid parameter in opened modal for Google authentication.

The code is as below:

if (Office.context.requirements.isSetSupported('DialogApi' , 1.1)) {
    $('#login_3rd_party_wrapper').show();
} else {
    $('#login_3rd_party_wrapper').hide();
}

I can see the login button on Office Online and it is hidden on Word 2016, but this does not work on Word 2013 and in Mac Word 2016 it sends an invalid parameter.

@alirezastack alirezastack reopened this Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants