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

[Linux] test-security fails with JSON error #2786

Closed
jumde opened this issue Jan 2, 2019 · 3 comments · Fixed by #2787
Closed

[Linux] test-security fails with JSON error #2786

jumde opened this issue Jan 2, 2019 · 3 comments · Fixed by #2787

Comments

@jumde
Copy link
Contributor

jumde commented Jan 2, 2019

Description

spawnSync timeout is not able to kill the process on linux since it is running in the same shell, which causes the log file to be parsed when it is being written.

SyntaxError: /home/pranjal/brave-browser/network_log.json: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.readFileSync (/home/pranjal/brave-browser/node_modules/jsonfile/index.js:70:17)
    at start (/home/pranjal/brave-browser/lib/start.js:112:27)
    at Command.listener (/home/pranjal/brave-browser/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
    at Command.parseArgs (/home/pranjal/brave-browser/node_modules/commander/index.js:654:12)
    at Command.parse (/home/pranjal/brave-browser/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/home/pranjal/brave-browser/scripts/commands.js:132:4)
    at Module._compile (module.js:653:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! brave@0.61.0 test-security: `npm run audit_deps && node ./scripts/commands.js start --enable_brave_update --network_log --user_data_dir_name=brave-network-test`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the brave@0.61.0 test-security script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pranjal/.npm/_logs/2019-01-02T18_12_19_319Z-debug.log

Steps to Reproduce

  1. npm run test-security

Actual result:

No error

Expected result:

JSON parsing error

Reproduces how often:

Easily

Brave version (brave://version info)

master branch

@srirambv
Copy link
Contributor

srirambv commented Mar 5, 2019

@jumde any specific test steps for CI builds ?

@jumde
Copy link
Contributor Author

jumde commented Mar 5, 2019

@srirambv - This is running in CI, and working as expected. cc: @mihaiplesa

I don't think we can test this on release builds. This was for devs only, may be I should removed the QA/Yes tag for this issue.

@mihaiplesa
Copy link
Contributor

We're running test-security for all public builds including release channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment