Rocket.Chat.Apps-engine icon indicating copy to clipboard operation
Rocket.Chat.Apps-engine copied to clipboard

[BUG] Cannot deploying apps: write after end

Open cuonghuunguyen opened this issue 2 years ago • 12 comments

When deploy/updating apps by Rocket.Chat/Apps-CLI, the console shows the error write after end without any logs from server side. image

Additional information:

  • RC: 5.4.1
  • rc-cli: rocket.chat/apps-cli/1.10.1 wsl-x64 node-v14.21.1
  • Apps-Engine version: latest

cuonghuunguyen avatar Dec 26 '22 03:12 cuonghuunguyen

@dudanogueira :eyes:

debdutdeb avatar Dec 26 '22 07:12 debdutdeb

hi, any updates abt this issue? it seems to be a critical bug for apps developers

cuonghuunguyen avatar Jan 03 '23 15:01 cuonghuunguyen

Hi! Is this code public?

I indeed noticed some situations with different error messages, or sometimes the code not being executed and no errors showing, but I forgot to note the code or isolate it to create a reproducible environment to handle over to the apps engine devs.

And now I can't produce this errors again :)

dudanogueira avatar Jan 05 '23 12:01 dudanogueira

yes, could you have a look at my Birthday app in my repo list?

cuonghuunguyen avatar Jan 05 '23 13:01 cuonghuunguyen

https://github.com/cuonghuunguyen/Rocket.Chat.Apps-Birthday I can reproduce this in the latest version

cuonghuunguyen avatar Jan 05 '23 13:01 cuonghuunguyen

Any updates on this issue?

cuonghuunguyen avatar Feb 12 '23 10:02 cuonghuunguyen

The error happened in getUploadFormData.ts and this line

const bb = busboy({ headers: request.headers, defParamCharset: 'utf8', limits });

cuonghuunguyen avatar Feb 17 '23 04:02 cuonghuunguyen

Seems to be a bug from vm2 implementation

cuonghuunguyen avatar Feb 17 '23 07:02 cuonghuunguyen

@cuonghuunguyen would you mind trying to reproduce this again on the latest version (6.1.4)? We had some improvements to vm2 and fixed some other apps related errors. Hope the experience is better now

casalsgh avatar Apr 24 '23 12:04 casalsgh

sure, will inform you as soon as I have the result

cuonghuunguyen avatar Apr 24 '23 13:04 cuonghuunguyen

image image Still reproducable. Rocket.Chat 6.1.5 Community edition Docker installation

cuonghuunguyen avatar Apr 26 '23 09:04 cuonghuunguyen

Investigated and found the problem, the vm2 will cause the memory leak when running axios.

cuonghuunguyen avatar May 11 '23 09:05 cuonghuunguyen