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

Log file is empty after fatal error #689

Closed
adbenitez opened this issue Feb 20, 2019 · 12 comments · Fixed by #693
Closed

Log file is empty after fatal error #689

adbenitez opened this issue Feb 20, 2019 · 12 comments · Fixed by #693
Assignees

Comments

@adbenitez
Copy link
Member

I had faced issue #401, the app had shown the error trace in the stdout and pointed me to a log file, but this log file is empty.

  • Platform (linux/mac/windows): GNU/Linux
  • Delta Chat Desktop Version: v0.101.0
@adbenitez
Copy link
Member Author

may have something to do with the fact that the app do not close after having this error (which is odd) and I had used Ctrl+C to close it

@Simon-Laux
Copy link
Member

can you send me the stdout? (If it contains private info you can send it via deltachat otherwise posting here should be fine)

@adbenitez
Copy link
Member Author

the log is not the big thing but here I attach it(also there were a line saying something like "you can see the log at ...." pointing to the log file:
dc.log

@Simon-Laux
Copy link
Member

ah it's likely something with deltachat-node

@Simon-Laux
Copy link
Member

I don't really know how we can solve this, I mean we can't really catch when a require statement fails.
The expected behavior would be that it opens an error dialog which informs the user of the missing dependency I would say, but thats not so easy to implement.

@ralphtheninja
Copy link
Member

We can't solve this. If the application can't start, we can't create a log that depends on the application running or at least starting properly.

@adbenitez
Copy link
Member Author

adbenitez commented Feb 22, 2019 via email

@Simon-Laux
Copy link
Member

Still we can't fix this, the best we could do would be detecting if every dependency is there before requiring them. But I actually think solving the missing dependency has more priority.

@Simon-Laux
Copy link
Member

The point is the logfile probably gets created before deltachat-node gets loaded up. We can't really check on whether a require fails as far as I knowso we can't add it to the log.
@ralphtheninja @Jikstra please correct me when I'm wrong here.

@Simon-Laux
Copy link
Member

1. electron starts index.js
2. index.js loads in the log-handler.js
3. index.js loads in the ipc.js, which loads in deltachat.js
4. deltachat.js loads in deltachat-node

@Simon-Laux
Copy link
Member

Simon-Laux commented Feb 22, 2019

Maybe we could move the exception handler to before the require('./ipc') to catch the error in the logfile...

@ralphtheninja
Copy link
Member

Maybe we could move the exception handler to before the require('./ipc') to catch the error in the logfile...

Yes, that's a good idea.

the log file is created!!! it is just empty! the app is printing the message to stderr, maybe even to the log and the issue is that it isn't flushed

Sorry @adbenitez, my bad!

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

Successfully merging a pull request may close this issue.

3 participants