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: Utf8Error #50

Closed
bpqm opened this issue Dec 31, 2019 · 21 comments
Closed

error: Utf8Error #50

bpqm opened this issue Dec 31, 2019 · 21 comments
Assignees
Labels
bug Something isn't working

Comments

@bpqm
Copy link

bpqm commented Dec 31, 2019

[os] mac os x catalina 10.15.1
[terminal] iTerm2
[shell] zsh
[bandwhich version] 0.6.0

when I run
$sudo bandwhich -i en0
get this error

error: Utf8Error { valid_up_to: 94056, error_len: Some(2) } }', src/libcore/result.rs:1165:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

@imsnif
Copy link
Owner

imsnif commented Dec 31, 2019

Ouch! Thanks for the report.

Looks like you're inside tmux (or something similar?) - does it happen outside as well?
Does it happen when you use the --raw flag?

@bpqm
Copy link
Author

bpqm commented Dec 31, 2019

Ouch! Thanks for the report.

Looks like you're inside tmux (or something similar?) - does it happen outside as well?
Does it happen when you use the --raw flag?

yes I use tmux

  1. I tried it outside tmux, it still happened.
  2. I tried "sudo bandwhich -i en0 --raw" , the output is the same

@bpqm
Copy link
Author

bpqm commented Dec 31, 2019

sorry I forget to say the version bandwhich 0.6.0

@jbpratt
Copy link

jbpratt commented Dec 31, 2019

Hmm, interested as to why this is happening, I wonder if anyone in the other thread (#31) has had this.

@imsnif
Copy link
Owner

imsnif commented Dec 31, 2019

@NoName2001 - I'm trying to figure out where this error is coming from. Could you run: RUST_BACKTRACE=full sudo bandwhich -i en0 and paste the output here?

@bpqm
Copy link
Author

bpqm commented Jan 1, 2020

@NoName2001 - I'm trying to figure out where this error is coming from. Could you run: RUST_BACKTRACE=full sudo bandwhich -i en0 and paste the output here?

hi imsnif, I don't know what happened, the error disappear and when I run "RUST_BACKTRACE=full sudo bandwhich -i en0" , I get the right frontend but no data
image

@ebroto
Copy link
Collaborator

ebroto commented Jan 1, 2020

@NoName2001 the absence of traffic seems to be related to #51 especially since you are on MacOS X.

About the previous error, not sure if @imsnif wants to keep digging but I would suggest to close the issue and reopen it with a backtrace if it pops up again.

@bpqm bpqm closed this as completed Jan 2, 2020
@bpqm
Copy link
Author

bpqm commented Jan 2, 2020

today, I come to office(and use office wifi), and I get the error again, maybe depend on the wifi situation?

@bpqm bpqm reopened this Jan 2, 2020
@imsnif
Copy link
Owner

imsnif commented Jan 2, 2020

@NoName2001 - could you run like this and give us the stack trace? will make it easier to understand where this issue is coming from:

RUST_BACKTRACE=full sudo bandwhich -i en0

@bpqm
Copy link
Author

bpqm commented Jan 2, 2020

@NoName2001 - could you run like this and give us the stack trace? will make it easier to understand where this issue is coming from:

RUST_BACKTRACE=full sudo bandwhich -i en0

is this what you want?

image

image

@jbpratt
Copy link

jbpratt commented Jan 2, 2020

@NoName2001 can you try with RUST_BACKTRACE set to full rather than 1? It may give us some more details for debugging. Thanks!

Edit: ah, nevermind. I see you were doing it in one of the above images.

@imsnif
Copy link
Owner

imsnif commented Jan 2, 2020

Hmm... can you try with --raw? I think that way the stack trace wouldn't get mangled up so much.
Also, iirc I think it needs to be with env - something like this: sudo env RUST_BACKTRACE=full bandwhich --raw

@bpqm
Copy link
Author

bpqm commented Jan 3, 2020

sudo env RUST_BACKTRACE=full bandwhich --raw
sure
image

image

@imsnif imsnif self-assigned this Jan 4, 2020
@imsnif imsnif added the bug Something isn't working label Jan 5, 2020
@zhangxp1998
Copy link
Collaborator

Hmmm the root cause might that the user's system is using encodings other than UTF8, and some processes contain non-ASCII character, our lsof_util.rs just crashes.

@zhangxp1998
Copy link
Collaborator

@NoName2001 This error should be fixed on master. Would you try it on your machine && confirm?

@bpqm
Copy link
Author

bpqm commented Jan 6, 2020

@NoName2001 This error should be fixed on master. Would you try it on your machine && confirm?

I reinstall bandwhich and it's version 0.7.0
image
image

@zhangxp1998
Copy link
Collaborator

Thanks for confirming! Did you build bandwhich from source or did you install it via brew? The fix I pushed is only available on master branch, it is not included in a release yet. Do try build it from source though.

@bpqm
Copy link
Author

bpqm commented Jan 6, 2020

Thanks for confirming! Did you build bandwhich from source or did you install it via brew? The fix I pushed is only available on master branch, it is not included in a release yet. Do try build it from source though.

I install with cargo, let me try master

@bpqm
Copy link
Author

bpqm commented Jan 6, 2020

Thanks for confirming! Did you build bandwhich from source or did you install it via brew? The fix I pushed is only available on master branch, it is not included in a release yet. Do try build it from source though.

it works!
may you please delete the decoded image it include the name :)
should I close the issue?

@bpqm bpqm closed this as completed Jan 6, 2020
@imsnif
Copy link
Owner

imsnif commented Jan 6, 2020

Nice catch @zhangxp1998 !! Thanks for this.

@bpqm
Copy link
Author

bpqm commented Jan 7, 2020

Nice catch @zhangxp1998 !! Thanks for this. +1

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

5 participants