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

db password of sample config causing errors #77

Closed
michael1011 opened this issue May 17, 2018 · 1 comment
Closed

db password of sample config causing errors #77

michael1011 opened this issue May 17, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@michael1011
Copy link
Contributor

When using the sample config of the readme xud fails to start because of this error:

(node:27008) UnhandledPromiseRejectionWarning: Error: Parsing error on line 3, column 12: Expected "'", "'''", "+", "-", "[", "\"", "\"\"\"", "_", "false", "true", "{", [ \t] or [0-9] but "n" found.
    at Config.<anonymous> (/home/michael/Git/JavaScript/xud/dist/lib/Config.js:88:27)
    at Generator.next (<anonymous>)
    at /home/michael/Git/JavaScript/xud/dist/lib/Config.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/michael/Git/JavaScript/xud/dist/lib/Config.js:3:12)
    at Config.load (/home/michael/Git/JavaScript/xud/dist/lib/Config.js:76:16)
    at Xud.<anonymous> (/home/michael/Git/JavaScript/xud/dist/lib/Xud.js:42:31)
    at Generator.next (<anonymous>)
    at /home/michael/Git/JavaScript/xud/dist/lib/Xud.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/michael/Git/JavaScript/xud/dist/lib/Xud.js:3:12)
    at Xud.start (/home/michael/Git/JavaScript/xud/dist/lib/Xud.js:41:16)
    at Object.<anonymous> (/home/michael/Git/JavaScript/xud/bin/xud:95:5)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
(node:27008) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:27008) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

My config:

[db]
username="xud"
password = null
databse = "xud"
port = 3306
host = "localhost"

It is working fine when password = null is replaced with password = "". Could some add this to a pr? Creating a new one for a single line is kinda overkill.

I am using Ubuntu 18.04, MariaDB 10.1.29 and Node 8.11.2.

@kilrau kilrau added the bug Something isn't working label May 17, 2018
@sangaman
Copy link
Collaborator

It looks like this is really more of an issue with the documentation than the code. TOML doesn't play nice with null. Removing the password line from your config file should work perfectly fine, as should setting it to an empty string. I'll just update our readme directly, keeping the password line there but using "" instead of null to make it clear that it is an available config option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants