Details
-
Bug
-
Resolution: Tracked Elsewhere
-
Low
Description
Summary
In Cloud, when installing ZenDesk and uninstalling it (maybe other plugins may be affected), if we remove the user ‘addon_zendesk_for_jira’, if this user is associated with other contents in JIRA.
Steps to Reproduce
- Install the ‘Zendesk for JIRA’ add-on’ in Find New Add-ons
- The ‘addon_zendesk_for_jira’ will be created for it
- Associate this user with some content in JIRA
- For example, add it as assignee to an issue
- Uninstall the add-on (not disable or unsubscribe, click ‘Uninstall’)
- Delete this user in User Management
- Try to re-install the add-on
Expected Results
The add-on is correctly installed again.
Actual Results
The add-on fails to be installed.
The following error appears in the UI:
An error occurred while setting up the permissions for this add-on. Please contact Atlassian support.
The below exception is thrown in the JIRA logs:
2016-06-16 10:46:34.749053500 2016-06-16 10:46:34,747 UpmAsynchronousTaskManager:thread-2 ERROR sysadmin 645x5159x3 1359c7p 103.233.242.8 /rest/plugins/1.0/available/featured [c.a.p.c.plugin.lifecycle.ConnectAddonInstaller] An exception occurred while installing the plugin '[zendesk_for_jira]. Uninstalling... 2016-06-16 10:46:34.749055500 com.atlassian.plugin.connect.api.lifecycle.ConnectAddonInstallException: com.atlassian.crowd.exception.UserNotFoundException: User <addon_zendesk_for_jira> does not exist 2016-06-16 10:46:34.749056500 at com.atlassian.plugin.connect.plugin.lifecycle.ConnectAddonManager.provisionAddonUserAndScopes(ConnectAddonManager.java:619) 2016-06-16 10:46:34.749087500 at com.atlassian.plugin.connect.plugin.lifecycle.ConnectAddonManager.provisionUserIfNecessary(ConnectAddonManager.java:246) 2016-06-16 10:46:34.749087500 at com.atlassian.plugin.connect.plugin.lifecycle.ConnectAddonManager.installConnectAddon(ConnectAddonManager.java:194) 2016-06-16 10:46:34.749088500 at com.atlassian.plugin.connect.plugin.lifecycle.ConnectAddonInstaller.install(ConnectAddonInstaller.java:115) 2016-06-16 10:46:34.749094500 at com.atlassian.plugin.connect.plugin.lifecycle.upm.ConnectUPMInstallHandler.installPlugin(ConnectUPMInstallHandler.java:114) 2016-06-16 10:46:34.749100500 at com.atlassian.upm.core.install.DefaultPluginInstallationService.execute(DefaultPluginInstallationService.java:117) 2016-06-16 10:46:34.749100500 at com.atlassian.upm.core.install.DefaultPluginInstallationService.install(DefaultPluginInstallationService.java:91) 2016-06-16 10:46:34.749101500 at com.atlassian.upm.install.UpmPluginInstallationService.install(UpmPluginInstallationService.java:97) 2016-06-16 10:46:34.749119500 at com.atlassian.upm.core.rest.resources.install.InstallTask.installFromFile(InstallTask.java:156) 2016-06-16 10:46:34.749120500 at com.atlassian.upm.core.rest.resources.install.InstallRemotePluginTask$1.apply(InstallRemotePluginTask.java:81) 2016-06-16 10:46:34.749120500 at com.atlassian.upm.core.rest.resources.install.InstallRemotePluginTask$1.apply(InstallRemotePluginTask.java:69) 2016-06-16 10:46:34.749125500 at com.atlassian.upm.api.util.Either$Right.fold(Either.java:160) 2016-06-16 10:46:34.749125500 at com.atlassian.upm.core.rest.resources.install.InstallRemotePluginTask.executeTask(InstallRemotePluginTask.java:68) 2016-06-16 10:46:34.749126500 at com.atlassian.upm.core.rest.resources.install.InstallTask.run(InstallTask.java:81) 2016-06-16 10:46:34.749126500 at com.atlassian.upm.core.async.AsynchronousTaskManager.executeTask(AsynchronousTaskManager.java:124) 2016-06-16 10:46:34.749137500 at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:102) 2016-06-16 10:46:34.749137500 at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:99) 2016-06-16 10:46:34.749138500 at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:42) 2016-06-16 10:46:34.749138500 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 2016-06-16 10:46:34.749142500 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2016-06-16 10:46:34.749143500 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2016-06-16 10:46:34.749143500 at java.lang.Thread.run(Thread.java:745) 2016-06-16 10:46:34.749143500 Caused by: com.atlassian.plugin.connect.api.lifecycle.ConnectAddonInitException: com.atlassian.crowd.exception.UserNotFoundException: User <addon_zendesk_for_jira> does not exist 2016-06-16 10:46:34.749148500 at com.atlassian.plugin.connect.crowd.usermanagement.EmbeddedCrowd.updateUser(EmbeddedCrowd.java:108) 2016-06-16 10:46:34.749148500 at com.atlassian.plugin.connect.crowd.usermanagement.ConnectCrowdBase.createOrEnableUser(ConnectCrowdBase.java:46) 2016-06-16 10:46:34.749154500 at com.atlassian.plugin.connect.crowd.usermanagement.CloudAwareCrowdService.createOrEnableUser(CloudAwareCrowdService.java:82) 2016-06-16 10:46:34.749154500 at com.atlassian.plugin.connect.crowd.usermanagement.CrowdAddonUserService.createOrEnableAddonUser(CrowdAddonUserService.java:102) 2016-06-16 10:46:34.749155500 at com.atlassian.plugin.connect.crowd.usermanagement.CrowdAddonUserService.getOrCreateAddonUserName(CrowdAddonUserService.java:70) 2016-06-16 10:46:34.749159500 at com.atlassian.plugin.connect.plugin.lifecycle.ConnectAddonManager.provisionAddonUserAndScopes(ConnectAddonManager.java:617) 2016-06-16 10:46:34.749159500 ... 21 more 2016-06-16 10:46:34.749160500 Caused by: com.atlassian.crowd.exception.UserNotFoundException: User <addon_zendesk_for_jira> does not exist 2016-06-16 10:46:34.749160500 at com.atlassian.crowd.integration.rest.service.RestCrowdClient.handleUserNotFound(RestCrowdClient.java:1264) 2016-06-16 10:46:34.749164500 at com.atlassian.crowd.integration.rest.service.RestCrowdClient.updateUser(RestCrowdClient.java:189) 2016-06-16 10:46:34.749165500 at com.atlassian.crowd.directory.RemoteCrowdDirectory.updateUser(RemoteCrowdDirectory.java:252) 2016-06-16 10:46:34.749165500 at com.atlassian.crowd.directory.DbCachingRemoteDirectory.updateUser(DbCachingRemoteDirectory.java:538) 2016-06-16 10:46:34.749170500 at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.updateUser(DirectoryManagerGeneric.java:365) 2016-06-16 10:46:34.749171500 ... 3 filtered 2016-06-16 10:46:34.749171500 at java.lang.reflect.Method.invoke(Method.java:497) 2016-06-16 10:46:34.749171500 at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) 2016-06-16 10:46:34.749175500 at com.sun.proxy.$Proxy551.updateUser(Unknown Source) 2016-06-16 10:46:34.749176500 ... 3 filtered 2016-06-16 10:46:34.749176500 at java.lang.reflect.Method.invoke(Method.java:497) 2016-06-16 10:46:34.749176500 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) 2016-06-16 10:46:34.749177500 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) 2016-06-16 10:46:34.749181500 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) 2016-06-16 10:46:34.749181500 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 2016-06-16 10:46:34.749182500 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) 2016-06-16 10:46:34.749187500 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) 2016-06-16 10:46:34.749187500 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 2016-06-16 10:46:34.749188500 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) 2016-06-16 10:46:34.749194500 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) 2016-06-16 10:46:34.749195500 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 2016-06-16 10:46:34.749195500 at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) 2016-06-16 10:46:34.749199500 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 2016-06-16 10:46:34.749200500 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) 2016-06-16 10:46:34.749200500 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) 2016-06-16 10:46:34.749207500 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 2016-06-16 10:46:34.749207500 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) 2016-06-16 10:46:34.749208500 at com.sun.proxy.$Proxy2919.updateUser(Unknown Source) 2016-06-16 10:46:34.749208500 at com.atlassian.plugin.connect.crowd.usermanagement.EmbeddedCrowd.updateUser(EmbeddedCrowd.java:105) 2016-06-16 10:46:34.749212500 ... 27 more
Notes
We could see that:
- The user was no longer present in User Management and its database ‘cwd_user’ table
- The user is still present in JIRA’s ‘cwd_user’, as it has association to existing content
- Re-creating the user manually doesn’t help, as it creates a different error
Partial Workaround
The following workaround may not work in some situations, for example, were the user is author of comments or history entries. Since this requires changes in issues, if possible, test it first:
- Find all links to this user (issues assigned, issues it’s a reporter of, etc.)
- Change it to a different user (assign/change reporter to different users)
- Create a user with the username ‘addon_zendesk_for_jira’
- Delete it
- This user should be deleted from the database in JIRA
- Install the add-on
Attachments
Issue Links
- is superseded by
-
AC-2022 Loading...