OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
667 stars 95 forks source link

Smart Alert Feature not working in Outlook Mac Thick Client #4608

Closed SubhashRoy044 closed 1 month ago

SubhashRoy044 commented 2 months ago

We are developing office web Addin for Outlook using event based (Smart Alert). The Addin is generated using Office Yo generator Task Pane add-in using the React framework. We have Send Mode as "Soft" for send mail and OnAppointmentSend events. The issue appears Only in Outlook Mac Thick Client where, once the user clicks on Send, a dialog with message add in is blocking the send of this message with don't send button is shown. Smart Alerts work fine in Safari browser. The issue only exists in Outlook Mac.

Your Environment

Platform : MAC Host : Outlook on MAC Office version number : Version 16.84.1 (24042118) Operating System : MacOs

Expected behavior

When user clicks on send it should redirect to smart alert dialog, however its showing another dialog with the message, add in is blocking, however it should show "send anyway" in case of soft block or send button which redirect to smart pane .

Current behavior

Steps to reproduce

Add recipients and click on Send. Below dialog appears with the don't send button. image

Link to live example(s)




Provide additional details




Context

The issue is User will not be able to open the taskpane and will be shown a dialog with don't send button as shown below. image

And the same works fine in Outlook on web [Safari].

Useful logs

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

SubhashRoy044 commented 2 months ago

1.Send anyway button is not coming for soft block manifest. image

  1. Cache is not working, as soon as the internet if off the user will get the warning message “add-in is taking longer than expected. Email Validation Tool for Accenture is processing message.” image
Swathy-Mothilal commented 2 months ago

Thanks for reporting the issue @SubhashRoy044 . We are unable to repro the issue. Could you please provide a code snippet and the manifest file where you are encountering the issue?

RaveendraReshma commented 2 months ago

@Swathy-Mothilal

below is the code snippet of send handler.

const onSendHandler = async(event) => {
    try {        
            event.completed({
                allowEvent: false,
                errorMessage: "Click on verify to open taskpane",
                commandId: "msgComposeOpenPaneButton",
                cancelLabel: "Verify",
            });
        }
    } catch {
        store.dispatch(
            setErrorMessage(
                `err`
            )
        );
    }
};

Have attached the manifest file. Manifest.txt

Swathy-Mothilal commented 2 months ago

Could you please share a hosted manifest and a repro video? All the links in the manifest are pointing to localhost.

Swathy-Mothilal commented 2 months ago

@RaveendraReshma Kindly create another Github post with your details.

SubhashRoy044 commented 1 month ago

Here, is video.

https://github.com/OfficeDev/office-js/assets/150111732/43815701-46f4-4d6d-b37c-6458e22a75f2

rkpathak commented 1 month ago

@SubhashRoy044 Its still not clear why are you offline and trying to run addin. Can you share the actual manifest and clear set of steps required to reproduce the issue.

SubhashRoy044 commented 1 month ago

Due to network issues, if users face a disconnection while drafting an email, they encounter problems while sending the email. Specifically, users are not getting the "Send Anyway" option, and hence the email is not going to the outbox. Instead, the only available option is the "Don't Send" button. This results in users being unable to send their emails when the internet connection is restored, however email have are present in draft section.

Expected Behavior: When the internet connection is lost while drafting an email, the "Send Anyway" button should appear, allowing the email to be sent once the connection is restored. The email should be saved in the outbox, ready to be sent.

Current Behavior:

The "Send Anyway" button is not appearing. Users only see the "Don't Send" button, which prevents the email from being sent or saved in the outbox. But email are saved in draft.

Additional Issue: Cache is not working properly. As soon as the internet connection is lost, the user receives a warning message: “Add-in is taking longer than expected. Email Validation Tool for Accenture is processing message.”

neprasad-microsoft commented 1 month ago

Hi @SubhashRoy044 This is the expected behaviour for the SoftBlock send mode. Please find details here - https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events?tabs=mac .
You can use the PromptUser mode in your add-in, but in this case in Offline mode the add-in does not run at all, and the email will go to Outbox without showing any alert.

microsoft-github-policy-service[bot] commented 1 month ago

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[bot] commented 1 month ago

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