we create some webservice in dart with aqueduct framework. We are using postgresql.
Hi getting error connect to the aqueduct to RSD postgresSql
RangeError: Invalid value: Not in range 0..1114111, inclusive: -1 ** Stacktrace
#0 StringBuffer.writeCharCode (dart:core-patch/string_buffer_patch.dart:7
#1 PostgreSQLFormat.substitute (package:postgres/src/substituter.dart:83:
#2 Query.sendExtended (package:postgres/src/query.dart:61:38)
#3 _PostgreSQLConnectionStateIdle.processQuery (package:postgres/src/conn
#4 PostgreSQLConnectionStateIdle.awake (package:postgres/src/connection
#5 _PostgreSQLExecutionContextMixin._enqueue (package:postgres/src/connec
#6 _PostgreSQLExecutionContextMixin.query (package:postgres/src/connectio
#7 PostgreSQLPersistentStore.execute (package:aqueduct/src/db/postgresql/
<asynchronous suspension>
There is braking change in dart 2.8, that causes this you can downgrade dart to 2.7 and it will work.
Hi
I'm getting the same error but only when launching main.dart from intelliJ.
When I use aqueduct serve command it works fine. Any idea why ? I can't use the built-in debugger because of that...
I'm using Dart 2.7.2 and aqueduct 3.3.0, and my postgres database is in a docker container if that matters.
I didn't changed anything in the main.dart, it's the "db_and_auth" template's one.
Why do we use postgres 1. * there is Version already 2.2.1? Could that fix the problem?
if you are having problems downgrading dart from latest to 2.7.2 use the following script:
brew unlink dart
brew install https://raw.githubusercontent.com/dart-lang/homebrew-dart/fed6de080aef54c4f1c1df732424df37cd3e5a3e/dart.rb
assuming you installed the sdk with homebrew
Why do we use postgres 1. * there is Version already 2.2.1? Could that fix the problem?
Yes, the postgres 2.2.1 fixed this issue: https://github.com/stablekernel/postgresql-dart/issues/119
If you want to use dart > 2.7.0, you can add to pubspec.yaml:
dependency_overrides:
postgres: 2.1.1
To use aqueduct to upgrade the database:
pub run aqueduct db upgrade
I don't have problems to use aqueduct with recent PostgreSQL plugin.