baloise / digital-signature

a digital signature confluence macro
https://marketplace.atlassian.com/1217404
Apache License 2.0
8 stars 8 forks source link

Problem with "Digital Signature" #49

Closed edithhirte closed 4 years ago

edithhirte commented 4 years ago

I am contacting you regarding your Conflunce plug-in „digital-signature“. We are using it extensively in our internal document reviews, but we are experiencing severe technical problems with the plug-in and would like to inquire if you might be able to help.

The problem: we have many pages with up to 40 signature fields. Randomly, the signature doesn’t work for individual users (again, there is no pattern). The button is clickable, but nothing happens. Our own IT has looked at the source code and cannot find any errors. After a few days it usually works again, but we don’t understand why. We need to review many documents in Confluence due to the current pandemic and are struggeling to keep our projects moving.

Have you encountered the same issue before? Can you put us in touch with your developers to solve the problem?

You can reach me at edith.hirte@humboldtforum.org You can reach my colleague at our IT at jakub.pochlya@humboldtforum.org

Thank you very much!

culmat commented 4 years ago

Hello Jakub,

do you see any errors in the log file? How is your confluence setup? Do you use data center / cloud version of confluence or is it a single server instance?

Best regards Matthias

jakubpochyla commented 4 years ago

Hi Matthias,

errors in the log are a bit hard to track down, do you have maybe a suggestions for what specifically I should look? The log is quite big and we are using a lot of plugins. We are using Confluence Server. The Confluence instance and database are running on different linux servers.

Do you need any other details?

For communication: should we write here or directly via mail?

Thank you and best regards, Jakub IT Department

culmat commented 4 years ago

Hi Jakub,

I would expect an error from the class com.baloise.confluence.digitalsignature.rest.DigitalSigatureService.DigitalSigatureService. Maybe you can search for the package com.baloise.confluence.digitalsignature or simply for Exception

Seems strange to me, that the button is clickable but nothing happens. It is a plain HTML form with /atlassian/rest/signature/1.0/sign as action, so the browser should load that page.

I guess "nothing happens" means browser reloads the page and the signature does not appear?

Matthias

jakubpochyla commented 4 years ago

Hi Matthias,

thank you for the quick reply. I'll start digging in the logs. Your guess is right. Also we have sometimes the strange behaviour, that the last person who signed, appears with name and date of signature in all the other signatures not yet signed on the page.

To elaborate our use of the plugin: we have, let's say 20 users who have to sign. Some are grouped into one signature but most are by them self. I thought that maybe this could be the problem, that instead of one big group we have many single signatures. Or should this be a problem from your point of view?

I'll keep you posted about the log findings.

Best regards, Jakub

culmat commented 4 years ago

It could be a concurrency / multithreading issue: if several users sign at the same time, it might be that one overwrites the state of the other, as the signature object graph with the list of all signatures is stored as a whole. I will try to reproduce this with a stress test.

If this is the case I may need to put a lock on the Bandanamanger or the rest endpoint, or change the storage format to allow parallel write operations. I guess the latter is preferable, see #24. Need to pay attention to backwards compatibility though ...

jakubpochyla commented 4 years ago

Hi,

This is one exception I've found so far:

Output from atlassian-confluence.log

2020-05-18 15:31:10,881 ERROR [https-jsse-nio2-8443-exec-8] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: null -- referer: https://XXX | url: /rest/signature/1.0/export | traceId: XXX | userName: XXX java.lang.NullPointerException at com.baloise.confluence.digitalsignature.rest.DigitalSigatureService.export(DigitalSigatureService.java:182) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$TypeOutInvoker$1.invoke(DispatchProviderHelper.java:169) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53) at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:42) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:110) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$TypeOutInvoker._dispatch(DispatchProviderHelper.java:167) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:162)

I hope this helps somehow.

Best regards, Jakub

culmat commented 4 years ago

Interesting. I would have rather expected the exception in com.baloise.confluence.digitalsignature.rest.DigitalSigatureService.sign Which is the exact version of the plugin you are using?

culmat commented 4 years ago

The strange thing it is takes days to recover. The more I think about it, the less I'm convinced it is a concurrency issue...

Also we have sometimes the strange behaviour, that the last person who signed, appears with name and date of signature in all the other signatures not yet signed on the page.

This is normal behavior if the title and content of the signature panel are the same ( i.e. copy / paste ) and they are on the same page.

Please remember you sign the content ( panel title + panel content + pageID ), so if you copy on the same page all signatures apply, copy to a different page they are lost.

We can not identify a macro instance for the moment, see #1

To elaborate our use of the plugin: we have, let's say 20 users who have to sign. Some are grouped into one signature but most are by them self. I thought that maybe this could be the problem, that instead of one big group we have many single signatures. Or should this be a problem from your point of view?

Other than #26 I don't see any reason to separate into many single signatures if the content of the contract is the same? I would rather put them all into the same panel.

Do your users also report "disappearing" signatures? Could you keep an eye on the history of the pages when users report signature not working? Maybe in fact the content changed and the signatures are invalidated?

jakubpochyla commented 4 years ago

Hi Matthias,

thank you for your replies. So to sum up you would recommend the following:

Did I understand you correctly? I'll investigate if we have the problem of the macro disappearing.

Best regards, Jakub

culmat commented 4 years ago

Hello Jakub, manually insert vs paste/copy should be the same. Yes I recommend to use one panel for all the signatures instead of multiple panels with one/two users each.

Do you still experience problems or can we close this ticket? Best regards. Matthias

edithhirte commented 4 years ago

Hello Matthias, it seems like we solved the problem by individualising the content: each signature makro gets an own title, own signer, own text inside the box. Since we did this, there have been no problems. So yes, close the ticket. But if it reorccurs, we will get in touch. Best, Edith