Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Fun Windows Issues #3

Closed
super3 opened this issue Jan 10, 2017 · 2 comments
Closed

Fun Windows Issues #3

super3 opened this issue Jan 10, 2017 · 2 comments
Assignees

Comments

@super3
Copy link
Contributor

super3 commented Jan 10, 2017

Package Versions

Replace the values below using the output from storjshare --version.

2.0.0

Replace the values below using the output from node --version.

v6.9.4

Expected Behavior

Run start running the daemon.

Actual Behavior

Try to run the generated config results in an error.

C:\Users\work>storjshare start --config "C:\Users\work\AppData\Local\Temp\8a84785601268ae7501c788457549098e98aef42.json"
undefined:56
  "loggerOutputFile": "C:\Users\work\.config\storjshare\logs\8a84785601268ae7501c788457549098e98aef42.log",
                          ^

SyntaxError: Unexpected token U in JSON at position 727
    at Object.parse (native)
    at exports.parse (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\node_modules\rc\lib\utils.js:15:17)
    at addConfigFile (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\node_modules\rc\index.js:31:20)
    at module.exports (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\node_modules\rc\index.js:47:20)
    at Object.<anonymous> (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\lib\config\daemon.js:16:31)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

So if you add backslashes to the path you still get:

C:\Users\work>storjshare start --config "C:\Users\work\AppData\Local\Temp\8a84785601268ae7501c788457549098e98aef42.json"
undefined:58
  "storagePath": "D:\",


SyntaxError: Unexpected token
 in JSON at position 841
    at Object.parse (native)
    at exports.parse (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\node_modules\rc\lib\utils.js:15:17)
    at addConfigFile (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\node_modules\rc\index.js:31:20)
    at module.exports (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\node_modules\rc\index.js:47:20)
    at Object.<anonymous> (C:\Users\work\AppData\Roaming\nvm\v6.9.2\node_modules\storjshare-daemon\lib\config\daemon.js:16:31)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

After you add the backslashes for the storage path too:

C:\Users\work>storjshare start --config "C:\Users\work\AppData\Local\Temp\8a84785601268ae7501c788457549098e98aef42.json"

  failed to start share, reason: failed to read config at C:\Users\work\C:\Users\work\AppData\Local\Temp\8a84785601268ae7501c788457549098e98aef42.json

Steps to Reproduce

Please include the steps the reproduce the issue, numbered below. Include as
much detail as possible.

  1. Generate the config.
  2. Try to run the generated config.
  3. Add double blackslashes to loggerOutputFile
  4. Add double blackslashes to storagepath
  5. Looks for config in the wrong place.
@super3 super3 added the bug label Jan 10, 2017
@super3 super3 changed the title Unexpected token U in JSON at position Fun Windows Issues Jan 10, 2017
@MeijeSibbel
Copy link

MeijeSibbel commented Jan 10, 2017

C:\Users\Meije>storjshare create -k [redacted] -a 1PxLPVqmYxM592U3KNAK6EUyhizBpXhA96 -s E:\StorjCLI -o E:\StorjCLI

  * daemon is not running, starting...

  failed to write config, reason: ENOENT: no such file or directory, open 'C:\Users\Meije\E:\StorjCLI'

C:\Users\Meije>

==============================================================

C:\Users\Meije>storjshare create -k ... -a 1PxLPVqmYxM592U3KNAK6EUyhizBpXhA96 -s E:\StorjCLI -o storjshare

  * daemon is not running, starting...

  failed to write config, reason: EISDIR: illegal operation on a directory, open 'C:\Users\Meije\storjshare'

C:\Users\Meije>

@MeijeSibbel
Copy link

C:\Users\Meije>storjshare start --config storjshare/config.json
undefined:56
  "loggerOutputFile": "C:\Users\Meije\.config\storjshare\logs\72d6daaa086a7e25d53c58234d03bf9594b78590.log",
                          ^

SyntaxError: Unexpected token U in JSON at position 732
    at Object.parse (native)
    at exports.parse (C:\Users\Meije\AppData\Roaming\npm\node_modules\storjshare-daemon\node_modules\rc\lib\utils.js:15:17)
    at addConfigFile (C:\Users\Meije\AppData\Roaming\npm\node_modules\storjshare-daemon\node_modules\rc\index.js:31:20)
    at module.exports (C:\Users\Meije\AppData\Roaming\npm\node_modules\storjshare-daemon\node_modules\rc\index.js:47:20)
    at Object.<anonymous> (C:\Users\Meije\AppData\Roaming\npm\node_modules\storjshare-daemon\lib\config\daemon.js:16:31)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

C:\Users\Meije>

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

No branches or pull requests

3 participants