OrchidTechnologies / orchid

Orchid: VPN, Personal Firewall
https://www.orchid.com/
GNU Affero General Public License v3.0
652 stars 103 forks source link

orchidcd errors out, seemingly on IPv6 packets (on Windows) #75

Closed Rileydevlab closed 3 years ago

Rileydevlab commented 3 years ago

I have done all the steps and can connect on my phone just fine. I get this error.

[T:7] [vpn/p2p/source/peer.cpp:114] orc_trace(): OnRenegotiationNeeded

#
# Fatal error in: vpn/p2p/rtc/webrtc/rtc_base/physical_socket_server.cc, line 1077
# last system error: 0
# Check failed: dispatcher_by_key_.empty()
#

Can anyone help?

saurik commented 3 years ago

Can you tell me what version of Windows you are using? Would you also be willing to provide your Orchid configuration file, with your "funder" and "secret" values redacted? I'm confused as this error is like, only able to happen when the WebRTC "physical socket server" is deconstructing, which is making me think that it was trying to throw an error (the trace isn't an error) and somehow failed?

Rileydevlab commented 3 years ago

Can you tell me what version of Windows you are using? Would you also be willing to provide your Orchid configuration file, with your "funder" and "secret" values redacted? I'm confused as this error is like, only able to happen when the WebRTC "physical socket server" is deconstructing, which is making me think that it was trying to throw an error (the trace isn't an error) and somehow failed?

account={protocol:"orchid",funder:"0x***********3",secret:"*********"}

windows 10. thanks for the reply :)

saurik commented 3 years ago

@Rileydevlab Can you change that to this?

rpc="https://cloudflare-eth.com/";
hops=[{protocol:"orchid",funder:"...",secret:"..."}];
Rileydevlab commented 3 years ago

@Rileydevlab Can you change that to this?

rpc="https://cloudflare-eth.com/";
hops=[{protocol:"orchid",funder:"...",secret:"..."}];

sorry that was the wrong file.

hops = [{curator: "partners.orch1d.eth", protocol: "orchid", funder: "0x", secret: "*****"}]; rpc = "https://cloudflare-eth.com/";

Rileydevlab commented 3 years ago

@Rileydevlab Can you change that to this?

rpc="https://cloudflare-eth.com/";
hops=[{protocol:"orchid",funder:"...",secret:"..."}];

running this one I get this error

[T:3] [./vpn/p2p/source/retry.hpp:71] handled error [./vpn/source/heap.hpp:103] orc_assert(false) [vpn/source/capture.cpp:714] building hop #0

saurik commented 3 years ago

(Oh, I apparently actually require a curator in that file; but that was based on advice from you giving me the contents of the wrong file, so it is all kind of irrelevant; your file has a curator.)

Rileydevlab commented 3 years ago

(Oh, I apparently actually require a curator in that file; but that was based on advice from you giving me the contents of the wrong file, so it is all kind of irrelevant; your file has a curator.)

so what is the issue?

saurik commented 3 years ago

@Rileydevlab I clearly don't know yet; if I did, I would have closed the issue.

OK, so I have a build for you to try that will turn on more extensive logging. Can you run this, and then maybe e-mail me the resulting log to saurik@saurik.com (mention Orchid in the subject line). (AFAIK it will not have any true secrets in it, but it will have your funder and a hash of your secret embedded in it numerous times, which serves as something of an identity. This is frankly semi-public information, but I can appreciate that people might not want to just paste it into a GitHub issue.)

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614649619.exe

Rileydevlab commented 3 years ago

@Rileydevlab I clearly don't know yet; if I did, I would have closed the issue.

OK, so I have a build for you to try that will turn on more extensive logging. Can you run this, and then maybe e-mail me the resulting log to saurik@saurik.com (mention Orchid in the subject line). (AFAIK it will not have any true secrets in it, but it will have your funder and a hash of your secret embedded in it numerous times, which serves as something of an identity. This is frankly semi-public information, but I can appreciate that people might not want to just paste it into a GitHub issue.)

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614649619.exe

I have emailed you

saurik commented 3 years ago

(For the record, there was almost no information in the resulting log; I've redacted the packet traces that were included, "just in case".)

[T:3] UDP(2e0) dest:2261
[T:3] protocol: UDP (raw:ip:udp:data)
[T:8] [vpn/p2p/source/datagram.cpp:54] ++ parsing packet: {4500...}
[T:8] [vpn/p2p/source/datagram.cpp:54] ++ parsing packet: {4500...}
[T:8] [vpn/p2p/source/datagram.cpp:54] ++ parsing packet: {4500...}
[T:8] [vpn/p2p/source/datagram.cpp:54] ++ parsing packet: {4500...}

#
# Fatal error in: vpn/p2p/rtc/webrtc/rtc_base/physical_socket_server.cc, line 1077
# last system error: 0
# Check failed: dispatcher_by_key_.empty()
#

@Rileydevlab Can you try this build? I've turned off the WebRTC logging that turned out to not log anything anyway, and killed the packet logging as that didn't teach us anything; all of the traces I've added to figure out what is going on shouldn't be sensitive, but if you feel uncomfortable feel free to e-mail me the log instead of pasting it here, and I'll do a redaction pass myself to make sure.

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614737258.exe

saurik commented 3 years ago

OK, so I got your new e-mail, but my interest in that debugging was predicated on the lack of output that said "NET:..." in your prior logs; this seemingly-much-more-complete log includes those lines (as well as a lot of other output that I was trying to figure out "how could it have not gotten even this far?").

@Rileydevlab Can you try this build?

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614745907.exe

timmy5616 commented 3 years ago

OK, so I got your new e-mail, but my interest in that debugging was predicated on the lack of output that said "NET:..." in your prior logs; this seemingly-much-more-complete log includes those lines (as well as a lot of other output that I was trying to figure out "how could it have not gotten even this far?").

@Rileydevlab Can you try this build?

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614745907.exe

Hi saurik,

Derek told me to get in touch with you. I am experiencing the same issues as Riley, and nothing seems to be working. I would like to send you an email with logs attached, but I am unsure which files to send. Also, should I be using the exe you provided above to debug?

Thanks, Timothy

Rileydevlab commented 3 years ago

can u call me

On Tue, Mar 30, 2021 at 10:49 PM timmy5616 @.***> wrote:

OK, so I got your new e-mail, but my interest in that debugging was predicated on the lack of output that said "NET:..." in your prior logs; this seemingly-much-more-complete log includes those lines (as well as a lot of other output that I was trying to figure out "how could it have not gotten even this far?").

@Rileydevlab https://github.com/Rileydevlab Can you try this build?

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614745907.exe

Hi saurik,

Derek told me to get in touch with you. I am experiencing the same issues as Riley, and nothing seems to be working. I would like to send you an email with logs attached, but I am unsure which files to send. Also, should I be using the exe you provided above to debug?

Thanks, Timothy

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OrchidTechnologies/orchid/issues/75#issuecomment-810717579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHUNESR6YA4XGPHMHKKM2DTGKEUBANCNFSM4YLVSLWA .

Rileydevlab commented 3 years ago

i need to use this asap

On Tue, Mar 30, 2021 at 11:20 PM Mr Ripped @.***> wrote:

can u call me

On Tue, Mar 30, 2021 at 10:49 PM timmy5616 @.***> wrote:

OK, so I got your new e-mail, but my interest in that debugging was predicated on the lack of output that said "NET:..." in your prior logs; this seemingly-much-more-complete log includes those lines (as well as a lot of other output that I was trying to figure out "how could it have not gotten even this far?").

@Rileydevlab https://github.com/Rileydevlab Can you try this build?

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614745907.exe

Hi saurik,

Derek told me to get in touch with you. I am experiencing the same issues as Riley, and nothing seems to be working. I would like to send you an email with logs attached, but I am unsure which files to send. Also, should I be using the exe you provided above to debug?

Thanks, Timothy

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OrchidTechnologies/orchid/issues/75#issuecomment-810717579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHUNESR6YA4XGPHMHKKM2DTGKEUBANCNFSM4YLVSLWA .

saurik commented 3 years ago

@timmy5616 yeah, so that builds were from a month ago now at this point, and it would be very difficult for me to correlate the log messages :(. I barely even remember what I was doing do debug this at this point ;P. Can you try this build?

https://cache.saurik.com/orchid/github/orchidcd_0.9.25~p37.g8938813a.x1617163490.exe

timmy5616 commented 3 years ago

@timmy5616

No worries, I have tried your new exe and have found that the issue lies in the IPv6. I don't know if this was the only problem I was having before hand, but seems that IPv6 is not changed by orchid vpn. Therefore, I was having issues with it... After turning off IPv6 and only using IPv4, ip lookup site and dns testing shows I am now successfully VPN'ing lol Hopefully this helps someone else who is also in a similar IP v6 / v4 scenario. Thanks for the Orchid teams help... Honestly though, knowing what the deal is with different IPs is going to go over the heads of many complete beginners to VPNs. Unless this issue is dealt with in the big release, perhaps talking about these basic things would help noobs like me.. Food for thought, all IMHO

Thanks, Timothy

saurik commented 3 years ago

I am experiencing the same issues as Riley...

@timmy5616 Huh... are you sure you had the same problem as @Rileydevlab? The problem listed in this issue was that the VPN was forcefully exiting after a bit with a very specific "fatal error" message from libwebrtc (which you can see in the first post), which seems to be caused by the VPN exiting prematurely, not that traffic was bypassing the VPN (FWIW, I knew that IPv6 wasn't handled by Orchid, but I assumed the traffic was eaten, not bypassed; that will definitely get fixed before we release Windows in anything but for advanced users ;P). Is IPv6 somehow causing Orchid to exit?...

Rileydevlab commented 3 years ago

OK, so I got your new e-mail, but my interest in that debugging was predicated on the lack of output that said "NET:..." in your prior logs; this seemingly-much-more-complete log includes those lines (as well as a lot of other output that I was trying to figure out "how could it have not gotten even this far?").

@Rileydevlab Can you try this build?

https://cache.saurik.com/orchid/github/orchidcd_0.9.24~p32.ge7013079.x1614745907.exe

I have tried this build and now doesn't seem to connect.

Fatal error in: vpn/p2p/rtc/webrtc/rtc_base/physical_socket_server.cc, line 1077 last system error: 0 Check failed: dispatcher_bykey.empty()

Rileydevlab commented 3 years ago

So it seems it works for my ipv4 but not ipv6

timmy5616 commented 3 years ago

@saurik Hello Jay,

Is there anyway to add additional hops to the config? I have tried copying over a working Openvpn hop, but it doesn't seem to work... Checked my android, and the configs are identical [beside the necessary windows lines] so I am not sure what is going on..

Thanks, Timothy

saurik commented 3 years ago

@timmy5616 That should work? Reagardless: either file an issue with a lot of detail as a bug report or email contact@orchid.com for more user-level support. (This isn't a forum, so tacking new questions into existing threads breaks its purpose.)

timmy5616 commented 3 years ago

to be fair this is labelled "...trouble using Orchid on Windows"

thank you tho

saurik commented 3 years ago

We believe this issue was fixed with 90e6f804e58d02b85aa8b618b127c92d54f5febf; this hasn't been pushed in a "release" yet (it will be when we push 0.9.26), but you can download the orchidcd-win build artifact of any commit after that point. If you continue to have the exact same error message (which I think is likely, as I am skeptical of this conclusion that this is related to IPv6, at least in a direct capacity), please continue the thread here and "reopen" the issue; otherwise, for avoidance of any doubt for how this "should work", file a new issue for your now different problem.