[GH-ISSUE #1360] Sealing and Resealing failing (not a certificate error) #381

Closed
opened 2026-02-26 18:46:46 +03:00 by kerem · 2 comments
Owner

Originally created by @psharma04 on GitHub (Sep 22, 2024).
Original GitHub issue: https://github.com/documenso/documenso/issues/1360

Issue Description

Documents are unable to be sealed: "Expected instance of PDFArray, but got instance of PDFRawStream". This does not appear to be a certificates problem.

Steps to Reproduce

  1. Upload a PDF (generated by MacOS Preview)
  2. Have 11 people sign it
  3. Try to download it
  4. When the button isn't available, go to the admin panel and click "reseal document"

Expected Behavior

The document should be signed, and the download button should be available.

Current Behavior

documenso-1  | resealDocument error Error: Expected instance of PDFArray, but got instance of PDFRawStream
documenso-1  |     at new UnexpectedObjectTypeError (/app/node_modules/pdf-lib/cjs/core/errors.js:38:24)
documenso-1  |     at PDFContext.lookupMaybe (/app/node_modules/pdf-lib/cjs/core/PDFContext.js:74:15)
documenso-1  |     at PDFDict.lookupMaybe (/app/node_modules/pdf-lib/cjs/core/objects/PDFDict.js:51:53)
documenso-1  |     at PDFPageLeaf.Annots (/app/node_modules/pdf-lib/cjs/core/structures/PDFPageLeaf.js:34:21)
documenso-1  |     at Y (/app/apps/web/.next/server/chunks/9182.js:1:30625)
documenso-1  |     at A (/app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:55041)
documenso-1  |     at async /app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:124633
documenso-1  |     at async resolveMiddleware (file:///app/node_modules/@trpc/server/dist/index.mjs:420:30)
documenso-1  |     at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32)
documenso-1  |     at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32)

Screenshots (optional)

CleanShot 2024-09-22 at 12 33 20@2x

Operating System [e.g., Windows 10]

Ubuntu 22.04 (running in Docker)

Browser [e.g., Chrome, Firefox]

Firefox

Version [e.g., 2.0.1]

1.7.0

Please check the boxes that apply to this issue report.

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
  • I want to work on creating a PR for this issue if approved
Originally created by @psharma04 on GitHub (Sep 22, 2024). Original GitHub issue: https://github.com/documenso/documenso/issues/1360 ### Issue Description Documents are unable to be sealed: "Expected instance of PDFArray, but got instance of PDFRawStream". This does not appear to be a certificates problem. ### Steps to Reproduce 1. Upload a PDF (generated by MacOS Preview) 2. Have 11 people sign it 3. Try to download it 4. When the button isn't available, go to the admin panel and click "reseal document" ### Expected Behavior The document should be signed, and the download button should be available. ### Current Behavior ```javascript documenso-1 | resealDocument error Error: Expected instance of PDFArray, but got instance of PDFRawStream documenso-1 | at new UnexpectedObjectTypeError (/app/node_modules/pdf-lib/cjs/core/errors.js:38:24) documenso-1 | at PDFContext.lookupMaybe (/app/node_modules/pdf-lib/cjs/core/PDFContext.js:74:15) documenso-1 | at PDFDict.lookupMaybe (/app/node_modules/pdf-lib/cjs/core/objects/PDFDict.js:51:53) documenso-1 | at PDFPageLeaf.Annots (/app/node_modules/pdf-lib/cjs/core/structures/PDFPageLeaf.js:34:21) documenso-1 | at Y (/app/apps/web/.next/server/chunks/9182.js:1:30625) documenso-1 | at A (/app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:55041) documenso-1 | at async /app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:124633 documenso-1 | at async resolveMiddleware (file:///app/node_modules/@trpc/server/dist/index.mjs:420:30) documenso-1 | at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32) documenso-1 | at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32) ``` ### Screenshots (optional) ![CleanShot 2024-09-22 at 12 33 20@2x](https://github.com/user-attachments/assets/67184695-221f-45e9-8c63-d1be3a7b0119) ### Operating System [e.g., Windows 10] Ubuntu 22.04 (running in Docker) ### Browser [e.g., Chrome, Firefox] Firefox ### Version [e.g., 2.0.1] 1.7.0 ### Please check the boxes that apply to this issue report. - [X] I have searched the existing issues to make sure this is not a duplicate. - [X] I have provided steps to reproduce the issue. - [X] I have included relevant environment information. - [X] I have included any relevant screenshots. - [X] I understand that this is a voluntary contribution and that there is no guarantee of resolution. - [ ] I want to work on creating a PR for this issue if approved
Author
Owner

@github-actions[bot] commented on GitHub (Sep 22, 2024):

Thank you for opening your first issue and for being a part of the open signing revolution!

One of our team members will review it and get back to you as soon as it possible 💚

Meanwhile, please feel free to hop into our community in Discord

<!-- gh-comment-id:2365426955 --> @github-actions[bot] commented on GitHub (Sep 22, 2024): Thank you for opening your first issue and for being a part of the open signing revolution! <br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
Author
Owner

@dguyen commented on GitHub (Nov 6, 2024):

Hey @psharma04

I tried to replicate this by creating a document with 11 recipients, and completing it. There didn't seem to be any issue on my end (production)

Are you encountering this with all documents you're trying to sign? Does it only occur on the 11th recipient?

<!-- gh-comment-id:2459418786 --> @dguyen commented on GitHub (Nov 6, 2024): Hey @psharma04 I tried to replicate this by creating a document with 11 recipients, and completing it. There didn't seem to be any issue on my end (production) Are you encountering this with all documents you're trying to sign? Does it only occur on the 11th recipient?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#381
No description provided.