stablekernel / postgresql-dart

Dart PostgreSQL driver: supports extended query format, binary protocol and statement reuse.
https://www.dartdocs.org/documentation/postgres/latest
BSD 3-Clause "New" or "Revised" License
129 stars 32 forks source link

open connection error flutter, only in app release #141

Closed MohamedYousof closed 4 years ago

MohamedYousof commented 4 years ago

I am using the latest version of the plugin with flutter 1.20.2 the postgres db is on my laptop, when I connect via emulator or real phone in debug mode it connects but when I create a release apk it says SocketExceptopn: Connection failed(OS Error: Permission denied, error: 13), address = 192.168.1.17, port = 5432 my host system is ubuntu 20.04 , I made configs like this `# - Connection Settings -

listen_addresses = '*' # what IP address(es) to listen on;

comma-separated list of addresses;

                # defaults to 'localhost'; use '*' for all
                # (change requires restart)

port = 5432 # (change requires restart) max_connections = 100 ` btw it connects via python from another laptop

MohamedYousof commented 4 years ago

it was a problem of internet permission, add <uses-permission android:name="android.permission.INTERNET"/> to androidmanifest file, the app one