2017-08-08 19 views
0

今日、私の会社のコンフルエンスアドオンを作成しようとしていましたが、私はatlassian documentsを試してみました。コンフルエントアドオンでcustomContentを作成する際にエラーが発生しました

npm startを実行した後に、新しいカスタムコンテンツをatlassian-connect.jsonに追加するときにエクスプレスアプリを実行しようとすると、次のエラーが発生します。

Failed to register with host https://admin:[email protected]/wiki (200) 
{"type":"INSTALL","pingAfter":300,"status":{"done":true,"statusCode":200,"con 
tentType":"application/vnd.atl.plugins.task.install.err+json","subCode":"upm. 
pluginInstall.error.descriptor.not.from.marketplace","source":"https://1a0adc 
8f.ngrok.io/atlassian-connect.json","name":"https://1a0adc8f.ngrok.io/atlassi 
an-connect.json"},"links":{"self":"/wiki/rest/plugins/1.0/pending/b88594d3-c3 
c2-4760-b687-c8d860c0a377","alternate":"/wiki/rest/plugins/1.0/tasks/b88594d3 
-c3c2-4760-b687-c8d860c0a377"},"timestamp":1502272147602,"userKey":"xxx","id":"xxx"} 
Add-on not registered; no compatible hosts detected 

これは私のアトラシアン-connect.jsonファイルです:

{ 
"key": "my-add-on", 
"name": "Ping Pong", 
"description": "My very first add-on", 
"vendor": { 
    "name": "Angry Nerds", 
    "url": "https://www.atlassian.com/angrynerds" 
}, 
"baseUrl": "{{localBaseUrl}}", 
"links": { 
    "self": "{{localBaseUrl}}/atlassian-connect.json", 
    "homepage": "{{localBaseUrl}}/atlassian-connect.json" 
}, 
"authentication": { 
    "type": "jwt" 
}, 
"lifecycle": { 
    "installed": "/installed" 
}, 
"scopes": [ 
    "READ" 
], 
"modules": { 
    "generalPages": [ 
     { 
      "key": "hello-world-page-jira", 
      "location": "system.top.navigation.bar", 
      "name": { 
       "value": "Hello World" 
      }, 
      "url": "/hello-world", 
      "conditions": [{ 
       "condition": "user_is_logged_in" 
      }] 
     }, 
     { 
      "key": "customersViewer", 
      "location": "system.header/left", 
      "name": { 
       "value": "Hello World" 
      }, 
      "url": "/hello-world", 
      "conditions": [{ 
       "condition": "user_is_logged_in" 
      }] 
     } 
    ], 
    "customContent": [ 
     { 
      "key": "customer", 
      "name": { 
       "value": "Customers" 
      }, 
      "uiSupport": { 
       "contentViewComponent": { 
        "moduleKey": "customersViewer" 
       }, 
       "listViewComponent": { 
        "moduleKey": "customerList" 
       }, 
       "icons": { 
        "item": { 
         "url": "/images/customers.png" 
        } 
       } 
      }, 
      "apiSupport": { 
       "supportedContainerTypes": ["space"] 
      } 
     } 
    ] 
} 

}

誰が起こっていただきました上でのアイデアを持っていますか?

+1

ここでの問題は、Confluenceのアドオン設定の管理で開発モードを有効にしていないことです。 'https:// [your_domain] .atlassian.net/wiki/plugins/servlet/upm'>「設定」をクリックし、「開発モードを有効にする」をチェックしてください – rorschach

答えて

0

contentViewComponentは、moduleKeyで参照しているgeneralPageを見つけることができません。ドキュメントから

:上記のスニペットで

、moduleKey「customersViewer」我々はアドオンで定義されている generalPageモジュールにマップされます。このgeneralPageは、指定されたコンテキストパラメータを渡した であり、それに応じてコンテンツ を視覚化します。

hello-world-page-confluenceからcustomersViewerへのgeneralPageを変更すると、インストールして起動することができます。

+0

答えがありがとう、悲しいことに、 atlassian-connect.jsonファイルを更新し、元の投稿のエラーを修正しました。何か間違ったことをやり直しましたか? – nicowernli

関連する問題