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: parse.go:200 - could not guess encoding from content type #6859

Closed
RubenKelevra opened this issue Jan 31, 2020 · 10 comments
Closed

ERROR: parse.go:200 - could not guess encoding from content type #6859

RubenKelevra opened this issue Jan 31, 2020 · 10 comments
Assignees
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) topic/rpc-api Issues related to Kubo RPC API at /api/v0

Comments

@RubenKelevra
Copy link
Contributor

RubenKelevra commented Jan 31, 2020

Version information:

go-ipfs version: 0.4.23-6ce9a355f
Repo version: 7
System version: amd64/linux
Golang version: go1.13.7

Description:

on ipfs files rm i get occasionally this error directly in the console, while the return code of the command is 0. Any idea why this is happening? Is this a type of data corruption?

`
ERROR cmds/http: could not guess encoding from content type "" parse.go:200

Might be tied to this output in the log of the daemon, or completely independent:

#6860
`

@RubenKelevra RubenKelevra added the kind/bug A bug in existing code (including security flaws) label Jan 31, 2020
@hsanjuan hsanjuan self-assigned this Feb 3, 2020
@hsanjuan
Copy link
Contributor

hsanjuan commented Feb 3, 2020

Can you positively link this error message to ipfs files rm ?

It would seems this would show only if ipfs would return a response without the Content-Type header sent, but I see it always set to application/json on files/rm. I also don't see why this sould happen only occasionally. Is there anything special in your setup?

The parse.go file is at https://github.com/ipfs/go-ipfs-cmds/blob/master/http/parse.go#L200.

If you can reproduce reliably I would enable debug logging for cmds, cmds/cli and cmds/http (ipfs loglevel cmds/http debug) and post the info (might offer a bit more details). Alternatively, testing with a modified go-ipfs-cmds version that prints what the actual request causing issues when the issue happens might help.

@hsanjuan hsanjuan added the need/author-input Needs input from the original author label Feb 3, 2020
@RubenKelevra
Copy link
Contributor Author

RubenKelevra commented Feb 3, 2020

Can you positively link this error message to ipfs files rm ?

Yes, that's was the immediate response to an ipfs files rm command on the console.

Is there anything special in your setup?

I don't know how a 'normal' setup would look like, that's my first setup with ipfs. :)

I'm running a cluster on this node as well, and the commands do manipulate the same data. So stuff added via a cluster command, gets located on a folder via ipfs. If my source deletes a file I set a 2-month expire-in time via the cluster command and delete the file via ipfs from the folder.

But there should be days in between a file add and a file delete. While I was setting this up and testing my script, it might has been a race condition. Because I had added the file via the cluster command very recently.

But I never run commands concurrently on this node.

If you can reproduce reliably I would enable debug logging for cmds, cmds/cli and cmds/http (ipfs loglevel cmds/http debug) and post the info (might offer a bit more details). Alternatively, testing with a modified go-ipfs-cmds version that prints what the actual request causing issues when the issue happens might help.

It doesn't happen anymore for me. Not sure what changed, though.

@hsanjuan
Copy link
Contributor

hsanjuan commented Feb 3, 2020

Does this happen at the same moments when the #6860 panic ?

@RubenKelevra
Copy link
Contributor Author

@hsanjuan that's quite likely. Haven't checked the timestamps back then. But both happened roughly at the same time.

No panic and no error messages since then. Both stopped after I removed all pins from the cluster and readded them.

@hsanjuan
Copy link
Contributor

hsanjuan commented Feb 3, 2020

Ok, it should be easy to check if a panic on the server side causes this client side. It is probably a harmless message anyways.

@RubenKelevra
Copy link
Contributor Author

RubenKelevra commented Feb 3, 2020

Ok, it should be easy to check if a panic on the server side causes this client side. It is probably a harmless message anyways.

Alright, do you need anything additionally from me? 🤔

@hsanjuan hsanjuan added exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue topic/rpc-api Issues related to Kubo RPC API at /api/v0 and removed need/author-input Needs input from the original author labels Feb 3, 2020
@hsanjuan
Copy link
Contributor

hsanjuan commented Feb 3, 2020

Ok, it should be easy to check if a panic on the server side causes this client side. It is probably a harmless message anyways.

Alright, do you need anything additionally from my? thinking

Testing if the error message pops up the same moments when a panic is triggered would be nice. You can manually panic in core/commands/version.go and then do ipfs version, for example.

@RubenKelevra
Copy link
Contributor Author

@Stebalien I guess this also explains this log messages on the console running the ipfs files rm command, right?

@Stebalien
Copy link
Member

If you were seeing that log message when you saw that stacktrace? Probably.

@RubenKelevra
Copy link
Contributor Author

@Stebalien yeah was at least on the same run of the script I was writing and testing.

I think it's fine to close it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) topic/rpc-api Issues related to Kubo RPC API at /api/v0
Projects
None yet
Development

No branches or pull requests

3 participants