Closed princesanjivy closed 3 years ago
I got a similar message, Error: Unsupported operation: RawSocket constructor In my case, it appears it has to do with a MySQL query I am trying to run using the MySQL1 package, latest version as of tis writing.
But it appears it only fails when try to compile the web, because the code works fine when using the android emulator...
So it looks like this functionality needs to be added to MySQL1 as soon as possible since Flutter 2.0 has open the flood gates and web is stable.
Looking at the code today, but not sure how far I will get if at all, still in the process of learning dart...:)
Here is the dump of the error, looks like the problem is in the buffered_socket.dart file, I took a look, but still looking like a foreign language to me :(, really hope someone can help soon...:)
Launching lib\main.dart on Chrome in debug mode...
Debug service listening on ws://127.0.0.1:53856/zMb4gCgCJhg=/ws
Running with unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Connecting to VM Service at ws://127.0.0.1:53856/zMb4gCgCJhg=/ws
this sucks..
Error: Unsupported operation: RawSocket constructor
at Object.throw_ [as throw] (http://localhost:53826/dart_sdk.js:5334:11)
at Function.connect (http://localhost:53826/dart_sdk.js:58946:17)
at defaultSocketFactory (http://localhost:53826/packages/mysql1/src/buffered_socket.dart.lib.js:115:27)
at connect (http://localhost:53826/packages/mysql1/src/buffered_socket.dart.lib.js:125:42)
at connect.next (
Any news on this issue?
I'm having the same issue, running great on Android Emulator, failing on Web. Hope MySQL1 get Web ASAP. For now, to my code work as it should, I need to write the querys on PHP and access the .php file from my server with http.dart dependecy. It works, but is far from a good solution.
This package opens a socket to the database. The web platform does not support sockets and so this package does not work on flutter web.
This package opens a socket to the database. The web platform does not support sockets and so this package does not work on flutter web.
Is there any alternative to connect the MySQL server to Flutter WebApp?
I get this error, also I'm on Flutter Web and OS Ubuntu.
Error: Unsupported operation: RawSocket constructor at Object.throw_ [as throw] at Function.connect
I googled this issue and I found out that RawSocket class doesn't have a connect method. Stackoverflow
Any solutions would be really helpful!