Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Configuration UI is broken - Uncaught Error: plugin/prnfb/admin missing aui #347

Open
romandecker opened this issue Aug 20, 2019 · 10 comments
Labels

Comments

@romandecker
Copy link

We are no longer able to configure the plugin from its configuration UI. The notifications we have configured in the past continue to work, but the configuration UI is broken for us, so we can't make any changes.

  • Bitbucket Server version used: v6.3.0

When opening the configuration UI, the dropdowns for buttons and notifications stay empty, event though we have notifications configured (and they still work!). We also get the following console log in the browser devtools:

Uncaught Error: plugin/prnfb/admin missing aui
    at w (almond.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:11)
    at u (almond.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:9)
    at g (almond.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:11)
    at require (require-lite.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:3)
    at HTMLDocument.<anonymous> (admin.js?_statichash=d41d8cd98f00b204e9800998ecf8427e-CDN%2F369421503%2F811079b%2F1389%2F3.24:1)
    at c (jquery.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:30)
    at Object.fireWith [as resolveWith] (jquery.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:30)
    at Function.ready (jquery.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:30)
    at HTMLDocument.H (jquery.js?_statichash=1b4fe21375bf56ecfa2584c852c3927b-CDN%2F369421503%2F811079b%2F1389%2F449808fae6ab9437afa8f189c3a82e50&locale=en-US:30)

Configuration

http://localhost:7990/bitbucket/rest/prnfb-admin/1.0/settings

{
    "adminRestriction": "ADMIN",
    "keyStorePassword": "KEEP_THIS_TO_LEAVE_UNCHANGED",
    "shouldAcceptAnyCertificate": false
}

http://localhost:7990/bitbucket/rest/prnfb-admin/1.0/settings/buttons

[
    {
        "buttonFormList": [],
        "buttonFormListString": "[]",
        "name": "",
        "projectKey": "PRS",
        "repositorySlug": "sps",
        "uuid": "6510b76f-c485-49fe-b657-a7f85d2b1955"
    }
]

http://localhost:7990/bitbucket/rest/prnfb-admin/1.0/settings/notifications

[
    {
        "filterRegexp": "^develop$",
        "filterString": "${PULL_REQUEST_TO_BRANCH}",
        "headers": [],
        "method": "GET",
        "name": "Build Preview on merges to develop",
        "password": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "projectKey": "PRS",
        "proxyPassword": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "proxyUser": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "repositorySlug": "prs",
        "triggerIfCanMerge": "ALWAYS",
        "triggerIgnoreStateList": [],
        "triggers": ["DECLINED", "MERGED"],
        "updatePullRequestRefs": false,
        "url": "https://our.configured.url.com/whatever",
        "user": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "uuid": "f32a09cc-3ab0-4e90-87bc-8de808e06887",
        "postContentEncoding": "NONE"
    },
    {
        "filterRegexp": "^develop$",
        "filterString": "${PULL_REQUEST_TO_BRANCH}",
        "headers": [],
        "method": "GET",
        "name": "Build feature branches before merges to develop",
        "password": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "projectKey": "PRS",
        "proxyPassword": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "proxyUser": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "repositorySlug": "prs",
        "triggerIfCanMerge": "ALWAYS",
        "triggerIgnoreStateList": [],
        "triggers": ["OPENED", "RESCOPED_FROM"],
        "updatePullRequestRefs": false,
        "url": "https://our.configured.url.com/whatever",
        "user": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "uuid": "6fdb9046-095d-4332-b1e1-60ac41279da4",
        "postContentEncoding": "NONE"
    },
    {
        "headers": [],
        "method": "POST",
        "name": "Cleanup after merge",
        "password": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "projectKey": "PRS",
        "proxyPassword": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "proxyUser": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "repositorySlug": "sps",
        "triggerIfCanMerge": "ALWAYS",
        "triggerIgnoreStateList": [],
        "triggers": ["DECLINED", "DELETED", "MERGED"],
        "updatePullRequestRefs": false,
        "url": "https://our.configured.url.com/whatever",
        "user": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "uuid": "890ea06f-4e1e-494e-8219-30759165e882",
        "postContentEncoding": "NONE"
    },
    {
        "headers": [],
        "method": "GET",
        "name": "Create isolated environment for PR",
        "password": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "projectKey": "PRS",
        "proxyPassword": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "proxyUser": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "repositorySlug": "sps",
        "triggerIfCanMerge": "ALWAYS",
        "triggerIgnoreStateList": [],
        "triggers": ["OPENED", "REOPENED", "RESCOPED_FROM"],
        "updatePullRequestRefs": false,
        "url": "https://our.configured.url.com/whatever",
        "user": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "uuid": "80b09b75-9cbf-444a-a166-f344ceb3e695",
        "postContentEncoding": "NONE"
    },
    {
        "filterRegexp": "Test",
        "filterString": "${BUTTON_TRIGGER_TITLE}",
        "headers": [],
        "method": "GET",
        "name": "Notification",
        "password": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "projectKey": "PRS",
        "proxyPassword": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "proxyUser": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "repositorySlug": "prs",
        "triggerIfCanMerge": "ALWAYS",
        "triggerIgnoreStateList": [],
        "triggers": ["BUTTON_TRIGGER"],
        "updatePullRequestRefs": false,
        "url": "https://our.configured.url.com/whatever",
        "user": "KEEP_THIS_TO_LEAVE_UNCHANGED",
        "uuid": "ee6ddb8c-ba02-466e-88ca-a61507305536",
        "postContentEncoding": "NONE",
        "httpVersion": "HTTP_1_1"
    }
]
@tomasbjerre
Copy link
Owner

tomasbjerre commented Aug 20, 2019

Install latest version of the plugin.

See: #321

@romandecker
Copy link
Author

romandecker commented Aug 21, 2019

We already are on 4.1, the issue is still happening.

@tomasbjerre tomasbjerre reopened this Aug 21, 2019
@tomasbjerre
Copy link
Owner

I am able to use the global, project and repo -level configuration pages in Bitbucket Server v6.5.1.

I made the test with this configuration: https://github.com/tomasbjerre/bitbucket-server-jenkins-release-tags

@romandecker
Copy link
Author

I tried with a completely fresh project and repo and get the error immediately. Maybe the error will go away when we update bitbucket to v6.5.1

@atikhono
Copy link

Bitbucket Server 6.6.1 and seeing this error

@tomasbjerre
Copy link
Owner

tomasbjerre commented Sep 27, 2019

Looks like AUI was updated from 7 to 8 in Bitbucket Server 6:
https://developer.atlassian.com/server/bitbucket/reference/api-changelog/

And that is documented here:
https://docs.atlassian.com/aui/8.0.0/docs/upgrades/aui-8.html

The new API is documented here:
https://docs.atlassian.com/aui/8.5.1/docs/helper.html

And that means, the js-files:
https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/tree/master/src/main/resources
Cannot require @atlassian/aui.

It is really strange that this does not happen to me when I use Bitbucket Server 6. I also tried 6.5.1.

I test it like this:

You can check what version of AUI you are using, by hitting F12 in Chrome and check the body-tag:

aui810

@tomasbjerre
Copy link
Owner

@atikhono
Copy link

Bitbucket Server 6.6.1 and seeing this error

Sorry @tomasbjerre, my bad, all seems working with BBS 6.6.1. We had the outdated plugin from Atlasssian Marketplace. When we installed the latest version from github releases, the issue has disappeared.

@romandecker
Copy link
Author

Hm, we just updated to 6.6.1 and the issue still happens for us :/

@dperezcl
Copy link

Upgraded to Atlassian Bitbucket v6.9.1 and still seeing the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants