Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception during unlink log file #1689

Closed
georgolden opened this issue Nov 4, 2021 · 5 comments
Closed

Uncaught exception during unlink log file #1689

georgolden opened this issue Nov 4, 2021 · 5 comments
Labels

Comments

@georgolden
Copy link
Member

georgolden commented Nov 4, 2021

Describe the bug
I had Metarhia from Example template running during the night. And server crushed with Uncaught exception.

To Reproduce
Run server, run client in browser and wait a long time. I don't know how to reproduce it quickly. I need to inspect metalog.

Expected behavior
There must be no uncaught exception on async operations like unlink file.

Screenshots
Error:

node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, unlink '/home/jebuscross/Example/log/2021-11-04-W0.log'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'unlink',
  path: '/home/jebuscross/Example/log/2021-11-04-W0.log'
}

Log file exists, and it is empty, as it should be. Last log file is 2021-11-04-W6.log

Desktop (please complete the following information):

  • OS: [Arch Linux 64-bit]
  • Node.js version [16.13.0]
  • Impress version [2.0.0]

Additional context
I am almost 100 percent sure, that this bug connected to metalog only. But it affects impress application server - it can be issued here.

@georgolden georgolden added the bug label Nov 4, 2021
@tshemsedinov
Copy link
Member

I have an idea how to reproduce, at GMT 0 metalog closes old files and creates new. I will try @georgolden

@georgolden
Copy link
Member Author

@tshemsedinov I started now server again hope that tomorrow morning I will see anything in logs, that I added inside metalog

@tshemsedinov
Copy link
Member

@Pom4H
Copy link

Pom4H commented Nov 14, 2021

My server also crashes when a new day starts. I reproduced by changing the built-in Date class and setting at 23:59.
It might be worth adding something like this to the "metatests" library for time sensitive cases.

tshemsedinov pushed a commit to metarhia/metalog that referenced this issue Dec 7, 2021
@tshemsedinov
Copy link
Member

As of impress 3.0.1 everything works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants