Skip to content

FormatException from the uri #7

Closed
@beautybird

Description

@beautybird

Hello,
I'm getting a FormatException , this is the uri :

      var url = 'postgres://admin:SomePass!#4@10.0.2.2:5432/the_database';

The intelliJ AVD host address is 10.0.2.2 ;

changing the 'SomePass...' to 'somePass..' gave same exception

what could be the reason and solution ?

I/flutter ( 4076): connectionPool is inital
I/flutter ( 4076): pooledConnectionsCount is : 0
E/flutter ( 4076): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FormatException: Invalid port (at character 18)
postgres://admin:SomePass!#4@10.0.2.2:5432/the_database
E/flutter ( 4076): ^
E/flutter ( 4076):
E/flutter ( 4076): #0 new _Uri.notSimple. (dart:core/uri.dart:1484:11)
E/flutter ( 4076): #1 int._throwFormatException (dart:core-patch/integers_patch.dart:126:40)
E/flutter ( 4076): #2 int._parseRadix (dart:core-patch/integers_patch.dart:144:16)
E/flutter ( 4076): #3 int._parse (dart:core-patch/integers_patch.dart:102:12)
E/flutter ( 4076): #4 int.parse (dart:core-patch/integers_patch.dart:65:12)
E/flutter ( 4076): #5 new _Uri.notSimple (dart:core/uri.dart:1483:20)
E/flutter ( 4076): #6 Uri.parse (dart:core/uri.dart:1024:17)
E/flutter ( 4076): #7 new SettingsImpl.fromUri (package:postgresql2/src/postgresql_impl/settings.dart:30:17)
E/flutter ( 4076): #8 ConnectionImpl.connect (package:postgresql2/src/postgresql_impl/connection.dart:76:24)
E/flutter (

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions