Change Workflow Rule Error

Can someone help me with the following error. It occurs when a user tried to run a workflow rule that creates a PDF report. Others have been using the report before and after so not sure the issue.

Error: โ€œJeenee.DataTypes.SpreadsheetException: The underlying connection was closed: An unexpected error occurred on a receive. โ†’ The HTML to PDF conversion web service failed to convert the HTML document to PDF for application โ€˜HarvestInspectionAzure-634705-660349 (02eef9fb-d7fd-4456-99db-4771077a8861)โ€™ due to: The underlying connection was closed: An unexpected error occurred on a receive. โ€”> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. โ€”> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. โ€”> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host\r\n at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)\r\n โ€” End of inner exception stack trace โ€”\r\n at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)\r\n at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)\r\n at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)\r\n โ€” End of inner exception stack trace โ€”\r\n at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)\r\n at Nirvana.Data.PDFEncoder.Encode(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize) in q:\git\Jeenee\V2API\Workflow\Common\PDFEncoder.cs:line 93\r\n โ€” End of inner exception stack trace โ€”\r\n at Nirvana.Data.PDFEncoder.Encode(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize) in q:\git\Jeenee\V2API\Workflow\Common\PDFEncoder.cs:line 110\r\n at Nirvana.Data.WorkflowActionResultEmail.<>c__DisplayClass59_0.b__0() in q:\git\Jeenee\V2API\Workflow\ActionResult\WorkflowActionResultEmail.cs:line 197โ€

0 8 695
8 REPLIES 8

Steve
Platinum 4
Platinum 4

I suggest you reach out to support@appsheet.com directly for this one.

This error indicates that the HTML to PDF conversion service failed when trying to convert your attachment from HTML to PDF.

When the workflow rule runs:

  1. We read the attachment template document and convert it to HTML.
  2. We fill in the HTML document by replacing the variables in your template with the corresponding data values from your tables. This yields the filled in HTML document.
  3. We send the resulting HTML document to a web based HTML to PDF conversion service. After converting the HTML to PDF, the web based conversion service returns the PDF document.
  4. We attach the PDF document to the email as an attachment.
  5. We send the email to the web based email delivery service.

The error indicates that step 3 failed. This happens very rarely. I have no idea exactly why the conversion failed.

I can try to replay the update that triggered the workflow rule. This should fire the workflow rule, recreate the HTML document, and allow me to see if I can reproduce the HTML to PDF conversion problem.

Excellent explanation of how the workflow rule works! This only occurs occasionally and I cannot recreate when I try. Emailing with Dinh, it may be a connectivity issue. My users are foresters often in poor cell location areas (Offline use is a big reason I chose AppSheet). I am going to watch closely and see if I can tie it to connection issues.

Hi Stephen,

The error is happening between our AppSheet servers and the HTML to PDF web service in New Zealand.

I doubt that connectivity with your client devices is contributing to the problem.

I suspect that one of two things is occurring:

  1. It might be an intermittent connectivity issue with the HTML to PDF web service.
  2. It might be a symptom that the HTML to PDF web service is โ€œchokingโ€ on something contained in the HTML it is trying to convert to PDF.

I was suggesting that we โ€œreplayโ€ the update because it might prove or disprove the second possibility. I assume that replaying the update would recreate the same HTML content that the original update created. If the HTML to PDF web service โ€œchokedโ€ on that, then we would know that it was HTML content related. I am not sure how likely this is, but it might be worth trying. Would not want to โ€œreplayโ€ the update without your permission. It runs the risk of re-applying an outdated change to your table.

Feel free to replay. I did the same after the user notified me and it ran with no issue. I appreciate you looking into this.

Thank you,
Stephen Logan

Hi,

I have just received an error like this twice this morning. The concern I have is that there is no alert that itโ€™s failed unless I know itโ€™s been sent and didnโ€™t arrive. How do I get alerts when WorkFlows failed? Is there a cure for this. The error message is

Error:
โ€œJeenee.DataTypes.SpreadsheetException: The remote server returned an error: (400) Bad Request. โ†’ The HTML to PDF conversion web service failed to convert the HTML document to PDF for application โ€˜GriffApp-1353866 (4621daba-f1a2-437e-a600-88f43ab47a5b)โ€™ despite 3 retries due to: The remote server returned an error: (400) Bad Request. โ€”> System.Net.WebException: The remote server returned an error: (400) Bad Request.\r\n at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)\r\n at V2API.Workflow.Pdf.PdfEncoder.EncodePdfRocket(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n โ€” End of inner exception stack trace โ€”\r\n at V2API.Workflow.Pdf.PdfEncoder.EncodePdfRocket(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n at V2API.Workflow.Pdf.PdfEncoder.Encode(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n at Nirvana.Data.TaskResultEmail.<>c__DisplayClass73_0.b__0()โ€

Please contact support@appsheet.com for help with the error.

Thereโ€™s no built-in way to get alerted that I know of. You might be able to contrive something with workflows or reports, but Iโ€™ve never tried myself, so have no guidance to offer.

Thanks Steve.

Top Labels in this Space