OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
426 stars 194 forks source link

Undefined 'window.webkit' when opening tab in Teams Mobile iOS #2198

Open MajaEffenberg opened 6 months ago

MajaEffenberg commented 6 months ago

When opening application in Teams Tabs in iframe, we are getting error that window.webkit.messageHandlers is undefined. Error comes from 'teams-js' library and happens during app.initialize(). And after our research we know that fill window.webkit is undefined.

Error appears only in Teams Mobile iOS app on:

Our Teams-js version - 2.20.0

Dinesh-MSFT commented 6 months ago

Hi @MajaEffenberg, could you please refer this thread which seems to be having a similar issue - https://stackoverflow.com/questions/72232008/window-webkit-messagehandlers-is-null-on-ios-15/76977841. Meanwhile we will also check from our end.

MajaEffenberg commented 6 months ago

Thank you for fast response, but linked issue doesn't look like our problem because we don't set any WKWebView in our project. We are also not doing by our self any operations on window.webkit.messageHandlers, and error happens in your library.

ChetanSharma-msft commented 6 months ago

Hello @MajaEffenberg - Are you facing this issue only with TeamsJS 2.20.0 or with other versions as well? Also, please confirm if you are using Classic or New Teams client.

sschoeb commented 6 months ago

@ChetanSharma-msft I'm a coworker of @MajaEffenberg.

No, we saw that also before, but updated to the latest version to make sure we do not have an "already fixed" issue.

I think there is no "classic" or "new" client for the mobile version right? We do only see this within teams on mobile ios devices. (that is at least what the user agent is telling us).

Additional information:

isNativerInterface is NOT undefined window.webkit IS undefined <- This is why we see the crash.

Wee see that error currently quite a few times every day. But we are not able to reproduce it somehow yet. Let me know if you need any further information on that.

ChetanSharma-msft commented 6 months ago

Hello @sschoeb - Sorry for delay in response. We will look into it and let you know the updates.

sschoeb commented 5 months ago

@ChetanSharma-msft We do see this error on daily basis. Is there any update on this? Do you need any additional information we could provide?

sschoeb commented 5 months ago

@TrevorJoelHarris I allow myself to tag you. We are not sure if our bug report here is in the correct repository? As this bug occurs only within the teams app on ios but there within this library. Let me know if we should report that somewhere else, thank you :)

Dinesh-MSFT commented 5 months ago

Hi @sschoeb - Sorry for delay in response. We checked this at our end in IOS tabs apps are working fine. We are checking with engineering team and let you know the update.

sschoeb commented 5 months ago

@Dinesh-MSFT Thank you for your response.

Tabs do also work fine for us.. most of the time. But we have a lot of reports where it does not from our customers. So that definitely needs some more investigation. Is there anything we could help you with? Any additional information you need?

sschoeb commented 5 months ago

@Dinesh-MSFT @ChetanSharma-msft We have seen this issue a lot - do you have any additional information on how important that issue is at your side? Is it like a "we look into it once in the next half year" or does anybody care about the problem?

Dinesh-MSFT commented 5 months ago

Hi @sschoeb - We are actively checking with engineering team and let you know the update.

Dinesh-MSFT commented 4 weeks ago

Hi @sschoeb,

Sorry for the delay in the response. Could you please share following details:

  1. App name and version.
  2. How can we install this app in our dev setup?
  3. Could you please confirm whether your using tab caching(Enable App Caching for Tab App - Teams | Microsoft Learn)?