Bug Report About: Internal Error During Signature Method Switch In LibreSign

by ADMIN 77 views

Labels: bug Assignees: [Your Name]

Describe the Bug

After successfully signing PDF documents using the "certificate with password" method, switching to the "identification factors" option (which offers "click to sign" and "email token") causes the signing process to fail with an internal error. The error message displayed is:

"Internal error. Contact admin."

To Reproduce

Steps to Reproduce the Behavior

  1. Log in as an authenticated user on the Nextcloud instance.
  2. Open a PDF document that you want to sign.
  3. Select the signing option and choose the "certificate with password" method. Sign two documents successfully.
  4. Switch to the "identification factors" option, which provides "click to sign" and "email token" options.
  5. Click on either the "click to sign" or "email token" option.
  6. The signing process fails, and the system displays an internal error message.

Expected Behavior

The signing process should complete successfully regardless of the selected method. When switching to "identification factors," the system should properly sign the PDF document without errors.

Screenshots

No thanks.

Environment Information

Operating System

  • OS: [Docker container based(nextcloud:production)]

Browser

  • Browser: Chrome 134.0.0.0 on Windows 11 (Actually brave)

LibreSign Version

  • LibreSign Version: 10.6.3

Nextcloud Server Version

  • Nextcloud Server Version: 30.0.6.2

Logs

Below is an excerpt from the Nextcloud log (data/nextcloud.log) related to LibreSign:

{"reqId":"Nr19tNTrrmXJIjMRq0fl","level":3,"time":"2025-03-10T16:21:09+00:00","remoteAddr":"172.19.0.1","user":"--","app":"libresign","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/5e030475-f60c-41fd-bb40-513d0b751ea4","message":"[{\"file\":\"\\/var\\/www\\/html\\/custom_apps\\/libresign\\/lib\\/Handler\\/JSignPdfHandler.php\",\"line\":137,\"function\":\"signWrapper\",\"class\":\"OCA\\\\Libresign\\\\Handler\\\\JSignPdfHandler\",\"type\":\"->\",\"args\":[{}]},{\"file\":\"\\/var\\/www\\/html\\/custom_apps\\/libresign\\/lib\\/Handler\\/JSignPdfHandler.php\",\"line\":108,\"function\":\"signUsingVisibleElements\",\"class\":\"OCA\\\\Libresign\\\\Handler\\\\JSignPdfHandler\",\"type\":\"->\",\"args\":[]},{\"file\":\"\\/var\\/www\\/html\\/custom_apps\\/libresign\\/lib\\/Handler\\/Pkcs12Handler.php\",\"line\":426,\"function\":\"getSignedContent\",\"class\":\"OCA\\\\Libresign\\\\Handler\\\\JSignPdfHandler\",\"type\":\"->\",\"args\":[]},{\"file\":\"\\/var\\/www\\/html\\/custom_apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":271,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Handler\\\\Pkcs12Handler\",\"type\":\"->\",\"args\":[]},{\"file\":\"\\/var\\/www\\/html\\/custom_apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":133,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\",\"args\":[]},{\"file\":\"\\/var\\/www\\/html\\/custom_apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":95,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\",\"args\":[\"account\",[{\"documentElementId\":6,\"profileNodeId\":5520}],\"\",\"797552\",null,\"5e030475-f60c-41fd-bb40-513d0b751ea4\"]},{\"file\":\"\\/var\\/www\\/html\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":208,\"function\":\"signUsingUuid\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\",\"args\":[\"5e030475-f60c-41fd-bb40-513d0b751ea4\",\"account\",[{\"documentElementId\":6,\"profileNodeId\":5520}],\"\",\"797552\"]},{\"file\":\"\\/var\\/www\\/html\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":114,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[{},\"signUsingUuid\"]},{\"file\":\"\\/var\\/www\\/html\\/lib\\/private\\/AppFramework\\/App.php\",\"line\":161,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[{},\"signUsingUuid\"]},{\"file\":\"\\/var\\/www\\/html\\/lib\\/private\\/Route\\/Router.php\",\"line\":302,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\",\"args\":[\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"signUsingUuid\",{},{\"apiVersion\":\"v1\",\"uuid\":\"5e030475-f60c-41fd-bb40-513d0b751ea4\",\"_route\":\"ocs.libresign.signfile.signusinguuid\"}]},{\"file\":\"\\/var\\/www\\/html\\/ocs\\/v1.php\",\"line\":43,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\",\"args\":[\"\\/ocsapp\\/apps\\/libresign\\/api\\/v1\\/sign\\/uuid\\/5e030475-f60c-41fd-bb40-513d0b751ea4\"]},{\"file\":\"\\/var\\/www\\/html\\/ocs\\/v2.php\",\"line\":7,\"args\":[\"\\/var\\/www\\/html\\/ocs\\/v1.php\"],\"function\":\"require_once\"}]","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"30.0.6.2","data":{"app":"libresign"}}

Additional Context

The issue persists even after attempting to remove libresign from nextcloud and the LibreSign directory. The problem appears when reinstalled libresign. Tried both methods, after that... no luck same error after that...

Conclusion

The internal error during signature method switch in LibreSign on Nextcloud is a critical issue that needs to be addressed. The error occurs when switching from the "certificate with password" method to the "identification factors" option. The issue persists even after reinstalling libresign. To resolve this issue, further investigation and debugging are required to identify the root cause and provide a fix.

Recommendations

  1. Investigate the issue further to identify the root cause.
  2. Debug the code to determine where the error is occurring.
  3. Provide a fix to resolve the issue.
  4. Test the fix to ensure it resolves the issue.
  5. Update the documentation to reflect the fix.

Next Steps

  1. Create a new issue in the LibreSign repository to track the issue.
  2. Assign the issue to a developer to investigate and fix.
  3. Provide additional information and context to the developer to aid in the investigation.
  4. Monitor the issue and provide updates as necessary.
    Q&A: Internal Error During Signature Method Switch in LibreSign ===========================================================

Frequently Asked Questions

Q: What is the internal error during signature method switch in LibreSign? A: The internal error during signature method switch in LibreSign is a critical issue that occurs when switching from the "certificate with password" method to the "identification factors" option. The error causes the signing process to fail and displays an internal error message.

Q: What are the symptoms of the internal error during signature method switch in LibreSign? A: The symptoms of the internal error during signature method switch in LibreSign include:

  • The signing process fails when switching from the "certificate with password" method to the "identification factors" option.
  • The system displays an internal error message.
  • The issue persists even after reinstalling libresign.

Q: What are the possible causes of the internal error during signature method switch in LibreSign? A: The possible causes of the internal error during signature method switch in LibreSign include:

  • A bug in the libresign code.
  • A conflict with another app or plugin.
  • A misconfiguration of the libresign settings.

Q: How can I troubleshoot the internal error during signature method switch in LibreSign? A: To troubleshoot the internal error during signature method switch in LibreSign, follow these steps:

  1. Check the libresign logs for any error messages.
  2. Verify that the libresign settings are correctly configured.
  3. Try reinstalling libresign.
  4. Check for any conflicts with other apps or plugins.

Q: How can I fix the internal error during signature method switch in LibreSign? A: To fix the internal error during signature method switch in LibreSign, follow these steps:

  1. Investigate the issue further to identify the root cause.
  2. Debug the code to determine where the error is occurring.
  3. Provide a fix to resolve the issue.
  4. Test the fix to ensure it resolves the issue.

Q: What are the next steps to resolve the internal error during signature method switch in LibreSign? A: The next steps to resolve the internal error during signature method switch in LibreSign include:

  1. Create a new issue in the LibreSign repository to track the issue.
  2. Assign the issue to a developer to investigate and fix.
  3. Provide additional information and context to the developer to aid in the investigation.
  4. Monitor the issue and provide updates as necessary.

Q: How can I prevent the internal error during signature method switch in LibreSign? A: To prevent the internal error during signature method switch in LibreSign, follow these best practices:

  1. Regularly update libresign to ensure you have the latest version.
  2. Verify that the libresign settings are correctly configured.
  3. Avoid conflicts with other apps or plugins.
  4. Monitor the libresign logs for any error messages.

Q: What is the impact of the internal error during signature method switch in LibreSign? A: The impact of the internal error during signature method switch in LibreSign includes:

  • The signing process fails when switching from the "certificate with password" method to the "identification factors" option.
  • The system displays an internal error message.
  • The issue persists even after reinstalling libresign.

Q: How can I get help with the internal error during signature method switch in LibreSign? A: To get help with the internal error during signature method switch in LibreSign, follow these steps:

  1. Check the LibreSign documentation for any relevant information.
  2. Search online for any solutions or workarounds.
  3. Reach out to the LibreSign community for support.
  4. Contact the LibreSign development team for assistance.