Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Office library not loading for iOS 17.4 #4402

Closed
1 of 3 tasks
tallain-rivaengine opened this issue Apr 25, 2024 · 5 comments
Closed
1 of 3 tasks

Office library not loading for iOS 17.4 #4402

tallain-rivaengine opened this issue Apr 25, 2024 · 5 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)

Comments

@tallain-rivaengine
Copy link

tallain-rivaengine commented Apr 25, 2024

Provide required information needed to triage your issue

Office.onReady and Office.initialize are unavailable for iOS 17.4 and above

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: iOS
  • Host [Excel, Word, PowerPoint, etc.]: Outlook
  • Office version number: Outlook 4.2412.0
  • Operating System: iOS 17.4
  • Browser (if using Office on the web): Safari

Expected behavior

Calling Office.onReady or Office.initialize should load the OfficeJS library.

Current behavior

When calling Office.onReady or Office.initialize in iOS environments that are using version 17.4 or above, the library is never loaded and no error messages are shown. Our application also hangs and we never finish the call to .onReady or .initialize.

Steps to reproduce

  1. With a mobile device running iOS 17.4 or above
  2. Attempt to call Office.onReady or Office.initialize
  3. Library is not loaded

Link to live example(s)

N/A

Provide additional details

We have tried initializing Office with the Office.onReady and Office.initialize methods. The code snippets we have tried are below:

Office.onReady

RivaLogger.WriteTrace("Authorize", "Office.onReady", "Before Office.onReady");
Office.onReady(function () {
    // Office is ready.
    RivaLogger.WriteTrace("Authorize", "Office.onReady", "After Office.onReady");

    $(document).ready(function () {
        // The document is ready.
        RivaLogger.WriteTrace("Authorize", "$(document).ready", "After $(document).ready");
    });
});

Office.initialize

RivaLogger.WriteTrace("Authorize", "Office.initialize", "Before Office.initialize");
Office.initialize = function () {
    // Office is ready.
    RivaLogger.WriteTrace("Authorize", "Office.initialize", "After Office.initialize");

    $(document).ready(function () {
        // The document is ready.
        RivaLogger.WriteTrace("Authorize", "$(document).ready", "After $(document).ready");
    });
};

Context

All we are trying to do is load the Office library. When we run the exact same code snippets with mobile devices using Android or iOS versions before 17.4, the library is loaded without issue. A summary of the iOS and Outlook versions we have tried is below:

  Outlook 4.2412.0 Outlook 4.2413.0 Outlook 4.2414.0 Outlook 4.2415.0
iOS Version 15 YES YES YES YES
iOS version 16 YES YES YES YES
iOS version 17.4 NO NO NO NO
iOS version 17.5beta2 NO NO NO NO
iOS version 17.5beta3 NO NO NO NO

Please note: We have also tried enabling/disabling the 'Prevent Cross-Site Tracking' and the 'Block Pop-ups' options in the Safari browser, to no effect.

Useful logs

  • Console errors
  • Screenshots
  • Test file (if only happens on a particular file)

I've attached two screenshots of our logging of the above two calls from the code snippets. You can see that we are getting the logs before we call .onReady or .initialize, but no logs occur afterwards.

Office.onReady
iOS_onReady

Office.initialize
iOS_initialize

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Apr 25, 2024
@exextoc exextoc added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Outlook Issue related to Outlook add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Apr 30, 2024
@exextoc exextoc self-assigned this Apr 30, 2024
@neprasad-microsoft
Copy link

Hi @tallain-rivaengine
We tried on iOS 17.4 with Outlook 4.2414 and were not able to reproduce the issue. Can you help us with the following queries for further debugging?

  1. Are you able to run any other add-in?

  2. Please capture the logs and send it to us . Instructions on how to collect logs - https://github.com/OfficeDev/office-js/wiki/Collecting-log-files-for-Outlook-Add%E2%80%90ins-issues

  3. Please add a try catch in office.initialize and print the error in catch and let us know the error.
    Office.initialize = function (reason) {
    try {
    console.log(Office.initialize(): Huzzah!);
    }
    catch(ex){
    console.error(Office.initialize(): Error! ${ex});
    }
    };

  4. Is this add-in published? If not, can you share a manifest which we can use for testing?

@neprasad-microsoft neprasad-microsoft added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels May 1, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label May 5, 2024
@YmaRivaEngine
Copy link

YmaRivaEngine commented May 6, 2024

Hi @tallain-rivaengine We tried on iOS 17.4 with Outlook 4.2414 and were not able to reproduce the issue. Can you help us with the following queries for further debugging?

  1. Are you able to run any other add-in?
  2. Please capture the logs and send it to us . Instructions on how to collect logs - https://github.com/OfficeDev/office-js/wiki/Collecting-log-files-for-Outlook-Add%E2%80%90ins-issues
  3. Please add a try catch in office.initialize and print the error in catch and let us know the error.
    Office.initialize = function (reason) {
    try {
    console.log(Office.initialize(): Huzzah!);
    }
    catch(ex){
    console.error(Office.initialize(): Error! ${ex});
    }
    };
  4. Is this add-in published? If not, can you share a manifest which we can use for testing?
  1. Are you able to run any other add-in? Yes
  2. Incident ID: EQS9NX52
  3. copied the code, and there are no logs printed in the try and catch
  4. Yes, we are working on a sample manifest but we are afraid that cannot replicate easily

I am not sure if this will help things clear, but to give some background and the usage.
we are using this as part of the graph non-Sso fallback flow for the mobile device
Office.context.ui.displayDialogAsync(myloginUrl)
myloginUrl is an action method that gets the graph configuration on the server side and redirects the user to the MS AuthorizationRequestUrl, after the user inputs the credentials in the ms356 login prompt (hosted by the child dialog), it will redirect to a callback URL that contains the auth code, (the callback URL is configured in the Azure App Service), the callback URL will hit our action method, that rendering the view along with the auth result, inside of this view page, there is only the code that does Office initialization and Office.context.ui.messageParent(authResult)
we tried to remove Office.context.ui.messageParent(authResult), only keeping Office initialization and logs, as well as the test code, but it never hit the logs. And there is no exception in the parent or any events.
This flow worked for 2 years but stopped after IOS was upgraded to 17.4. IOS 15 and all Android platforms work as before.
We came out with a workaround that set the auth result in the localstroge. but we found the diag. close() in parent won't close the diag, no exception or event was captured. And this is also happened only in IOS 17.4 and above.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Status: no recent activity Issue or PR is stale (no recent activity) label May 6, 2024
@DivyaPatidar
Copy link

@YmaRivaEngine Can you try one of the display dialog samples for Outlook and let us know if it works on iOS 17.4 for you?

Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label May 11, 2024
Copy link
Contributor

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)
Projects
None yet
Development

No branches or pull requests

5 participants