Code piece issue : /root/noop.js required

Dear all,

I’m facing since yesterday an issue with the Code piece. I’m building my flow, th first test run of the Code piece works fine, but any other test run failed with the following error :

Cannot find module ‘/root/codes/Gm7bxipYIZrKkz5vI1SmV/step_7/index.js’\nRequire stack:\n- /root/noop.js

I have to wait for some long minutes, refresh my session, to get it working again, one time, the again the issue.

Is this a bug or a known problem ?

Many thanks for your help !

Chris

Update : I get the issue resolved when enabling the “Auto Retry on Failure” switch. So it lowerize the impact, but there’s something weird with this issue, no ?

Hi @ChrisHK

Can you please dm me what you have in the code snippet, I will investigate that

Sure, you’ll get the DM in a couple of minutes ! Thanks @abuaboud

@abuaboud : now the code pieces is always failing, even with the auto retry enabled…

“Cannot find module ‘/root/codes/2rdnNVnvPe8Xvh0ECdUXK/step_7/index.js’\nRequire stack:\n- /root/main.js”

That’s going to be dramatic in terms of impact.

Any idea ? Something to change maybe ?

Hi @ChrisHK I am investigating this right now, trying to reproduce and assess what’s going on, I have no answer yet

1 Like

Thanks @abuaboud ,

Do not hesitate if you need something from me

Hi @ChrisHK

Are you on cloud If yes, can you a dm link one of the failed runs I want to query our logs

Sure, i send you a link asap, but what strange is that the Code piece failed in dev mode, not in production. In production, I have another error with the Documentero piece, it seems that oe of the json value is too long. Weird…

Hi @ChrisHK

Can you try to duplicate the code piece and press test again, does it work? please don’t delete the old step

Hi @abuaboud ,

Sorry I was dining. I try right now and let you know !

So weird … I’ve duplicated the code piece, and the duplicated works fine. But now, the existing one also works fine, I’ve tested 4 or 5 times… I don’t understand… It’s even not linked to data as I test with the same data.

Hi @abuaboud

Got it ! Now the first code does not work, and the duplicated one works… I don’t know why ?!

Here is the recording : Génération Document - Demande de médiation (initial) - Activepieces
Watch Video

Do you think I should remove the first one and keep the second one ?

Argh… Now the first Code works fine, the duplicate does not work …

Génération Document - Demande de médiation (initial) - Activepieces
Watch Video

And now, non of them works… Génération Document - Demande de médiation (initial) - Activepieces
Watch Video

Hi @ChrisHK

So these information we have so far:

  • Duplication might fix.
  • Doesn’t happen on the production flow.

I think it’s something has to do with caching, Let me look there and get it reproduced.

Moving this to issues.

1 Like

Hi @ChrisHK

I restarted the servers and did clean for cache, It seems doesn’t happen anymore but I am too optimistic

Keeping this ticket open until I find the root cause, please let me know If it happens again.

1 Like

Thanks a lot! I’m not at m’y desk right now, but if that happens again I’ll let you know, okay