2

aqueduct db upgrade.... -- Aqueduct CLI Version: 3.3.0 -- Aqueduct project version: 3.3.0-b1 *** Uncaught error RangeError: Invalid value: Not in range 0..1114111, inclusive: -1 **** Stacktrace * #0 StringBuffer.writeCharCode (dart:core-patch/string_buffer_patch.dart:76:9) * #1 PostgreSQLFormat.substitute (package:postgres/src/substituter.dart:83:29) * #2 Query.sendExtended (package:postgres/src/query.dart:61:38) * #3 _PostgreSQLConnectionStateIdle.processQuery (package:postgres/src/connection_fsm.dart:182:9) * #4 _PostgreSQLConnectionStateIdle.awake (package:postgres/src/connection_fsm.dart:168:14) * #5 _PostgreSQLExecutionContextMixin._enqueue (package:postgres/src/connection.dart:399:67) * #6 _PostgreSQLExecutionContextMixin.query (package:postgres/src/connection.dart:318:12) * #7 PostgreSQLPersistentStore.execute (package:aqueduct/src/db/postgresql/postgresql_persistent_store.dart:153:37) * * #8 PostgreSQLPersistentStore.schemaVersion (package:aqueduct/src/db/postgresql/postgresql_persistent_store.dart:216:26) * #9 CLIDatabaseUpgrade.handle (package:aqueduct/src/cli/commands/db_upgrade.dart:28:52) * #10 CLICommand.process (package:aqueduct/src/cli/command.dart:159:20) * * #11 CLICommand.process (package:aqueduct/src/cli/command.dart:135:12) * #12 CLICommand.process (package:aqueduct/src/cli/command.dart:135:12) * #13 main (file:///C:/Users/khalid/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/aqueduct-3.3.0/bin/aqueduct.dart:9:27) * #14 _startIsolate. (dart:isolate-patch/isolate_patch.dart:299:32) * #15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)


khalid alsaleh
  • 173
  • 1
  • 7

2 Answers2

3

it's a breaking change in dart 2.8. downgrade to dart 2.7

  • I couldn't get it downgraded via my Linux distro and I found it tricky to get to the latest 2.7 release, so for anyone else looking for this, the url to it is https://storage.googleapis.com/dart-archive/channels/stable/release/2.7.2/sdk/dartsdk-linux-x64-release.zip – Jorge Barroso Jun 09 '20 at 05:04
  • Indeed this is the only version that works , and without any dependency_overrides.. – Vincenzo Jan 06 '21 at 10:51
1

Another solution that worked best for me is to override the postgres dependency on aqueduct:

dependencies:
    aqueduct: ^3.3.0+1
    # other dependencies

dependency_overrides:
    postgres: ^2.1.1

This was also suggested in their official GitHub issues for another postgres related issue

Jorge Barroso
  • 1,878
  • 1
  • 13
  • 14