500 Internal Server Error on POST https://api.pdfjs.express/xfdf/merge (Aug 9, 2024 | macOS)

Description:

We are experiencing a 500 Internal Server Error when making a POST request to the following endpoint as of Friday, August 9th. This is similar to the error we encountered previously.

Endpoint: https://api.pdfjs.express/xfdf/merge
HTTP Method: POST

Additional details:

  • The error started occurring recently (August 9, 2024)
  • This endpoint was previously working as expected
  • No changes were made to our implementation before the error started occurring

Steps to reproduce:

  1. Send a POST request to https://api.pdfjs.express/xfdf/merge
  2. Observe the 500 Internal Server Error response

Expected behavior:
The API should process the request and return a successful response.

Actual behavior:
The API returns a 500 Internal Server Error.

Impact:
This issue is preventing us from merging XFDF data, which is critical for our application’s functionality.

Screenshots:



Link to the previously reported issue (Occurred on July 11):

NOTE:
This issue exists on MacBook (macOS) devices, but the merge API appears to function correctly on Windows.

Hi there,

It looks like you are getting error code 27, which indicates that a client side key was provided for a server side request:

Could you please verify if the key was passed correctly on your end?

Best regards,
Kevin Kim

Hi @kkim, we can confirm that the provided keys are valid. Additionally, the same request with the same merge API is working fine on Windows.

Hi there,

I am able to use the merge API using MacOS with the following snippet, could you please try it out and see if it works for you?

                const utils = new ExpressUtils();
                const xfdf = await annotationManager.exportAnnotations({ links: false, widgets: false });
                console.log(xfdf);
                const fileData = await documentViewer.getDocument().getFileData({});
           
                const resp = await utils
                    .setFile(fileData)
                    .setXFDF(xfdf)
                    .merge();
                const mergedBlob = await resp.getBlob();
                saveAs(mergedBlob, 'myfile.pdf')
                console.log(mergedBlob);

Best regards,
Kevin Kim