github.com/argoproj/argo-cd/v3@v3.2.1/docs/operator-manual/notifications/troubleshooting-errors.md (about)

     1  ## Failed to parse new settings
     2  
     3  ### error converting YAML to JSON
     4  
     5  YAML syntax is incorrect.
     6  
     7  **incorrect:**
     8  
     9  ```yaml
    10  apiVersion: v1
    11  kind: ConfigMap
    12  metadata:
    13    name: argocd-notifications-cm
    14  data:
    15    service.slack: |
    16      token: $slack-token
    17      icon: :rocket:
    18  ```
    19  
    20  **correct:**
    21  
    22  ```yaml
    23  apiVersion: v1
    24  kind: ConfigMap
    25  metadata:
    26    name: argocd-notifications-cm
    27  data:
    28    service.slack: |
    29      token: $slack-token
    30      icon: ":rocket:" # <- diff here
    31  ```
    32  
    33  ### service type 'xxxx' is not supported
    34  
    35  Check the `argocd-notifications` controller version. For example, the Teams integration support started in `v1.1.0`.
    36  
    37  ## Failed to notify recipient
    38  
    39  ### notification service 'xxxx' is not supported
    40  
    41  You have not defined `xxxx` in `argocd-notifications-cm` or parsing failed.
    42  
    43  ### GitHub.repoURL (\u003cno value\u003e) does not have a / using the configuration
    44  
    45  Likely caused by an Application with [multiple sources](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/):
    46  
    47  ```yaml
    48  spec:
    49    sources:  # <- multiple sources
    50    - repoURL: https://github.com/exampleOrg/first.git
    51      path: sources/example
    52    - repoURL: https://github.com/exampleOrg/second.git
    53      targetRevision: "{{branch}}"
    54  ```
    55  
    56  The standard notification template only supports a single source (`{{.app.spec.source.repoURL}}`). Use an index to specify the source in the array:
    57  
    58  ```yaml
    59  template.example: |
    60    github:
    61      repoURLPath: "{{ (index .app.spec.sources 0).repoURL }}"
    62  ```
    63  
    64  ### Error message `POST https://api.github.com/repos/xxxx/yyyy/statuses/: 404 Not Found`
    65  
    66  This case is similar to the previous one, you have multiple sources in the Application manifest. 
    67  Default `revisionPath` template `{{.app.status.operationState.syncResult.revision}}` is for an Application with single source.
    68  
    69  Multi-source applications report application statuses in an array:
    70  
    71  ```yaml
    72  status:
    73    operationState:
    74      syncResult:
    75        revisions:
    76          - 38cfa22edf9148caabfecb288bfb47dc4352dfc6
    77          - 38cfa22edf9148caabfecb288bfb47dc4352dfc6
    78  Quick fix for this is to use `index` function to get the first revision:
    79  ```yaml
    80  template.example: |
    81    github:
    82      revisionPath: "{{index .app.status.operationState.syncResult.revisions 0}}"
    83  ```
    84  
    85  ## config referenced xxx, but key does not exist in secret
    86  
    87  - If you are using a custom secret, check that the secret is in the same namespace
    88  - You have added the label: `app.kubernetes.io/part-of: argocd` to the secret
    89  - You have tried restarting `argocd-notifications` controller
    90  
    91  ### Example:
    92  Secret:
    93  ```yaml
    94  apiVersion: v1
    95  kind: Secret
    96  metadata:
    97    name: argocd-slackbot
    98    namespace: <the namespace where argocd is installed>
    99    labels:
   100      app.kubernetes.io/part-of: argocd
   101  type: Opaque
   102  data:
   103    slack-token: <base64encryptedtoken>
   104  ```
   105  ConfigMap
   106  ```yaml
   107  apiVersion: v1
   108  kind: ConfigMap
   109  metadata:
   110    name: argocd-notifications-cm
   111  data:
   112    service.slack: |
   113      token: $argocd-slackbot:slack-token
   114  ```