# ACJS - "Cannot decode webItem anchor" Error when using Connect and Forge together

**URL:** <https://community.developer.atlassian.com/t/acjs-cannot-decode-webitem-anchor-error-when-using-connect-and-forge-together/50845>\
**Category:** Forge Modules and Product Triggers\
**Tags:** jira-cloud, atlassian-connect\
**Created:** [August 10, 2021, 6:12am UTC](https://community.developer.atlassian.com/t/acjs-cannot-decode-webitem-anchor-error-when-using-connect-and-forge-together/50845 "2021-08-10T06:12:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajay](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/ajay/32/53765_2.png) [@ajay](https://community.developer.atlassian.com/u/ajay)\
**Post date:** [August 10, 2021, 6:12am UTC](https://community.developer.atlassian.com/t/acjs-cannot-decode-webitem-anchor-error-when-using-connect-and-forge-together/50845/1 "2021-08-10T06:12:15Z")

</div>

We have a jira cloud add-on which we want to migrate from Connect to Forge.

I have followed instructions from [Connect and Forge together | Developer Day 2021](https://www.youtube.com/watch?v=5EnnhaOkatY) and have the connect App ported as a Connect on Forge App installed on my dev instance. The installation is successful.

However I get the below error when I click the Web-Item embedded in the jira.agile.board.tools section . The same works perfectly as a standalone Connect App.

 ![Screenshot 2021-08-10 105159](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/7/2/723932c1c2c76ba90c897f23d659f1d178e8b257.jpeg)

Forge Manifest file below -

```auto
modules:
  jira:workflowValidator:
    - key: example-workflow-validator
      function: main
      name: Workflow validator sample
      description: A Jira workflow validator example.
  function:
    - key: main
      handler: index.run
connectModules:
  {
    "jira:dialogs":
      [
        {
            "url": "/index.html?board.id={board.id}",
            "options":
              {
                "width": "100%",
                "height": "100%",
                "size": "maximum",
                "chrome": true,
                "cancelText": "Close"
              },
            "key": "dialog-module-key"
          },
        {
            "url": "/index.html?board.id={board.id}/#/standup",
            "options":
              {
                "width": "100%",
                "height": "100%",
                "size": "maximum",
                "chrome": true,
                "cancelText": "Close"
              },
            "key": "dialog-module-key-1"
          }
      ],
    "jira:webSections":
      [
        {
            "key": "view26-board-menu",
            "location": "jira.agile.board.tools",
            "name": { "value": "Team Manager" }
          }
      ],
    "jira:webItems":
      [
        {
            "location": "jira.software.board.tools",
            "weight": 200,
            "styleClasses": ["webitem", "system-present-webitem"],
            "context": "addon",
            "target":
              {
                "type": "dialogmodule",
                "options": { "key": "dialog-module-key" }
              },
            "tooltip": { "value": "Backlog Readme" },
            "icon":
              {
                "width": 24,
                "height": 24,
                "url": "/app/images/pie.svg"
              },
            "name": { "value": "Team-Manager" },
            "key": "web-item-backlog"
          },
        {
            "location": "view26-board-menu",
            "weight": 200,
            "styleClasses": ["webitem", "system-present-webitem"],
            "context": "addon",
            "target":
              {
                "type": "dialogmodule",
                "options": { "key": "dialog-module-key" }
              },
            "tooltip": { "value": "Backlog Readme" },
            "icon":
              {
                "width": 24,
                "height": 24,
                "url": "/app/images/pie.svg"
              },
            "name": { "value": "Daily Standup" },
            "key": "web-item-backlog-agile"
          },
        {
            "location": "view26-board-menu",
            "weight": 300,
            "styleClasses": ["webitem", "system-present-webitem"],
            "context": "addon",
            "target":
              {
                "type": "dialogmodule",
                "options": { "key": "dialog-module-key-1" }
              },
            "tooltip": { "value": "Backlog Readme" },
            "name": { "value": "Standup Details" },
            "key": "web-item-backlog-agile-1"
          }
      ],
    "jira:lifecycle":
      [
        { "key": "connect-lifecycle", "installed": "/installed" }
      ]
  }

remotes:
  - key: connect
    baseUrl: https://a6c6ca4c9343.ngrok.io
permissions:
  scopes: ["read:connect-jira"]
app:
  id: ari:cloud:ecosystem::app/08e4a861-48dd-4a11-8248-f1481396a733
  name: Team Manager connect on forge

```

---

<div class="post-metadata">

**Author:** ![dmorrow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/dmorrow/32/35895_2.png) [@dmorrow](https://community.developer.atlassian.com/u/dmorrow)\
**Post date:** [August 11, 2021, 8:43am UTC](https://community.developer.atlassian.com/t/acjs-cannot-decode-webitem-anchor-error-when-using-connect-and-forge-together/50845/2 "2021-08-11T08:43:00Z")

</div>

Hi @ajay ,

I think this error is coming from [here](https://bitbucket.org/atlassian/atlassian-connect-js/src/9cc298035fdb6ce8ac82a613acdcf6a25a33d761/src/host/utils/webitem.js#lines-74). It only goes into this path if there’s hash fragment in the webitem URL. I wonder if the leading`/` in your `/index.html?board.id={board.id}/#/standup` webitem URL hash fragment is causing the issue?

Regards,  
Dugald

---

<div class="post-metadata">

**Author:** ![ajay](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/ajay/32/53765_2.png) [@ajay](https://community.developer.atlassian.com/u/ajay)\
**Post date:** [August 13, 2021, 9:59am UTC](https://community.developer.atlassian.com/t/acjs-cannot-decode-webitem-anchor-error-when-using-connect-and-forge-together/50845/3 "2021-08-13T09:59:50Z")

</div>

Hi @dmorrow ,

That did the trick… I removed the URL hash fragment and finally have the Connect App working on Forge. In hindsight, shouldnt the connect json validation be handled before deployment?

Thanks a lot for the pointer and help ! Appreciate it 😇

Regards  
Ajay

---

<div class="post-metadata">

**Author:** ![dmorrow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/dmorrow/32/35895_2.png) [@dmorrow](https://community.developer.atlassian.com/u/dmorrow)\
**Post date:** [August 16, 2021, 2:02am UTC](https://community.developer.atlassian.com/t/acjs-cannot-decode-webitem-anchor-error-when-using-connect-and-forge-together/50845/4 "2021-08-16T02:02:51Z")

</div>

Hi @ajay ,

Yes, I think there’s a bug on our side that I’ll follow up on.

Regards,  
Dugald
