Can anyone aware of the the change that NetSuite m...
# suitescript
j
Can anyone aware of the the change that NetSuite made to NApiVersion 2.x. yesterday that caused the ShipHawk outage? Their response is posted here https://status.shiphawk.com/
m
It's back today. RF-Smart as well now.
j
Yes, just got status updates. Fortunately we have not fully turned off our old Shipping software from TrueCommerce. As bad as that platform is atleast it is working today.
m
If you haven't updated bundles in a good amount of time, you are alright.
All the functions erroring are very specific to SS2.1 (ES6)
j
We are running latest bundle for SH but fortunately are still on an old bundle for RF Smart so at least WMS is working.
m
We are a month or two old bundle on RFSmart... our issues currently seem to be with not being able to find product in bins/locations.
I'm sure there are more issues... just the ones I've been notified of thus far.
j
the error we get from shiphawk is related to a find function as well.
m
Yep. That's an ES6 function;
Your new Sales Orders are likely also not in ShipHawk
any edit to a fulfillment will give an error.
fun stuff
s
Is the blame on these bundle providers or do we suspect something is wrong with the NetSuite javascript runtime?
m
From what I have heard... it is NetSuite making changes without notifying anyone.
☝🏻 1
The fixes yesterday required a rollback at NetSuite
Now we have new ones.
j
Yes, we are now missing like 1.5 days worth of orders in ShipHawk we had a brief period after NetSuite rolled back the changes with no errors but they started up again an hour or two ago.
s
Is this NS making 2.x scripts run under the 2.1 engine?
m
Not sure. An example error for us is the find function in ES6, is a @NApiVersion 2.1 UE Script.
RF-Smart Update: [Identified] A NetSuite technical update promoted to Production has impacted third party applications including RF-SMART. We are working with NetSuite Support and have a case number (Case #4492025: JavaScript Error In Suitelet) at a U2 status. The fix is currently being rolled back and NetSuite Support expects things to be working in a couple hours once it propagates to their data centers. We are monitoring the situation closely and will update this page with new information as we have it. If you are experiencing error messages similar to "TypeError: Class constructor <<function name>> cannot be invoked without 'new'", we advise that a case is logged directly with NetSuite while referencing the above case to assist NetSuite with determining the impact.
s
by
find
function do you mean
Array.find()
?
I don't see how that error message described above would apply but won't be the first NS error that confused me.
m
Yea, not sure... just what we see. Could be something underlying.
s
I'd probably check to ensure you're not trying to call a constructor somewhere without
new
🙂
m
It's not me... but the third-party applications.
s
Maybe they should have used NFT.
j
function afterSubmit(context) {
RemainingUnitUsageLogger.logRemainingUsage("shiphawk_update_fulfillment", "ON START")
log.debug({ title: "afterSubmit", details: context });
if (!isEventValid(context)) {
return
}
const fulfillmentId = context.newRecord.getValue({ fieldId: 'id' });
const orderId = context.newRecord.getValue({ fieldId: 'createdfrom' });
let fulfillment;
if (context.type == context.UserEventType.DELETE) {
fulfillment = new ItemFulfillment(context.newRecord);
if (fulfillment.settings.isSyncIFAsOrders) {
fulfillment.asOrder.delete();
} else if (orderId) {
deleteRequest(orderId, fulfillmentId, runtime.accountId);
}
return;
};
fulfillment = ItemFulfillment.find(fulfillmentId);
fulfillment.sync();
};
That is the Ship hawk function that was failing at the second to last line. fulfillment = ItemFulfillment.find(fulfillmentId);
s
interesting. the
new ItemFulfillment(context.newRecord)
looks just like NFT, but obviously they have something else going on there (i.e. NFT has no
.find()
on the
ItemFulfillment
class). The code doens't tell us what
.find()
does in that case. Maybe they have
ItemFulfillment extends Array
?
I tend to never subclass the native JS types, so maybe that's not what they are doing. Is that code open source? I'd be curious to see the implementation of
ItemFulfillment
b
fair chance they are using Classes
👍 1
s
If so, and
find
is a static method then it's the internals of that which is likely blowing up.
j
They are using classes. The code is not locked, but I do not believe it is "Open Source" do not want to share things I shouldn't just trying to understand what is happening.
s
if you have the source for
ItemFulfillment.find()
you could learn more by inspecting it.
j
U2 defect logged NetSuite has acknowledged Defect 651122: SuiteScript > RESTLetScript > TypeError: Class constructor CounterEntry cannot be invoked without 'new' which is impacting ShipHawk and other SDN Developers.
s
ok, presumably they have
CounterEntry()
somewhere which will fail (and should) if
CounterEntry
is a class.
If you see a plain call to CounterEntry() then it's a shipwire defect, not a NS defect.
(assuming CounterEntry is indeed a class)
j
message has been deleted