grpc / grpc-dart

The Dart language implementation of gRPC.
https://pub.dev/packages/grpc
Apache License 2.0
847 stars 268 forks source link

Error connecting: Unsupported operation: Socket constructor (WASM) #725

Open flrnsbt opened 1 month ago

flrnsbt commented 1 month ago

While running a Flutter Web app build in WASM, I get this runtime error: 'Error connecting: Unsupported operation: Socket constructor'. Working fine in javascript, I'm using gRPC web of course.

4.0.0

Repro steps

  1. Create a new Flutter web project that uses gRPC web
  2. Build it in wasm and launch the app- Expected result: gRPC calls to work properly

Actual result: It seems that the wrong Socket constructor is used, instead of using a web compatible one, when we build in WASM

Details

Error connecting: Unsupported operation: Socket constructor

mosuem commented 1 month ago

Possibly a duplicate of #715?