aqueduct icon indicating copy to clipboard operation
aqueduct copied to clipboard

we create some webservice in dart with aqueduct framework. We are using postgresql.

Open kiran-moveoapps opened this issue 5 years ago • 6 comments

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> 

kiran-moveoapps avatar Apr 17 '20 08:04 kiran-moveoapps

There is braking change in dart 2.8, that causes this you can downgrade dart to 2.7 and it will work.

Reductions avatar Apr 17 '20 14:04 Reductions

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.

SosthenG avatar Apr 19 '20 09:04 SosthenG

Why do we use postgres 1. * there is Version already 2.2.1? Could that fix the problem?

Xazentul avatar May 07 '20 12:05 Xazentul

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

xvld avatar May 07 '20 17:05 xvld

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

vagkaefer avatar May 09 '20 14:05 vagkaefer

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.

edufolly avatar May 28 '20 14:05 edufolly