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
690 stars 95 forks source link

Events sometimes firing sometimes not. #3395

Open marcelimati opened 1 year ago

marcelimati commented 1 year ago

I followed a tutorial from: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch?tabs=xmlmanifest

Generated files using office yo generator with command: yo office.

Then added launchevent.js file like in the tutorial and I didn't change anything in this file to check if it works. When running in development enviroment or production effect was the same. Sometimes when starting outlook event was normally firing, but when it not happend, no matter what I did, it never fired again. Closing outlook, reinstalling addin, removing cache, nothing helped. I even tried making new project with the same code just other guid and it worked initially and when i changed literally 1 line - for example: console.log(event) it stopped working. I think it's something related to cache but it's hard to know what really is an issue. Then I proceed to remove cache like 10-20 times. At some point it worked, but then when I reopened Outlook it stopped working again. It's so frustrating, code compiles and it works but event is randomly working or not (Mostly not) What should I do, is the code generated by office yo outdated or? When I added new event: OnMessageRecipientsChanged no event was firing, the initial two and third one.

Your Environment

Expected behavior

Event should fire always

Current behavior

Addin sideloaded from manifest.xml doesn't always fire outlook events

Steps to reproduce

  1. yo office
  2. file .src/launchevent/launchevent.js

    function onNewMessageComposeHandler(event) {
    setSubject(event);
    }
    function onNewAppointmentComposeHandler(event) {
    setSubject(event);
    }
    function setSubject(event) {
    Office.context.mailbox.item.subject.setAsync(
      "Set by an event-based add-in!",
      {
        "asyncContext": event
      },
      function (asyncResult) {
        // Handle success or error.
        if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
          console.error("Failed to set subject: " + JSON.stringify(asyncResult.error));
        }
    
        // Call event.completed() after all work is done.
        asyncResult.asyncContext.completed();
      });
    }
    if (Office.context.platform === Office.PlatformType.PC || Office.context.platform == null) {
    Office.actions.associate("onNewMessageComposeHandler", onNewMessageComposeHandler);
    Office.actions.associate("onNewAppointmentComposeHandler", onNewAppointmentComposeHandler);
    }
  3. file: .src/commands/commands.html add <script type="text/javascript" src="../launchevent/launchevent.js"></script> before </head> tag
  4. It should work when created at the first time, but adding new event or changing something and re-installing addin prevents event from firing for example:

    function onNewMessageComposeHandler(event) {
    setSubject(event);
    }
    function onNewAppointmentComposeHandler(event) {
    setSubject(event);
    }
    function setSubject(event) {
    Office.context.mailbox.item.subject.setAsync(
      "Set by an event-based add-in!",
      {
        "asyncContext": event
      },
      function (asyncResult) {
        // Handle success or error.
        if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
          console.error("Failed to set subject: " + JSON.stringify(asyncResult.error));
        }
    
        // Call event.completed() after all work is done.
        asyncResult.asyncContext.completed();
      });
    }
    
    function onMessageRecipientsChangedHandler(event) {
    if (event.changedRecipientFields.to) {
      checkForExternals(event);
    }
    if (event.changedRecipientFields.cc) {
      checkForExternals(event);
    }
    if (event.changedRecipientFields.bcc) {
      checkForExternals(event);
    }
    }
    
    function checkForExternals(event) {
       const message = {
      type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,
      message: "Test message",
      icon: "Icon.80x80",
      persistent: true,
    };
    
    // Show a notification message
    Office.context.mailbox.item.notificationMessages.replaceAsync("action", message);
       event.completed();
    }
    if (Office.context.platform === Office.PlatformType.PC || Office.context.platform == null) {
    Office.actions.associate("onNewMessageComposeHandler", onNewMessageComposeHandler);
    Office.actions.associate("onNewAppointmentComposeHandler", onNewAppointmentComposeHandler);
    Office.actions.associate("onMessageRecipientsChangedHandler", onMessageRecipientsChangedHandler);
    }
  5. Contents of manifest.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <OfficeApp
          xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
          xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
          xsi:type="MailApp">
    
    <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
    
    <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
    <Id>af733827-33b6-4677-86c7-6da21807c39c</Id>
    
    <!--Version. Updates from the store only get triggered if there is a version change. -->
    <Version>1.0.0.0</Version>
    <ProviderName>Contonso</ProviderName>
    <DefaultLocale>en-US</DefaultLocale>
    <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
    <DisplayName DefaultValue="Contonso" />
    <Description DefaultValue="Contonso Addin"/>
    
    <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
    <IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png" />
    <HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/>
    
    <!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
    <SupportUrl DefaultValue="https://localhost:3000/help" />
    
    <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
    <AppDomains>
    <AppDomain>https://localhost:3000/</AppDomain>
    </AppDomains>
    <!--End Basic Settings. -->
    
    <Hosts>
    <Host Name="Mailbox"/>
    </Hosts>
    <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
    </Requirements>
    <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
    </FormSettings>
    
    <Permissions>ReadWriteItem</Permissions>
    <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
    </Rule>
    <DisableEntityHighlighting>false</DisableEntityHighlighting>
    
    <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">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.10">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <!-- Event-based activation happens in a lightweight runtime.-->
        <Runtimes>
          <!-- HTML file including reference to or inline JavaScript event handlers.
               This is used by Outlook on the web and Outlook on the new Mac UI. -->
          <Runtime resid="WebViewRuntime.Url">
            <!-- JavaScript file containing event handlers. This is used by Outlook on Windows. -->
            <Override type="javascript" resid="JSRuntime.Url"/>
          </Runtime>
        </Runtimes>
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url" />
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="msgReadGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <Label resid="TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="TaskpaneButton.Label" />
                    <Description resid="TaskpaneButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16" />
                    <bt:Image size="32" resid="Icon.32x32" />
                    <bt:Image size="80" resid="Icon.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="ActionButton">
                  <Label resid="ActionButton.Label"/>
                  <Supertip>
                    <Title resid="ActionButton.Label"/>
                    <Description resid="ActionButton.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>action</FunctionName>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
    
          <!-- Can configure other command surface extension points for add-in command support. -->
    
          <!-- Enable launching the add-in on the included events. -->
          <ExtensionPoint xsi:type="LaunchEvent">
            <LaunchEvents>
              <LaunchEvent Type="OnNewMessageCompose" FunctionName="onNewMessageComposeHandler"/>
              <LaunchEvent Type="OnNewAppointmentOrganizer" FunctionName="onNewAppointmentComposeHandler"/>
              <LaunchEvent Type="OnMessageRecipientsChanged" FunctionName="onMessageRecipientsChangedHandler" />
    
              <!-- Other available events -->
              <!--
              <LaunchEvent Type="OnMessageAttachmentsChanged" FunctionName="onMessageAttachmentsChangedHandler" />
              <LaunchEvent Type="OnAppointmentAttachmentsChanged" FunctionName="onAppointmentAttachmentsChangedHandler" />
    
              <LaunchEvent Type="OnAppointmentAttendeesChanged" FunctionName="onAppointmentAttendeesChangedHandler" />
              <LaunchEvent Type="OnAppointmentTimeChanged" FunctionName="onAppointmentTimeChangedHandler" />
              <LaunchEvent Type="OnAppointmentRecurrenceChanged" FunctionName="onAppointmentRecurrenceChangedHandler" />
              <LaunchEvent Type="OnInfoBarDismissClicked" FunctionName="onInfobarDismissClickedHandler" />
              <LaunchEvent Type="OnMessageSend" FunctionName="onMessageSendHandler" SendMode="PromptUser" />
              <LaunchEvent Type="OnAppointmentSend" FunctionName="onAppointmentSendHandler" SendMode="PromptUser" />
              <LaunchEvent Type="OnMessageCompose" FunctionName="onMessageComposeHandler" />
              <LaunchEvent Type="OnAppointmentOrganizer" FunctionName="onAppointmentOrganizerHandler" />
              -->
            </LaunchEvents>
            <!-- Identifies the runtime to be used (also referenced by the Runtime element). -->
            <SourceLocation resid="WebViewRuntime.Url"/>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
        <bt:Url id="WebViewRuntime.Url" DefaultValue="https://localhost:3000/commands.html" />
        <!-- Entry needed for Outlook on Windows. -->
        <bt:Url id="JSRuntime.Url" DefaultValue="https://localhost:3000/launchevent.js" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Contoso Add-in"/>
        <bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
        <bt:String id="ActionButton.Label" DefaultValue="Perform an action"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
        <bt:String id="ActionButton.Tooltip" DefaultValue="Perform an action when clicked."/>
      </bt:LongStrings>
    </Resources>
    </VersionOverrides>
    </VersionOverrides>
    </OfficeApp>

    Link to live example(s)

Provide additional details

Context

I tried this on 3 different devices with same outlook version, problem was the same.

Useful logs

content of log.txt

31.05.2023 14:44:08 Medium  Web Add-In Runtime Logging Session Started          
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : af733827-33b6-4677-86c7-6da21807c39c, Location : Element Namespace "http://schemas.microsoft.com/office/mailappversionoverrides" : Element Name "VersionOverrides" : xsi:Type "VersionOverridesV1_0", Line=58, CharPosition=4      
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=69, CharPosition=12        
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=73, CharPosition=12     
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 9fd38622-d9b4-4401-b1b9-1ce14c5e435a, Location : Element Namespace "http://schemas.microsoft.com/office/mailappversionoverrides/1.1" : Element Name "LaunchEvent", Line=453, CharPosition=18       
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 9fd38622-d9b4-4401-b1b9-1ce14c5e435a, Location : Element Namespace "http://schemas.microsoft.com/office/mailappversionoverrides/1.1" : Element Name "LaunchEvent", Line=453, CharPosition=18       
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=68, CharPosition=8     
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=71, CharPosition=8      
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=68, CharPosition=8     
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=71, CharPosition=8      
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=71, CharPosition=12        
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=75, CharPosition=12     
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=71, CharPosition=12        
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=75, CharPosition=12     
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "TabletSettings", Line=64, CharPosition=6     
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "PhoneSettings", Line=68, CharPosition=6      
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "TabletSettings", Line=64, CharPosition=6     
31.05.2023 14:44:08 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "PhoneSettings", Line=68, CharPosition=6      
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 9fd38622-d9b4-4401-b1b9-1ce14c5e435a, Location : Element Namespace "http://schemas.microsoft.com/office/mailappversionoverrides/1.1" : Element Name "LaunchEvent", Line=453, CharPosition=18       
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "TabletSettings", Line=64, CharPosition=6     
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "PhoneSettings", Line=68, CharPosition=6      
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=69, CharPosition=12        
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=73, CharPosition=12     
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=68, CharPosition=8     
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=71, CharPosition=8      
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=71, CharPosition=12        
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=75, CharPosition=12     
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 9fd38622-d9b4-4401-b1b9-1ce14c5e435a, Location : Element Namespace "http://schemas.microsoft.com/office/mailappversionoverrides/1.1" : Element Name "LaunchEvent", Line=453, CharPosition=18       
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "TabletSettings", Line=64, CharPosition=6     
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "PhoneSettings", Line=68, CharPosition=6      
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=69, CharPosition=12        
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=73, CharPosition=12     
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=68, CharPosition=8     
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=71, CharPosition=8      
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=71, CharPosition=12        
31.05.2023 14:44:09 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=75, CharPosition=12     
31.05.2023 14:44:09 Unexpected  Resource    The resource you are trying to use does not exist.      
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 9fd38622-d9b4-4401-b1b9-1ce14c5e435a, Location : Element Namespace "http://schemas.microsoft.com/office/mailappversionoverrides/1.1" : Element Name "LaunchEvent", Line=453, CharPosition=18       
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "TabletSettings", Line=64, CharPosition=6     
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.0" : Element Name "PhoneSettings", Line=68, CharPosition=6      
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=69, CharPosition=12        
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : 7a774f0c-7a6f-11e0-85ad-07fb4824019b, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=73, CharPosition=12     
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=68, CharPosition=8     
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : a216ceed-7791-4635-a752-5a4ac0a5eb93, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=71, CharPosition=8      
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "TabletSettings", Line=71, CharPosition=12        
31.05.2023 14:44:15 Monitorable Manifest    Skipped unrecognized XML element for add-in ID : bc13b9d0-5ba2-446a-956b-c583bdc94d5e, Location : Element Namespace "http://schemas.microsoft.com/office/appforoffice/1.1" : Element Name "PhoneSettings", Line=75, CharPosition=12     
31.05.2023 14:44:15 Unexpected  Resource    The resource you are trying to use does not exist.      
31.05.2023 14:44:15 Unexpected  Resource    The resource you are trying to use does not exist.      
31.05.2023 14:44:15 Unexpected  Resource    The resource you are trying to use does not exist.      
31.05.2023 14:44:15 Unexpected  SourceMap   Debugging is enabled, but source map file is unavailable. SolutionId=af733827-33b6-4677-86c7-6da21807c39c , AppVersion=1.0.1.8      
31.05.2023 14:44:18 Unexpected  Resource    The resource you are trying to use does not exist.      
31.05.2023 14:44:18 Unexpected  Resource    The resource you are trying to use does not exist.      
31.05.2023 14:44:18 Unexpected  SourceMap   Debugging is enabled, but source map file is unavailable. SolutionId=af733827-33b6-4677-86c7-6da21807c39c , AppVersion=1.0.1.8      
31.05.2023 14:44:18 Verbose Runtime [Console] [Log] Platform Bundle - Office exists!        
31.05.2023 14:44:18 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions exists!        
31.05.2023 14:44:18 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions.associate exists!      
31.05.2023 14:44:18 Verbose Runtime [Console] [Log] Outlook Batch JS loaded!        
31.05.2023 14:44:18 Verbose Runtime [Console] [Log] Outlook LaunchEvent JS loaded!      
31.05.2023 14:44:18 Verbose Runtime [Console] [Log] `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.       
31.05.2023 14:44:18 Verbose Runtime [Console] [Log] `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.       
31.05.2023 14:44:19 Verbose Runtime [Console] [Log] Platform Bundle - Office exists!        
31.05.2023 14:44:19 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions exists!        
31.05.2023 14:44:19 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions.associate exists!      
31.05.2023 14:44:19 Verbose Runtime [Console] [Log] Outlook Batch JS loaded!        
31.05.2023 14:44:19 Verbose Runtime [Console] [Log] Outlook LaunchEvent JS loaded!      
31.05.2023 14:44:19 Verbose Runtime [Console] [Log] `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.       
31.05.2023 14:44:19 Verbose Runtime [Console] [Log] `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.       

Log can contain all my tries installing different addins hoping that it could resolve my issue but it still happens.

stefanoslig commented 1 year ago

We have experienced exactly the same behavior. The event-based instances are not active sometimes when we compose a message. We expect that the OnNewMessageCompose for example will always be triggered when we compose a new message. But this is not the case right now. This random behavior might cause issues in our application. Could you please have a look?

thoffmann-fms commented 1 year ago

I've noticed that the JS code referenced in does not execute until I make some sort of change, like update the time. That's possibly why onNewMessageCompose doesn't fire since Outlook doesn't know yet what to do until it runs the FunctionFile code.

marcelimati commented 1 year ago

Is there some estimate of fixing this bug, or some workaround to make it working?

ASHISDEY1998 commented 8 months ago

I've noticed that sometimes on adding emails to or cc or bcc the OnMessageRecipientsChanged is not getting triggered . A similar thing happens when a new message is composed then OnMessageCompose is also not triggered.

Screenshot 2024-03-05 184356 Screenshot 2024-03-05 184602
1TheMuffinMan commented 4 months ago

Similar issue with OnMessageSend in classic Outlook for Windows. It doesn't invoke that smart alert handler. Only OnNewCompose and RecipientsChanged gets hit.

GruberMarkus commented 3 months ago

Are there any updates on this?

Jakob-k commented 2 months ago

I am really expecting some resolution for this issue soon. It is completely blocking my workflow

guzman-rc commented 1 month ago

I am also experiencing errors with the event: OnMessageAttachmentsChanged. If you attach several files, the OnMessageAttachmentsChanged event is only triggered for the first of the attached files, not for the rest.

See details of the issue: 4646