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

Error in config show: case mismatch in config #7818

Closed
eminence opened this issue Dec 9, 2020 · 2 comments · Fixed by #7798
Closed

Error in config show: case mismatch in config #7818

eminence opened this issue Dec 9, 2020 · 2 comments · Fixed by #7798
Labels
kind/bug A bug in existing code (including security flaws)
Milestone

Comments

@eminence
Copy link
Contributor

eminence commented Dec 9, 2020

Version information:

go-ipfs version: 0.8.0-rc1-02d15ac41
Repo version: 11
System version: amd64/linux
Golang version: go1.15.2

Description:

After upgrading/migrating from 0.7.0-ea77213e3 to 0.8.0-rc1-02d15ac41 I get this error when running "config show":

$ ipfs config show
Error: case mismatch in config, expected "Pinning" but got ""

My config file doesn't have any "Pinning" fields (since I'm using the same config from when I was running 0.7.0. I didn't manually add any fields, and it appears that IPFS didn't automatically migrate the config)

@eminence eminence added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Dec 9, 2020
@lidel
Copy link
Member

lidel commented Dec 9, 2020

Workaround for v0.8.0-rc1

@eminence thanks for reporting this!

Until we fix this in RC2, you can fix on your own by adding and removing a dummy service:

$ ipfs pin remote service add noop http:///example.com foo
$ ipfs pin remote service rm noop
$ ipfs config show

Apologies for inconvenience! 🙇

Details

Seems that we did not caught this because ipfs init produces:

"Pinning": {                                                                                                                                                                                                    
  "RemoteServices": null                                                                                                                                                                                        
}   

If I manually remove that from config, I get the same error

Error: case mismatch in config, expected "Pinning" but got ""

@petar I believe you are going to refactor how we sanitize ipfs config show in #7798, and that should fix this bug as well?

@lidel lidel mentioned this issue Dec 9, 2020
73 tasks
@eminence
Copy link
Contributor Author

eminence commented Dec 9, 2020

No apologies needed, this is why RC releases exist 😄

@Stebalien Stebalien removed the need/triage Needs initial labeling and prioritization label Jan 23, 2021
@Stebalien Stebalien added this to the go-ipfs 0.8 milestone Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants