Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Config set fails for type int #881

Closed
kernelwhisperer opened this issue Oct 28, 2018 · 6 comments · Fixed by #998
Closed

Config set fails for type int #881

kernelwhisperer opened this issue Oct 28, 2018 · 6 comments · Fixed by #998

Comments

@kernelwhisperer
Copy link
Contributor

ipfs.config.set('Discovery.MDNS.Interval', 11, console.log)
ipfs.config.set('Discovery.MDNS.Interval', '11', console.log)

Both of these fail:

cannot unmarshal string into Go struct field MDNS.Interval of type int

Repro: https://github.com/0x6431346e/config-set-repro/blob/master/index.js

@koalalorenzo
Copy link

koalalorenzo commented Dec 24, 2018

@alanshaw any update? Is this a bug of go-ipfs?

@koalalorenzo
Copy link

I just noticed that this error happens on any numeric values:

failed to set config value: failure to decode config: json: cannot unmarshal string into Go struct field ConnMgr.HighWater of type int (maybe use --json?)

@koalalorenzo
Copy link

@alanshaw any news? This is preventing us from providing MDNS settings in Siderus Orion

@koalalorenzo
Copy link

koalalorenzo commented May 15, 2019

This is still present in the latest release 31.0.0. Any plan? (sorry for insisting but this has been blocking us)

Consider that this is also affecting ConnMgr.HighWater

alanshaw pushed a commit that referenced this issue May 15, 2019
Anything that isn't a string needs to be passed with `--json`.

fixes #881

License: MIT
Signed-off-by: Alan Shaw <[email protected]>
alanshaw pushed a commit that referenced this issue May 15, 2019
Anything that isn't a string needs to be passed with `--json`.

fixes #881

Depends on:

* [x] ipfs-inactive/interface-js-ipfs-core#470

License: MIT
Signed-off-by: Alan Shaw <[email protected]>
@alanshaw
Copy link
Contributor

Fixed in 31.0.1

@mhjadav-plivo
Copy link

Upgraded dependencies but still getting one error looks like it's related to casting data we are passing

Screenshot 2019-05-22 at 6 38 38 PM

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

Successfully merging a pull request may close this issue.

5 participants