Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
5.5k views
in Technique[技术] by (71.8m points)

Microsoft Teams Connector error "ngClickDecorator: value not found in enum type. value:"

I'm currently seeing this error when I try and save my connector configuration:

21T21:05:12.087Z ngClickDecorator: value not found in enum type. value: 

and

 21T21:05:12.155Z Received error from connectors {"seq":1611247472155,"timestamp":1611263112143,"flightSettings": {"Name":"ConnectorFrontEndSettings","AriaSDKToken":"d127f72a3abd41c9b9dd94faca947689-d58285e6-3a68-4cab-a458-37b9d9761d35-7033","SPAEnabled":true,"ClassificationFilterEnabled":true,
    "ClientRoutingEnabled":true,"EnableYammerGroupOption":true,
    "EnableFadeMessage":false,"EnableDomainBasedOwaConnectorList":false,
    "EnableDomainBasedTeamsConnectorList":false,"DevPortalSPAEnabled":true,
"ShowHomeNavigationButtonOnConfigurationPage":false,"DisableConnectToO365InlineDeleteFeedbackPage":true},"status":500,"clientType":"SkypeSpaces",
    "connectorType":"c6adb316-46b2-4e46-a511-8b4947b3d554","name":"handleMessageError"}

And the SO post: Can't save custom connector configuration is very close to my problem however I have added my configurationURL to my valid domains, and removed mine from the manifest but with still no luck. I'm all set up on my permissions as well unless there is something specific I am missing to configure?

Any suggestions, below is my manifest and code: Manifest:

{
  "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
  "manifestVersion": "1.8",
  "version": "1.0.3",
  "showLoadingIndicator": true,
  "isFullScreen": true,
  "id": "c6adb316-46b2-4e46-a511-8b4947b3d554",
  "packageName": "com.test",
  "developer": {
    "name": "Test, Inc",
    "websiteUrl": "https://test.com",
    "privacyUrl": "https://test.com/privacy",
    "termsOfUseUrl": "https://test.com/toc"
  },
  "icons": {
    "color": "color.png",
    "outline": "outline.png"
  },
  "connectors": [
    {
      "connectorId": "c6adb316-46b2-4e46-a511-8b4947b3d554",
      "scopes": [
        "team"
      ],
      "configurationUrl": "https://localdev-test.test.com/connector"
    }
  ],
  "name": {
  "short": "Test Development",
  "full": "Test for Microsoft Teams"
  },
  "description": {
    "short": "Test Development",
    "full": "Test for Microsoft Teams"
  },
  "accentColor": "#FFFFFF",
  "staticTabs": [
    {
      "entityId": "22f101b6-f9a2-44d3-8eba-74309295f398",
      "scopes": [
        "personal"
      ],
      "context":[
        "personalTab",
        "channelTab"
      ],
      "name": "TestSite",
      "contentUrl": "https://localdev-test.test.com",
      "websiteUrl": "https://localdev-test.test.com",
      "searchUrl":  "https://localdev-test.test.com"
    }
  ],
  "devicePermissions": [
    "notifications",
    "openExternal"
  ],
  "permissions": [
    "identity",
    "messageTeamMembers"
  ]
}

Code:

ngOnInit(): void {
    microsoftTeams.initialize();
    microsoftTeams.settings.registerOnSaveHandler((saveEvent) => {
      microsoftTeams.settings.setSettings({
        entityId: 'Create',
        contentUrl: 'https://localdev-test.test.com/connector',
        removeUrl: 'https://localdev-test.test.com/connector',
        configName: 'Create'
      });

      microsoftTeams.settings.getSettings((settings) => {
        this.webhookUrl = settings.webhookUrl;
        localStorage.setItem('connectorWebHook', this.webhookUrl);
      });

      saveEvent.notifySuccess();
    });
  }

  onClick(): void {
    if (!this.webhookUrl) {
      microsoftTeams.settings.setValidityState(true);
    }
  }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is a Microsoft Bug, the "Configuration page for your Connector" on the Connector Portal is immutable (even though it is in an edit field). Meaning that the URL you set on the creation of the Connector can not change through development or you will get this error. So just making a new connector through the portal with my changed configuration URL fixed my problem.

A comment on their git points to this as well: https://github.com/MicrosoftDocs/msteams-docs/issues/1738#issuecomment-647675420


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...