Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when signing #827

Closed
kevinbrown1980 opened this issue Jun 6, 2022 · 5 comments
Closed

Error when signing #827

kevinbrown1980 opened this issue Jun 6, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@kevinbrown1980
Copy link

I installed the app then followed the steps in the terminal.

When trying to sign a pdf document I add the document, add an email address and send it for signing and I get the below error

count(): Argument #1 ($value) must be of type Countable|array, null given

Environment information

  • OS: Docker
  • Nextcloud AIO
@kevinbrown1980 kevinbrown1980 added the bug Something isn't working label Jun 6, 2022
@inhji
Copy link

inhji commented Jun 13, 2022

I can confirm, getting the same error when trying to send a request.

OS: Ubuntu 20.04
Nextcloud: 23

I've set up LibreSign with the libresign:install and libresign:configure commands, not using docker.

{
  "reqId": "Nc6283MRMexy075FuRjg",
  "level": 2,
  "time": "2022-06-13T12:42:15+00:00",
  "remoteAddr": "xx.xx.xx.xx",
  "user": "admin",
  "app": "no app in context",
  "method": "GET",
  "url": "/index.php/core/preview.png?file=%2FreturnsLabelGroup_20220530090532.pdf&x=100&y=100",
  "message": "Host xx.xx.xx.xx was not connected to because it violates local access rules",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
  "version": "23.0.3.2"
}
  "reqId": "OTXe2qqIXsrLFJ2rU60N",
  "level": 3,
  "time": "2022-06-13T12:42:37+00:00",
  "remoteAddr": "xx.xx.xx.xx",
  "user": "admin",
  "app": "PHP",
  "method": "POST",
  "url": "/index.php/apps/libresign/api/0.1/sign/register",
  "message": "Trying to access array offset on value of type null at /var/www/html/apps/libresign/lib/Service/PdfParserService.php#39",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
  "version": "23.0.3.2",
  "exception": {
    "Exception": "Error",
    "Message": "Trying to access array offset on value of type null at /var/www/html/apps/libresign/lib/Service/PdfParserService.php#39",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/apps/libresign/lib/Service/PdfParserService.php",
        "line": 39,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::"
      },
      {
        "file": "/var/www/html/apps/libresign/lib/Service/SignFileService.php",
        "line": 240,
        "function": "getMetadata",
        "class": "OCA\\Libresign\\Service\\PdfParserService",
        "type": "->"
      },
      {
        "file": "/var/www/html/apps/libresign/lib/Service/SignFileService.php",
        "line": 222,
        "function": "getFileMetadata",
        "class": "OCA\\Libresign\\Service\\SignFileService",
        "type": "->"
      },
      {
        "file": "/var/www/html/apps/libresign/lib/Service/SignFileService.php",
        "line": 172,
        "function": "saveFile",
        "class": "OCA\\Libresign\\Service\\SignFileService",
        "type": "->"
      },
      {
        "file": "/var/www/html/apps/libresign/lib/Controller/SignFileController.php",
        "line": 88,
        "function": "save",
        "class": "OCA\\Libresign\\Service\\SignFileService",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 217,
        "function": "requestSign",
        "class": "OCA\\Libresign\\Controller\\SignFileController",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 126,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 157,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1006,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/html/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/html/lib/private/Log/ErrorHandler.php",
    "Line": 92,
    "CustomMessage": "--"
  }
}

@inhji
Copy link

inhji commented Jun 13, 2022

I did some testing, and updated my installation to nextcloud 24.0.1, reinstalled the cfssl, java, Jsignpdf and libresign-cli.
I also verified, that LibreSign app was updated to 5.1.1.
Still getting the same error when creating a request and trying to send it to somebody.

Unfortunately I don't know how to check the installed version of libresign-cli. Is there a way to check that?

@inhji
Copy link

inhji commented Jun 13, 2022

I realized that I had not setup email delivery, after doing so, the error still persists. Anything else I could check?

If you need additional information, I'd be happy to help.

Thanks!

@vitormattos
Copy link
Member

Update the LibreSign to the newest version, this problem was solved in version 5.1.2, the newest version is 5.1.3

@inhji
Copy link

inhji commented Aug 15, 2022

I have updated LibreSign to the version 5.1.4. I have also reinstalled JSignPDF with the commands:

occ libresign:uninstall --jsignpdf
occ libresign:install --jsignpdf

When I upload a pdf, I get this message (apparently added in #879):

Impossible get metadata from this file. Check if you installed correctly the libresign-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants