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.

Error parsing when using default configuration

See original GitHub issue

When I run ./node_modules/.bin/solidity-coverage after installing in my project, I get the following error.

Launching testrpc on port 8555
Launching test command (this can take a few seconds)...
Using network 'development'.

SyntaxError: Error parsing /home/travis/prg/protocol/coverageEnv/contracts/governance/GovernanceProtocol.sol: Expected "contract", "import", "library", "pragma", "using", comment, end of input, end of line, or whitespace but "e" found. Line: 6, Column: 31
    at peg$buildStructuredError (/usr/local/lib/node_modules/truffle/node_modules/solidity-parser/build/imports_parser.js:543:12)
    at Object.peg$parse [as parse] (/usr/local/lib/node_modules/truffle/node_modules/solidity-parser/build/imports_parser.js:4142:11)
    at Object.parse (/usr/local/lib/node_modules/truffle/node_modules/solidity-parser/index.js:34:23)
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-compile/profiler.js:200:36
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/index.js:79:5
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/node_modules/async/internal/onlyOnce.js:12:16
    at next (/usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/node_modules/async/whilst.js:68:18)
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/index.js:64:7
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/fs.js:65:5
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/node_modules/async/internal/once.js:12:16
Cleaning up...

    There was an error generating coverage. Possible reasons include:
    1. Another application is using port 8555
    2. Truffle crashed because your tests errored

  Error: ENOENT: no such file or directory, open './allFiredEvents'
Exiting without generating coverage...

May be worth nothing that there is no configuration stub generated in my truffle.json after this error, which should be there if I understand the readme correctly.

This is almost definitely something wrong on my end though, since it looks like you guys got it to work on the melonport protocol just fine, which is the code that I’m currently trying the coverage tool on.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
cgeweckecommented, Jul 10, 2017

@travs Oh good!!! Sorry about how brittle the testrpc launch is . . .it’s starting to look like we might need to make the ‘workaround’ the ‘actual way’.

1reaction
cgeweckecommented, Jul 7, 2017

@travs RE: Invalid JSON RPC response: "" . . . if you continue to run into it, there’s a workaround that maurelian just pinged me about. You can set an option called norpc in the .solcover.js config file to true.

Then in another window launch our custom testrpc from the command line like this:

./node_modules/ethereumjs-testrpc-sc/bin/testrpc --gasLimit 0xfffffffffff --port 8555

That seems to work consistently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HOW TO REPAIR CONFIGURATION PARSER ERROR IN ...
3. Locate the machine.config.default file and copy it to another location (e.g. Desktop). 4. If the UAC appears, click OK or Agree to...
Read more >
Error parsing config file - ZABBIX Forums
Can someone tell me what's wrong with this configuration file? Zabbix says it can't start because of a parsing error:
Read more >
Fix Error Parsing Parser Returned Error 0xc00ce556 - YouTube
... Parser Returned Error 0xc00ce556 PowerShell Command: cp -fo C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ CONFIG \machine. config. default ...
Read more >
Anyway to set a default only when there is parse error for ...
Clearly the default will work when there is no num field in the configuration file. However, when there is a malformatted one. Spring...
Read more >
Cluster Node startup fails with org.sourceid.config ...
ConfigurationException : Error parsing configuration stream: D:\pingfederate-6.0.0\pingfederate\server\default\data\config-store,org.sourceid.common.
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