Change detected on path tmp/ when using summernote

I'm experiencing some (new) issue on a project that is running on a server..

On some server connect forms I receive this on the server:

PM2          | Change detected on path tmp/tmp-2-1736694134769 for app test_node - restarting
PM2          | Stopping app:test_node id:5
PM2          | App [test_node:5] exited with code [0] via signal [SIGINT]
PM2          | pid=2386887 msg=process killed
PM2          | App [test_node:5] starting in -fork mode-
PM2          | App [test_node:5] online
5|test_node  | App listening at http://localhost:4000

This is something that Wappler use on a server connect form?

Looks like so. If you open your project with VSCode and search "tmp" you'll find some "tmp" folder references. Add a watch exclusion on your PM2 or something (if possible)

Though Wappler does handle it weirdly, the folder is named "/tmp" (in the source-code) instead of "tmp" or "tmp/" - for those that know Linux/Unix this will mess with their heads :exploding_head:

Hello my friend..

Yes.. using --ignore "tmp"
After that no more change detected error, but this appear randomly and SC is not executed..

5|test_nod | Connection Error: Error: Connection lost: The server closed the connection.

Errors like these will haunt you forever, I still get anxiety from those :sob:

I can only gently guide you in your detective work: Is this an error thrown by PM2 or is it Wappler NodeJS printing to the console (and therefore shown in PM2 logs)?

It's a message printed by the output of the node app, not from pm2..

I'm using pm2 logs
There was some maintenance on Digital Ocean, maybe it's related, besides it has completed..

Sorry if I'm throwing too many things, only thing I changed here is that I updated to latest all my assets from 6.8.0 to 7 Beta 14...

The tmp folder error appears now and the app was running for a year without any issues..

@George sorry for the tag, but this is an expected behavior?
I'm getting a 500 because server is restarted each time a SC is called..

PS: Asking because, this app before the update never shown a similar thing.. Maybe it's new? Maybe a bug?

It would help if you put the steps used in that SC, because a simple SC with just Set Value step probably wouldn't cause that. It's one of the steps that's causing a temporary file to be written, maybe some CSV or image manipulation stuff

As simple as this:

Here's a restart without ignore watch and tmp folder was modified right now..

image

Bumping this, please..

I think I found the cause of this behavior..
@patrick just to confirm, can be the update step that use the identity of the insert step?
Like insert identity needs to be stored somewhere to be used later?

I don't see anything server connect related, but just to be sure:

  • how and where have you defined your temp folder
  • what session store do you use?

I don't have anything defined..

I'm looking at the config.js file but there's nothing there
I'm not with a computer but looking at the repo and nothing with "tmp" appears

The only tmp thing we do is, when you use ftp for publishing of you node project, we assume that you have some hosting panel like plesk or cPanel and to restart the node server after successful upload a special file needs to be uploaded called: tmp/restart.txt

But I see in your case some other tmp files are created.

It's a node app running on pm2, nginx digital ocean..
I can see the tmp folder is also on the local project folder (don't know how it get there, maybe downloading from server or created by the node server)

The files or folders inside tmp are created when running a server connect (the one that retrieves the insert iidentity, so I was pointing to that)

The only thing I can confirm is, it's another project totally separated from the first case publicated on June 12th..

And also tmp folder is empty by the time I want to know what's inside

Will collect more info in a few hours when I get home, thanks George

I can confirm this is happening even with nodemon on localhost:

(Right now is 16:14)

So the server is creating something, and can't find a reason

@George Inspected using process monitor:

Each time the api is called on localhost:

This is also happening on the remote server..

maybe those are just session cookies?

Made a hook with chatgpt and require in index.js:

[HOOK] fs.createWriteStream -> C:/xampp/htdocs/projectname/tmp/tmp-2-1758745573103
    at module.exports (C:\xampp\htdocs\projectname\node_modules\express-fileupload\lib\tempFileHandler.js:23:26)
    at Multipart.<anonymous> (C:\xampp\htdocs\projectname\node_modules\express-fileupload\lib\processMultipart.js:75:9)
    at HeaderParser.cb (C:\xampp\htdocs\projectname\node_modules\busboy\lib\types\multipart.js:358:14)
    at HeaderParser.push (C:\xampp\htdocs\projectname\node_modules\busboy\lib\types\multipart.js:162:20)
    at SBMH.ssCb [as _cb] (C:\xampp\htdocs\projectname\node_modules\busboy\lib\types\multipart.js:394:37)
    at feed (C:\xampp\htdocs\projectname\node_modules\streamsearch\lib\sbmh.js:219:14)

This is printed everytime the API is called

Detective franse :man_detective:

1 Like

I think I got it