reconquest / atlassian-external-hooks

External Hooks plugin for Atlassian Bitbucket
https://external-hooks.reconquest.io
Other
44 stars 37 forks source link

HookScripts Report Export Not working #128

Closed adchatakora closed 1 year ago

adchatakora commented 2 years ago

We are unable to export the hookscripts report. Each time the button is clicked, a 500 code is returned and the response is Oops, an error occurred

Please see your system administrator. Screen Shot 2022-01-05 at 11 58 39 AM

seletskiy commented 2 years ago

@adchatakora Hello, please locate the Bitbucket error log on the server, try to reproduce the error and share the stack trace that will appear in that log. Thank you.

adchatakora commented 2 years ago

@seletskiy wherte would the logs for this be located

adchatakora commented 2 years ago

@seletskiy any update here? For some reason i am unable to find the logs for this addon. Where are they located or stored by default? We need to currate a list of where the addon is used in our instance

seletskiy commented 2 years ago

@adchatakora You need to find atlassian-bitbucket.log file, which is typically located in the <bitbucket-installation-dir>/log/atlassian-bitbucket.log.

adchatakora commented 2 years ago

Hi @seletskiy this was the error that appeared.

2022-01-11 13:39:44,319 ERROR [https-jsse-nio-8443-exec-2] o.a.c.c.C.[.[.[/].[plugins] Servlet.service() for servlet [plugins] in context with path [] threw exception [Servlet execution threw an exception] with root cause java.lang.ClassNotFoundException: org.json.simple.JSONObject not found by com.ngs.stash.externalhooks.external-hooks [138] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) at com.ngs.stash.externalhooks.servlet.Diagnostics.dumpHookScripts(Diagnostics.java:128) at com.ngs.stash.externalhooks.servlet.Diagnostics.doGet(Diagnostics.java:63) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:75) at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:48) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.bitbucket.internal.ratelimit.servlet.filter.RateLimitFilter.doFilter(RateLimitFilter.java:75) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:181) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:85) at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81) at com.atlassian.plugins.slack.analytics.SlackAnalyticsFilter.doFilter(SlackAnalyticsFilter.java:35) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.stash.internal.web.auth.AuthorizationFailureInterceptor.doFilterInternal(AuthorizationFailureInterceptor.java:39) at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:85) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69) at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109) at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37) at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:26) at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:48) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84) at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.lang.Thread.run(Thread.java:748) ... 245 frames trimmed

seletskiy commented 2 years ago

@adchatakora Could you please try the latest (12.0.2) add-on version from the Marketplace?

adchatakora commented 2 years ago

@seletskiy aaah that did it. For some reason it was not showing in the apps that it needed to be updated until i expanded the plugin options.

The report gives me a json file with data all in the following format

    {
        "plugin_key": "com.ngs.stash.externalhooks.external-hooks",
        "size": 1320,
        "name": "external-merge-check-hook",
        "id": 5695,
        "created_date": 1641928346,
        "updated_date": 1641928346,
        "version": 0
    }

How do i know where this hook is installed in the instance. I am trying to get the location of these hooks projects and repos

seletskiy commented 2 years ago

I am trying to get the location of these hooks projects and repos

What do you mean by "location" in this context?

adchatakora commented 2 years ago

I need to get a report of where in Bitbucket ( repos and projects) the hooks are installed and users. Our instance has 100 and some hooks installed but i need to know where exactly which having to search every single one of our repos ( which is a lot)

seletskiy commented 2 years ago

You can use following tool: https://github.com/reconquest/bitbucket-external-hook

kovetskiy commented 1 year ago

Closing since this is fixed.