Uncaught TypeError: Cannot read property 'Version' of null in outlook-web-16.01.js

China☆狼群 提交于 2019-12-06 03:29:31

问题


outlook-web-16.01.js:13 Uncaught TypeError: Cannot read property 'Version' of null
at Object.callback (outlook-web-16.01.js:formatted:4686)
at rt (outlook-web-16.01.js:formatted:4272)

This is what I get when I tried to use

Office.context.auth.getAccessTokenAsync(function (result) {

回答1:


After overriding everything inside <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1"> problem has solved.

<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
...

<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
...

  <WebApplicationInfo>
    <Id>9b096de7-56af-4b5c-bab5-360fcdf1b2e2</Id>
    <Resource>api://localhost:44349/9b096de7-56af-4b5c-bab5-360fcdf1b2e2</Resource>
    <Scopes>
      <Scope>user.read</Scope>
      <Scope>files.read</Scope>
      <Scope>profile</Scope>
    </Scopes>
  </WebApplicationInfo>
</VersionOverrides>
</VersionOverrides>



回答2:


As far as we can see this is a Microsoft bug and is fixed by switching to "Try the new Outlook".

It appears that the current (legacy) UI is trying to access a method that is available only in the "new" API. The only solution would be to modify Microsoft's Javascript API to add the Version property (and link to your own imported version of this rather than the CDN), or wait until Microsoft completes the switch-over.



来源:https://stackoverflow.com/questions/48641465/uncaught-typeerror-cannot-read-property-version-of-null-in-outlook-web-16-01

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!