none
Teams Channel notifications are not posted RRS feed

  • Question

  • HI ,

    Getting this error which was working fine till yesterday,

    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information

    We are trying to post a notification message to a Teams Channel with the generated outlook webhook link.

    please help us to find the problem.

    Friday, October 4, 2019 3:43 AM

All replies

  • You need to be a lot more specific than that... What is the relevant snippet of your code?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, October 4, 2019 8:29 PM
  • I think they are providing as much information as is needed/possible. I am having the same exact problem.

    Here is a Python example:

    In [1]: import requests
    
    In [2]: url = "<REDACTED>"
    
    In [3]: data = {"type": "TextBlock", "size": "medium", "text": "*Test Header*\nTest message"}
    
    In [4]: response = requests.post(url, json=data)
    
    In [5]: response
    Out[5]: <Response [200]>
    
    In [6]: response.content
    Out[6]: b'System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'
    
    In [7]: data = {"@type": "MessageCard", "@context": "https://schema.org/extensions", "sections": [{"activityTitle": "Test Section", "text": "Test Text"}
       ...: ], "summary": "Webhook Test", "title": "Webhook Test", "themeColor": "00CC00"}
    
    In [8]: response = requests.post(url, json=data)
    
    In [9]: response
    Out[9]: <Response [200]>
    
    In [10]: response.content
    Out[10]: b'System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'

    This worked 100% fine for me until a week or so ago.

    Also of note is the fact that Microsoft is returning HTTP 200 responses for errors.

    Saturday, October 5, 2019 3:08 PM
  • Our Teams WebHook Connectors abruptly stopped working on Saturday, Oct, 5th @ 1 PM EST with the same error it appears.  I have recreated them and tried using another channel, and they are no longer sending simple messages.  No code changes occurred around that time so I can only assume something changed in Office 365.  This code has worked successfully for several months, and I concur that we do received a 200 status code, but the above error when doing a curl or powershell Invoke-RestMethod.

    This throws the aforementioned error in powershell for any webhook url I give it.

    Invoke-RestMethod -Method post -ContentType 'Application/Json' -Body '{"text":"Hello World!"}' -Uri <Insert WebHook URL>

    Example of our code.

    private HttpClient _client = new HttpClient();

    private string _webHookUrl = "Insert URL Here";

    public async Task SendMessageAsync(string title, string text) { var data = new { title, text }; var jsonString = JsonConvert.SerializeObject(data); var content = new StringContent(jsonString, Encoding.UTF8, "application/json"); content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); var response = await _client.PostAsync(_webHookUrl, content); if(response.IsSuccessStatusCode) { _logger.LogInformation($"Microsoft Teams message was a success."); } else { _logger.LogError($"Microsoft Teams message failed to post with status code: {response.StatusCode}."); }

    Monday, October 7, 2019 3:00 PM
  • We have similar issue as well, suddenly webhook notifications from Jenkins started to stop for one our Team (all channels under that) on yesterday morning. We have been using same system to send notifications several months and no changes done in our side.

    Re-creating Jenkins connector in Teams channel side did not help either.

    And interesting thing is that only one Team and all channels under that are suffering this issue, while other Teams/channels tried work just fine.


    • Edited by juhjaask Tuesday, October 8, 2019 2:31 PM
    Tuesday, October 8, 2019 2:31 PM
  • Microsoft is aware of the problem and they are working on a fix.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, October 8, 2019 2:40 PM
  • Microsoft is aware of the problem and they are working on a fix.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Any updates? Now we are not even able to open connectors:


    Thursday, October 10, 2019 12:28 PM
  • Works now again without issues
    Monday, October 14, 2019 6:05 PM