I just can’t understand why it failed before the l...
# suitescript
s
I just can’t understand why it failed before the logging, but succeeds now.
j
you just summarised the last 20 years of my development career in one sentence
crying sunglasses 3
s
I mean, this isn’t quantum physics, inspecting the state of the code shouldn’t change it (in theory at least). However I have seen some weird stuff over the years that just have no logical explanation.
😂 1
e
If you remove the log now, does it continue to work?
s
trying that now, actually
And yes, reverting it back to the prior code (without logging), it now works without error
facepalm 1
e
Glitch in the Matrix
n
I've experienced that scenario before albeit not specifically for selectLine. It really makes you question yourself... the first few times. netsuite
s
There’s nothing worse than staring at the code, and saying to yourself, this looks fine, why doesn’t it work? Let me just add some logging, ’cause I can’t figure out the issue.
💯 1
a
Happened to me lately a couple of times. My money is in: this is somehow related to NetSuite moving to OCI and some catching/delay going on...
☝🏻 1
j
I’ve had this recently a few times too, same scenario <thing_not_working> add logging <thing_working> remove logging <thing_still_working>
e
Maybe if we just create everything with logging, everything will work just fine
🤭 1
s
I’m going to have to change my office poster from “Have you tried turning it off and on again?” to “Have you tried adding logging and removing it?”
💡 1
a
@erictgrubaugh This is still very weird and annoying...
e
Yeah I don't think I'm disputing that
a
I almost moved an entire logic from
beforeSubmit
to
afterSubmit
and it works after putting a log, this is crazy stuff... lol.
s
When I used to program in Java, C#, and C, I was used to the idea that my “code” was not the actual executable machine or byte code, and had to explicitly compile it to make sure it was up to date. With JavaScript, you mostly don’t worry about that and expect it to be interpreted as written, except with NetSuite it becomes an issue again since they need to transpile the code before running it. The actual JavaScript file is not executed. I feel like the issue has something to do with that (though I have no way to check it).
b
its not unheard of for sdf to upload the file but not actually update the code that the script is using
so a step you can try next time is to make the update in the ui instead
s
yes, will definitely try that. I wonder if I can automate adding a line of logging, uploading, then removing it and uploading again to my SDF pipeline …
b
last time this was common, someone had a script that loaded and saved the file in script
r
this can't be it, but it does make me think of the observer effect in physics
tinfoil 1
j
awkward looking monkey puppet animated 2
😂 3