Hi All, in a MR script in GetInput I’m iterating t...
# suitescript
m
Hi All, in a MR script in GetInput I’m iterating through a CSV file, parsing the line data into key-value pairs and pushing it to an array. This is causing an unexpected error when the file is a bit bigger (my file has 6MB but it’s sometimes also happening with files over 1MB). It’s failing in the iterator.each function, not while running any of the parsing logic. It’s also failing randomly in different places of the file. I keep running it repeatedly for the same file and sometimes it fails when processing line 12k, sometimes 15k, sometimes 22k, then again 14k. Sometimes it’s even able to process the whole file with 40k rows. Any idea, please?
Copy code
{
   type: "error.SuiteScriptError",
   name: "UNEXPECTED_ERROR",
   message: null,
   stack: [
      "next(N/file)",
      "getInputData(/********masked***********)"
   ],
   cause: {
      type: "internal error",
      code: "UNEXPECTED_ERROR",
      details: null,
      userEvent: null,
      stackTrace: [
         "next(N/file)",
         "getInputData(/********masked***********)"
      ],
      notifyOff: false
   },
   id: "2bdd25aa-979d-4c6a-a7f0-ceee3e9758ce-2d323032322e30352e3137",
   notifyOff: false,
   userFacing: false
}
n
Someone else may be able to confirm but I think you can contact NS Support with that long string id and they can look "behind the curtain" and may be able to advise what the issue is.
m
@NElliott we’ve done that a couple weeks ago and they have marked it as an enhancement request. We’re now trying to find out if anyone else is having this issue and a possible workaround
n
An enhancement request for an "unexpected error"? Really? netsuite
m
Sounds both funny and sad, doesn’t it?
n
It's all kinds of messed up and nothing less than I'd expect from them on reflection.😖 Only thing I can suggest is, if it's 2.1, maybe try 2.0?
m
Haven’t thought about that. Good shout. It was actually 2.x, let me try different versions.
🤞 1
🥰 1
@NElliott I don’t believe it. 2.0 failed, but now I changed it to 2.1 and it worked. Will try a couple more times to see if it was just a coincidence (it just sometimes worked- even before)
n
OK I'm not holding my breathe but good luck!
👍 1
m
@NElliott seems like it’s worked. You’re my hero 🙂
🤭 1
r
Seems interesting. If you find the reason or the solution do let us know.