question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

network-audit is terminated before logs finish writing

See original GitHub issue

Description

While investigating parsing errors for network-audit and during code review w/ @bridiver (for a band-aid patch I had), it became clear that we need to wait until the logs are written out in their entirety to ensure integrity of the network-audit

SIGTERM / SIGKILL were added with https://github.com/brave/brave-browser/pull/4036 which may have introduced the problem. Because the stream for the logger isn’t flushed, there are missing line endings. The first band-aid patch was done for this with https://github.com/brave/brave-browser/pull/2787

Steps to Reproduce

  1. Run npm run network-audit on the platform of your choice
  2. Open network_log.json in a text editor

Actual result:

Notice how this is likely not proper JSON. It’s missing the ] to close events: [ and then the closing } tag for the entire JSON blob (possibly missing more).

Expected result:

Log should be valid JSON; no “hack” should be needed to parse the file. There might be missing entries- the process needs to complete the log on its own.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rebroncommented, Sep 30, 2021
1reaction
bscliftoncommented, Dec 4, 2019

@diracdeltas that’s definitely one approach; another which @bridiver proposed would be to create a new test suite, something like npm run test brave_network_audit which could wait a predetermined amount of time (or possibly run navigation tests) and then logs would be checked as a final part of the test

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Conduct an I-9 Audit - SHRM
The lowest priority will be handling I-9s of terminated employees. Step 2: Obtain Forms I-9 for Current Employees Who Are Missing I-9s. Generally,...
Read more >
Data Protection After Contract Termination - Educause
5015.2 and certify in writing that these actions have been complete within 30 days of the termination of this Agreement or within 7...
Read more >
Plan and deploy advanced security audit policies (Windows 10)
Learn to deploy an effective security audit policy in a network that includes advanced security audit policies.
Read more >
Windows Event Logging and Forwarding | Cyber.gov.au
Verifies Windows hosts on the network are auditing, collecting and forwarding logs as expected. Detects attempts by an adversary to suppress ...
Read more >
Access logs for your Network Load Balancer
Learn how to monitor your Network Load Balancer using access logs provided by Elastic Load Balancing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found