stablekernel/aqueduct

Relation "_authclient" does not exist

rostopira opened this issue · 3 comments

I'm trying to create user using following code:

    var uid = generateUid();
    final password = generatePassword();
    final salt = generatePassword();
    final hashedSecret = authServer.hashPassword(password, salt);
    final newClient = AuthClient(uid, hashedSecret, salt);
    await authServer.addClient(newClient);

But it throws error:

[WARNING] aqueduct: PostgreSQLSeverity.error 42P01: relation "_authclient" does not exist   
[SEVERE] aqueduct: POST /auth/new 705ms 500 {user-agent : Dart/2.12 (dart:io)\naccept-encoding : gzip\ncontent-length : 0\nhost : 192.168.1.226:8888\ncontent-type : application/json\n}  PostgreSQLSeverity.error 42P01: relation "_authclient" does not exist

First authclient is not a user it is a api client as per OAuth2 spec.
What I suspect is that you have not generated and run migration for your project.

Yeah, indeed, but when I following this guide another error is thrown

RangeError: Invalid value: Not in inclusive range 0..1114111: -1

It's caused by outdated postgres dependency, but I don't know how to override it in CLI

I've tried to activate master branch and it's complaining about analyzer:

Error: Error when reading '../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.1/lib/analyzer.dart': No such file or directory

Solved by following issue #913
And now getting "unable to connect to database"