Skip to content
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

Error: Unsupported operation: Socket constructor #142

Open
Kobbers opened this issue Aug 30, 2020 · 6 comments
Open

Error: Unsupported operation: Socket constructor #142

Kobbers opened this issue Aug 30, 2020 · 6 comments

Comments

@Kobbers
Copy link

Kobbers commented Aug 30, 2020

i'm new to flutter, and was wondering how do i exactly use this i was creating a flutter for web, the documentation seems lacking for a newbie like me. when i do try to make a connection to my postgre DB i got this error "Error: Unsupported operation: Socket constructor", i do wander what to do, maybe i'm lacking some service or something...

@Kobbers
Copy link
Author

Kobbers commented Aug 30, 2020

nvm, i just read that it doesn't work directly for flutter-web, i guess

@ghost
Copy link

ghost commented Oct 28, 2020

I am currently facing the same problem. Did you find a work around this issue?

@isoos
Copy link
Collaborator

isoos commented Oct 28, 2020

When using Flutter Web, you are running the app in the browser. The app inside a browser can't connect to a random socket, only when using the http protocol (or in some cases ftp). Postgresql doesn't have an http interface, therefore you won't be able to connect to it from Flutter web (or from regular JS web).

@ghost
Copy link

ghost commented Oct 28, 2020

Can you recommend/suggest a suitable framework that I will allow me to create a http interface for me to work with flutter(dart) app and PostgreSQL?

@mfatihy70
Copy link

is there a way to work around this? i also use postgresql and it only doesnt work for web which is a shame.

@isoos
Copy link
Collaborator

isoos commented May 30, 2024

@mfatihy70: development is no longer done in this repository.

To answer your question: no, the web platform doesn't allow regular network connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants