LibreSign / libresign

✍️ Nextcloud app to sign PDF documents
https://libresign.coop
GNU Affero General Public License v3.0
479 stars 55 forks source link

Internal error when signing #3238

Closed GauthierCrp closed 3 months ago

GauthierCrp commented 3 months ago

Hello,

I installed Libresign via Nextcloud Store (29.0.3). The installation seems to be ok, everything is green.

But when I try to sign a document via the "Click to sign" button, I have an internal error from the server.

image

Where can I check the log to understand what is not working ? Anyone have faced this same error ?

Many thanks, for your help.

Best Regards

vitormattos commented 3 months ago

Hi @GauthierCrp. What's the LibreSign version? Could you check your file nextcloud.log by an entry that contains the word "libresign" in the time that you click at button "confirm" ?

GauthierCrp commented 3 months ago

Hi @vitormattos

I'm using the last release 9.1.1.

Here is the Log when I click on the "Confirm" button.

image

vitormattos commented 3 months ago

Would you go to to ellipsis menu at right side, copy the raw log and send here?

metheos commented 3 months ago

I'm getting the same error when trying to sign. Installed 8.1.1 on NC 28.0.5.

Failed opening required '/var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/../data/upperCase.php' (include_path='/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/apps')

{"reqId":"8RuZbKjzhXlDkcUDs7gA","level":3,"time":"2024-06-27T14:41:25+00:00","remoteAddr":"136.22.18.121","user":"--","app":"PHP","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/30026d43-8ba2-413a-b380-1589b7de2ae5","message":"require(/var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/../data/upperCase.php): Failed to open stream: No such file or directory at /var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/Mpdf.php#1139","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36","version":"28.0.5.1","data":{"app":"PHP"}}

{"reqId":"8RuZbKjzhXlDkcUDs7gA","level":3,"time":"2024-06-27T14:41:25+00:00","remoteAddr":"136.22.18.121","user":"--","app":"libresign","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/30026d43-8ba2-413a-b380-1589b7de2ae5","message":"Failed opening required '/var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/../data/upperCase.php' (include_path='/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/apps')","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36","version":"28.0.5.1","data":{"app":"libresign"}}

{"reqId":"8RuZbKjzhXlDkcUDs7gA","level":3,"time":"2024-06-27T14:41:25+00:00","remoteAddr":"136.22.18.121","user":"--","app":"libresign","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/30026d43-8ba2-413a-b380-1589b7de2ae5","message":"[{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Handler\\/FooterHandler.php\",\"line\":82,\"function\":\"__construct\",\"class\":\"Mpdf\\\\Mpdf\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":570,\"function\":\"getFooter\",\"class\":\"OCA\\\\Libresign\\\\Handler\\\\FooterHandler\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":423,\"function\":\"getPdfToSign\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":282,\"function\":\"getFileToSing\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":142,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":108,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":230,\"function\":\"signUsingUuid\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":137,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/App.php\",\"line\":184,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Route\\/Router.php\",\"line\":315,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/ocs\\/v1.php\",\"line\":65,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/ocs\\/v2.php\",\"line\":23,\"args\":[\"\\/var\\/www\\/nextcloud\\/ocs\\/v1.php\"],\"function\":\"require_once\"}]","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36","version":"28.0.5.1","data":{"app":"libresign"}}
GauthierCrp commented 3 months ago

A PHP Error :

{"reqId":"hyHu48rhAyMvpAOEV3g9","level":3,"time":"2024-06-27T13:25:25+00:00","remoteAddr":"192.168.1.30","user":"Gauthier","app":"PHP","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/50d9c44e-6ffe-42bd-954d-f583b1113b74","message":"require(/var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/../data/upperCase.php): Failed to open stream: No such file or directory at /var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/Mpdf.php#1139","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.3.4","data":{"app":"PHP"},"id":"667d7d6701f3b"}

and then the libresign error :

{"reqId":"hyHu48rhAyMvpAOEV3g9","level":3,"time":"2024-06-27T13:25:25+00:00","remoteAddr":"192.168.1.30","user":"Gauthier","app":"libresign","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/50d9c44e-6ffe-42bd-954d-f583b1113b74","message":"Failed opening required '/var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/../data/upperCase.php' (include_path='/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/apps')","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.3.4","data":{"app":"libresign"},"id":"667d7d6701f34"}

and the second one for Libresign 👍

{"reqId":"hyHu48rhAyMvpAOEV3g9","level":3,"time":"2024-06-27T13:25:25+00:00","remoteAddr":"192.168.1.30","user":"Gauthier","app":"libresign","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/50d9c44e-6ffe-42bd-954d-f583b1113b74","message":"[{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Handler\\/FooterHandler.php\",\"line\":82,\"function\":\"__construct\",\"class\":\"Mpdf\\\\Mpdf\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":570,\"function\":\"getFooter\",\"class\":\"OCA\\\\Libresign\\\\Handler\\\\FooterHandler\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":423,\"function\":\"getPdfToSign\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":282,\"function\":\"getFileToSing\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":142,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":108,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":232,\"function\":\"signUsingUuid\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":138,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/App.php\",\"line\":184,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Route\\/Router.php\",\"line\":338,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/ocs\\/v1.php\",\"line\":66,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/ocs\\/v2.php\",\"line\":23,\"args\":[\"\\/var\\/www\\/nextcloud\\/ocs\\/v1.php\"],\"function\":\"require_once\"}]","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.3.4","data":{"app":"libresign"},"id":"667d7d6701f28"}

**Perhaps an idea :

The "remoteAddr":"192.168.1.30" mentionned at the beginning of the error, is the ip adress of my local reverse proxy. not the ip adress of the Nextcloud server.

I don't know, if it can help, but.**

Thanks !

ferox commented 3 months ago

Seems an issue with mpdf.

Mpdf main class inside vendor dir is missing.

Would fix the issue running composer install inside de libresign plugin?

aztbdu commented 3 months ago

Seems an issue with mpdf.

Mpdf main class inside vendor dir is missing.

Would fix the issue running composer install inside de libresign plugin?

same problem. you solved?

mezzomokaue commented 3 months ago

Anyone resolved this problem? I had the same error...

aztbdu commented 3 months ago

A PHP Error :

{"reqId":"hyHu48rhAyMvpAOEV3g9","level":3,"time":"2024-06-27T13:25:25+00:00","remoteAddr":"192.168.1.30","user":"Gauthier","app":"PHP","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/50d9c44e-6ffe-42bd-954d-f583b1113b74","message":"require(/var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/../data/upperCase.php): Failed to open stream: No such file or directory at /var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/Mpdf.php#1139","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.3.4","data":{"app":"PHP"},"id":"667d7d6701f3b"}

and then the libresign error :

{"reqId":"hyHu48rhAyMvpAOEV3g9","level":3,"time":"2024-06-27T13:25:25+00:00","remoteAddr":"192.168.1.30","user":"Gauthier","app":"libresign","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/50d9c44e-6ffe-42bd-954d-f583b1113b74","message":"Failed opening required '/var/www/nextcloud/apps/libresign/vendor/mpdf/mpdf/src/../data/upperCase.php' (include_path='/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/apps')","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.3.4","data":{"app":"libresign"},"id":"667d7d6701f34"}

and the second one for Libresign 👍

{"reqId":"hyHu48rhAyMvpAOEV3g9","level":3,"time":"2024-06-27T13:25:25+00:00","remoteAddr":"192.168.1.30","user":"Gauthier","app":"libresign","method":"POST","url":"/ocs/v2.php/apps/libresign/api/v1/sign/uuid/50d9c44e-6ffe-42bd-954d-f583b1113b74","message":"[{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Handler\\/FooterHandler.php\",\"line\":82,\"function\":\"__construct\",\"class\":\"Mpdf\\\\Mpdf\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":570,\"function\":\"getFooter\",\"class\":\"OCA\\\\Libresign\\\\Handler\\\\FooterHandler\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":423,\"function\":\"getPdfToSign\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Service\\/SignFileService.php\",\"line\":282,\"function\":\"getFileToSing\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":142,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Service\\\\SignFileService\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/apps\\/libresign\\/lib\\/Controller\\/SignFileController.php\",\"line\":108,\"function\":\"sign\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":232,\"function\":\"signUsingUuid\",\"class\":\"OCA\\\\Libresign\\\\Controller\\\\SignFileController\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":138,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/App.php\",\"line\":184,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Route\\/Router.php\",\"line\":338,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/ocs\\/v1.php\",\"line\":66,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"\\/var\\/www\\/nextcloud\\/ocs\\/v2.php\",\"line\":23,\"args\":[\"\\/var\\/www\\/nextcloud\\/ocs\\/v1.php\"],\"function\":\"require_once\"}]","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.3.4","data":{"app":"libresign"},"id":"667d7d6701f28"}

**Perhaps an idea :

The "remoteAddr":"192.168.1.30" mentionned at the beginning of the error, is the ip adress of my local reverse proxy. not the ip adress of the Nextcloud server.

I don't know, if it can help, but.**

Thanks !

any progress?

vitormattos commented 3 months ago

Hi, I think that this problem was solved at newest release. I made a big change at setup of LibreSign to be more easy and to clean old versions of dependencies and this made a impact at build process to publis at Nextcloud app store.

Thanks for all by report with details about the problem.

vitormattos commented 3 months ago

Explaining more detailed the problem:

mpdf is used to put the footer at all pages. The footer is a HTML template with qrcode. The mpdf project is used to create a watermark page with the footer and pdftk is used to merge the watermark into the PDF file.

mdpf is a very big project because have a lot of binaries files of ttf fonts. Packing LibreSign with all files of mpdf made a very big problem because the pack of Libresign got from near by 27.2 MB to 97.8 MB. To go back to 27.2 MB I removed the ttf fonts but this only is made at pack process and was removed a bit more files than necessary. To make all LibreSign lovers more happy, this was fixed at latest release and mpdf is working fine now.

vitormattos commented 3 months ago

We follow needing help with funding to maintain the minimum to go ahead with the development of LibreSign.

If you love this app and if this app help the company that you work to reduce the cost with digital signatures, to have a very secure environment, don't hexitate to return this to make possible to us to pay our bills sending a recurrency help by GitHub sponsors.

I don't know if was annouced at other countries but here, im Brazil, we got very strong rains and a lot of families lost your houses, business, firends and parents by the water. We have a member of our team that lost a lot of furnitues and helping LibreSign you also will help the victims of waters in south of Brazil.

All ideas to help LibreSign to be the best signature app is welcome! We do this helping peoples because we love open source projects and the cooperativism.

Closing this issue as solved.

If this issue persists, don't hesitate to open a new issue making reference to this.

[!NOTE]

If you like this app, don't hesitate to help us

Ways to help this project: