ShipHawk NetSuite SuiteApp users ran into an issue with item fulfillments and order syncing between NetSuite and ShipHawk. When NetSuite users saved an Item Shipment record, the error is shown: TypeError: ItemFulfillment.find is not a function
This was first reported at 9:12 pm PST on Wednesday 11/17 and affected all customers that were using ShipHawk bundle with version >=2021.6.0.
The issue was caused by a change made by NetSuite in the processing of NApiVersion 2.1 scripts, which ShipHawk bundles 2021.6.0+ are using, and the incident lasted until NetSuite reverted the change at 11:30 am PST Sunday 11/21.
On 11/17, NetSuite changed the way how they process scripts with NApiVersion 2.1 without notice, to fix a known and unrelated defect (NetSuite defect #647251). When this happened, ShipHawk SuiteApp bundles 2021.6.x and higher could no longer sync orders or item fulfillments between NetSuite and ShipHawk.
ShipHawk bundle could not load dependencies correctly; therefore, it was not able to call static functions required to work properly and caused the code to raise an exception TypeError: ItemFulfillment.find is not a function [at Object.afterSubmit (/SuiteBundles/Bundle 161164/ShipHawk (2)/event_scripts/shiphawk-update-fulfillment-event-script.js:55:35)]
.
Order and Item Fulfillments could not sync between NetSuite and ShipHawk.
This incident affected all NetSuite customers who using ShipHawk bundle - 2021.6.x and 2021.7.x.
A total of 12 urgent cases were submitted to ShipHawk during the impact window.
The incident was reported first time at 9:12 pm PST, Wednesday 11/17.
More reports were submitted starting from 4:21 am PST, Thursday 11/18.
During this incident, ShipHawk customer success and engineering teams worked around the clock to keep impacted customers informed, identify the root cause and search for workarounds.
ShipHawk and NetSuite engineering resources worked to identify the issues and work towards a resolution. NetSuite discovered two defects (defect #651122 and #651305) which they ultimately resolved. ShipHawk identified both near-term and long-term options to mitigate this in the future, both of which would have materially delayed resolution. As such, ShipHawk Engineering decided the best path was to collaborate with NetSuite as they reverted the changes introduced on 11/17 because this was determined to be the fastest way to get joint customers operational.
Case #4491650 was submitted to NetSuite Support, and as a result, NetSuite created 2 defects that were escalated to U2 Critical priority:
Defect 651122SuiteScript > RESTLet Script > TypeError: Class constructor CounterEntry cannot be invoked without 'new'
Defect 651305 SuiteScript > RESTLet Script > TypeError: Class constructor CounterEntry cannot be invoked without 'new'
.
NetSuite ultimately reverted their changes in the processing of NApiVersion=2.1 scripts. After clearing cached files, impacted customers were able to sync orders and item fulfillments between ShipHawk and NetSuite.
All times are PST.
Wednesday 11/17
Thursday 11/18
Friday 11/19
SuiteScript > RESTLet Script > TypeError: Class constructor CounterEntry cannot be invoked without 'new'
SuiteScript > RESTLet Script > TypeError: Class constructor CounterEntry cannot be invoked without 'new'
Saturday 11/20
Sunday 11/21
The instability we saw in customer accounts was introduced because some of our SuiteApp scripts with Public scope return classes. After the incident was resolved, NetSuite advised us that this is only supported for Same Account scope. Had we used this alternative scope, it may have mitigated the issue.