-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
_nativeGetRemotePeer() throws or returns an exception whenever remoteAddress Socket's property getter is called! #48456
Comments
@ahmadSaeedGoda the code for _nativeGetRemotePeer lives in What kind of error do you get back when remoteAddress is called? Could it be that the socket is not connected and there is no remote when you are making this call ? |
"What kind of error do you get back when remoteAddress is called?" : "Could it be that the socket is not connected and there is no remote when you are making this call?" :
Thanks anyway for the instructions to debug myself. I am going to try and keep you updated in case of any progress. In the mean time, waiting for your response and hope you can find the above mentioned info useful. |
couldn't find the code for |
see It will have this code which links the Dart method to the corresponding native implementation
You should look for the method |
@a-siva I understand this:
But I don't have this: |
Simply there is no |
(These native implementations do not throw an exception, instead they return on OSError object). Related to the error seen in #48456 Change-Id: I6c98687d069073c4aa9d0344e79e777024590541 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234662 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Siva Annamalai <asiva@google.com>
This CL https://dart-review.googlesource.com/c/sdk/+/234662 should fix the type error mismatch that is currently showing up. Do you have a mechanism for building the VM and trying your test ? |
@a-siva Thank you for the follow up, this sounds amazing. Well, I am so happy with the progress so far, however I can't figure out how to use this change you've just pushed unfortunately. Kindly let me know how can I have a mechanism for building the VM and trying my own test :) For the reproduction steps it's as easy as I am just using a Dart library for synchronous HTTP requests called Here's my client code/
The
If I can provide any further info or there is a reproduce steps template that I can fill out, I would be more than happy to do so. |
Closing this issue as a CL to fix the type error mismatch has been submitted and the above reproduction steps works just fine with the latest version of Dart. |
dart --version
): Dart SDK version: 2.16.1 (stable) (Tue Feb 8 12:02:33 2022 +0100) on "linux_x64"_nativeGetRemotePeer() throws or returns an exception whenever
remoteAddress
Socket's property getter is called!This _nativeGetRemotePeer() function appears to be a C native function called by Dart code. I have no access to debug the native code since debugger just reads or steps over the Dart code. So I would love to figure out how to debug the C native code or simply overcome such an issue!
I have no idea where this function's implementation resides. However, it's called or referenced in
sync_socket_patch.dart
file that lives in/home/$USER/snap/flutter/common/flutter/bin/cache/dart-sdk/lib/_internal/vm/bin/sync_socket_patch.dart
.Would you kindly advise?
The text was updated successfully, but these errors were encountered: