Skip to content

_nativeGetRemotePeer() throws or returns an exception whenever remoteAddress Socket's property getter is called! #26

Open
@ahmadSaeedGoda

Description

@ahmadSaeedGoda

Dart SDK Version (dart --version): Dart SDK version: 2.16.1 (stable) (Tue Feb 8 12:02:33 2022 +0100) on "linux_x64"
Operating System: Linux UBUNTU.

_nativeGetRemotePeer() throws exception whenever remoteAddress Socket's property getter is called!

This _nativeGetRemotePeer() function appears to be a C native function called by Dart code.

This function is 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.

Here is the error I get whenever remoteAddress property gets called:

<type 'OSError' is not a subtype of type 'List<dynamic>' of 'function result'
#0      _NativeSynchronousSocket._nativeGetRemotePeer (dart:io-patch/sync_socket_patch.dart)
#1      _NativeSynchronousSocket.remoteAddress (dart:io-patch/sync_socket_patch.dart:136:18)
#2      _RawSynchronousSocket.remoteAddress (dart:io-patch/sync_socket_patch.dart:28:48)
#3      _RawSynchronousSocket.Eval ()
#4      _RawSynchronousSocket.Eval ()
#5      new SyncHttpClientResponse.processLine (package:sync_http/src/sync_http.dart:403:9)
#6      _LineDecoder._process (package:sync_http/src/line_decoder.dart:45:16)
#7      _LineDecoder.close (package:sync_http/src/line_decoder.dart:49:19)
#8      new SyncHttpClientResponse (package:sync_http/src/sync_http.dart:422:21)
#9      SyncHttpClientRequest.close (package:sync_http/src/sync_http.dart:104:12)
#10     main (package:sync_http/main.dart:41:26)
#11     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
#12     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)>

The socket is connected and there is a remote address value when this call occurs .. the values of isClosed & isClosedRead & isClosedWrite properties of the _socket object as instance of _NativeSynchronousSocket are both equal to false.

Would you kindly advise?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions