Common Errors/Issues

Best practices when troubleshooting errors or issues for escalation with engineering or another technician.

  • Check the logs and capture the specific error message text (with an export of the logs or screenshot)
  • Capture the complete S5webapi INI file settings
  • Any other relevant information such as the operating systems (Are windows updates applied)

Getting POS Failure! {“error”:“Assertion failure (R:\system5\projects\prgs\FullInvoice.pas, line 50886)”} when pushing an order through WEB API .

Reasons : The JSON that is being used is invalid.

Only 1 InvoiceLines Array is allowed. The Description must only have 255 characters MAXIMUM! The database will throw away anything longer. The Invoice Comment must not contain invalid characters. (Carriage Returns and Line Feeds)

Additional information: You do not need to include the InvoiceCustomer / InvoiceShipTo unique numbers AND the InvoiceShipping / InvoiceBilling One or the other is all that is required. If you know the Unique Numbers, use them. The system will ignore InvoiceShipping and InvoiceBilling data. If you don’t, then use the InvoiceShipping and InvoiceBilling. The system will look-up the Account records or create them.

Here is what it should look like:

{  "Invoice": [    {      "InvoiceHeader": {        "InvoiceSubTotal": 87,        "InvoiceTaxTotal": 8.97,        "InvoiceOrdered": "2019-08-13T16:15:11.282Z",        "InvoiceDate": "2019-08-13T16:15:11.282Z",        "InvoiceType": "W",        "InvoiceSubType": "O",        "InvoiceDepartment": 0,        "InvoiceBookMonth": "2019-08-13T16:15:11.282Z",        "InvoiceCustomer": 31599,        "InvoiceShipTo": 31599,        "InvoiceSalesman": 1,        "InvoiceComment": "This is a test order. Please do not process! Item 1: This is a delivered product. Delivery 321 elm street  60607 Business. Product Name: Arrangement. Product Options: Color: Earth - 0, Size: Large - 20, Delivery: 60607 - 17. Recipient: TesterChicago, 3332221111, Card message: Hi, nnLook forward to you receiving these testing flowers.nnJoe. Delivery date 08/31/19."      },      "InvoiceTenders": [        {          "Type": "O",          "Amount": 95.92        }      ],      "InvoiceLines": [        {          "PartUnique": 15868,          "Ordered": 1,          "Price": 50,          "Description": "This is a test order. Please do not process!"        },        {          "Part": "SHIPPING",          "Ordered": 1,          "Price": 17,          "Description": "SHIPPING/DELIVERY"        }      ]    }  ],  "ConnectionInfo": {    "TerminalNumber": 0  } }

You can prevent all of these problems by simply checking the JSON payload in a JSON editor like:

Adding Newline Feed on Invoice Comment

In /addInvoice method, you can add Invoice Comment. In the parameter, look for this field “InvoiceComment” and add your comment.

To add a new line feed, add this \\n in the comment.

Access Violation when making API call

When troubleshooting the s5webAPI if receiving an access violation when making an API call, XML may require re-installation.

Getting a User Security Error on WordsToo.btr

If you are presented with a “User # Security Error on WordsToo.btr. User Record has been tampered with” message.

The reason for this error message is due to the user account being locked out or expired and the S5webapi is trying to login using those credentials.

To resolve this issue:

  1. Go to Setup Wizard > Users and Security > Go to user # (It is the WEB API log in)
  2. Uncheck the lockout tick box or reset the password
  3. Ensure the password is the same in the WebAPI.INI configuration
  4. Restart the S5WebAPI
  5. Optionally test the S5WebAPI using swagger if configured

LogAnaylytics:Socket Connection Error 10060

This happens when the Log Analytics workspace is unreachable. The API service keeps trying to connect to the workspace which causes it to use too much CPU on the client's server.

As a workaround, we removed the Log Analytics argument from the ini file.

Once it is removed, CPU usage goes back to normal.