Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tried to signup with Email Auth ('serverpod_email_auth') Table not generated #170

Closed
anandsubbu007 opened this issue May 11, 2022 · 12 comments

Comments

@anandsubbu007
Copy link

SERVERPOD version: 0.9.7 mode: development
Insights listening on port 8281
Server id 0 listening on port 8280
METHOD CALL: serverpod_auth.email.createAccountRequest duration: 70ms numQueries: 1 authenticatedUser: null
METHOD CALL: serverpod_auth.status.getUserInfo duration: 3ms numQueries: 0 authenticatedUser: null
METHOD CALL: serverpod_auth.email.authenticate duration: 10ms numQueries: 1 authenticatedUser: null
PostgreSQLSeverity.error 42P01: relation "serverpod_email_auth" does not exist 
package:postgres/src/connection.dart 453:18                            _PostgreSQLExecutionContextMixin._query
package:postgres/src/connection.dart 427:7                             _PostgreSQLExecutionContextMixin.query
package:postgres/src/connection.dart 482:22                            _PostgreSQLExecutionContextMixin.mappedResultsQuery
package:serverpod_postgres_pool/postgres_pool.dart 750:23              _PgExecutionContextWrapper.mappedResultsQuery.<fn> 
package:serverpod_postgres_pool/postgres_pool.dart 678:27              _PgExecutionContextWrapper._run
package:serverpod_postgres_pool/postgres_pool.dart 749:12              _PgExecutionContextWrapper.mappedResultsQuery      
package:serverpod_postgres_pool/postgres_pool.dart 614:16              PgPool.mappedResultsQuery.<fn>
package:serverpod_postgres_pool/postgres_pool.dart 319:22              PgPool.run.<fn>.<fn>
package:serverpod_postgres_pool/postgres_pool.dart 418:27              PgPool._useOrCreate
package:serverpod_postgres_pool/postgres_pool.dart 390:14              PgPool._withConnection.<fn>
package:executor/src/executor_impl.dart 61:19                          _Executor.scheduleTask
package:serverpod_postgres_pool/postgres_pool.dart 318:18              PgPool.run.<fn>
package:retry/retry.dart 131:16                                        RetryOptions.retry
package:serverpod_postgres_pool/postgres_pool.dart 316:14              PgPool.run
package:serverpod/src/database/database_connection.dart 171:20         DatabaseConnection.find
package:serverpod/src/database/database_connection.dart 199:18         DatabaseConnection.findSingleRow
package:serverpod/src/database/database.dart 86:12                     Database.findSingleRow
package:serverpod_auth_server/src/endpoints/email_endpoint.dart 25:17  EmailEndpoint.authenticate
package:serverpod/src/server/endpoint_dispatch.dart 115:20             EndpointDispatch.handleUriCall
package:serverpod/src/server/server.dart 220:18                        Server._handleRequest
===== asynchronous gap ===========================
package:serverpod_postgres_pool/postgres_pool.dart 318:18              PgPool.run.<fn>
package:retry/retry.dart 131:16                                        RetryOptions.retry
package:serverpod_postgres_pool/postgres_pool.dart 316:14              PgPool.run
package:serverpod/src/database/database_connection.dart 171:20         DatabaseConnection.find
package:serverpod/src/database/database_connection.dart 199:18         DatabaseConnection.findSingleRow
package:serverpod/src/database/database.dart 86:12                     Database.findSingleRow
package:serverpod_auth_server/src/endpoints/email_endpoint.dart 25:17  EmailEndpoint.authenticate
package:serverpod/src/server/endpoint_dispatch.dart 115:20             EndpointDispatch.handleUriCall
package:serverpod/src/server/server.dart 220:18                        Server._handleRequest

DEBUG: authenticate anandsubbu7@gmail.com / 123456777
METHOD CALL: serverpod_auth.status.getUserInfo duration: 0ms numQueries: 0 authenticatedUser: null
@anandsubbu007 anandsubbu007 changed the title Tried to signup with Email Auth Tried to signup with Email Auth ('serverpod_email_auth') Table not generated May 11, 2022
@TechDockDev
Copy link

I am also getting same Issue
2022-05-11 20:09:35.232 UTC [103] ERROR: relation "example" does not exist at character 13

2022-05-11 20:09:35.232 UTC [103] STATEMENT: INSERT INTO example ("name", "data") VALUES ('Serverpod corp.', 90) RETURNING id

@vlidholt vlidholt added the docs label May 13, 2022
@vlidholt
Copy link
Collaborator

This should be added to the documentation.

When you add a module, you manually need to add its database tables to your database. The queries you need to run are located here for the authentication module:

https://github.com/serverpod/serverpod/blob/main/modules/serverpod_auth/serverpod_auth_server/generated/tables.pgsql

@anandsubbu007
Copy link
Author

This should be added to the documentation.

When you add a module, you manually need to add its database tables to your database. The queries you need to run are located here for the authentication module:

https://github.com/serverpod/serverpod/blob/main/modules/serverpod_auth/serverpod_auth_server/generated/tables.pgsql

also please mention to use only lowercase string for table name

@SriRam-Macha
Copy link

SriRam-Macha commented Nov 18, 2022

Hey even after flowing the above steps. The response from the server is always failed when I try to login after create an account. The server responds with failed no matter what request.
vlidholt can you help me?

@vlidholt
Copy link
Collaborator

@SriRam-Macha, can you describe a bit more in detail where you get stuck or what sort of error message you are getting? It's very hard to help otherwise. :)

@SriRam-Macha
Copy link

SriRam-Macha commented Nov 18, 2022

image

the above picture has the response i get after trying to login to the user account i just created.

image

the above picture is from postico I have add the tables as described in the above mentions

image

I am using the button widget provided with the pacakge

image

image

The above picture shows the statements from the terminal.(Docker is also working fine)

If there is any more information needed please let me know. vlidholt

@vlidholt
Copy link
Collaborator

I'll be going through the whole email authentication flow and updating the documentation in the next few days.

@SriRam-Macha
Copy link

Ok will be waiting and wanted to ask one more thing

  • will Serverpod 1.0 be released in this year?

@vlidholt
Copy link
Collaborator

@SriRam-Macha, yes, it will be released in the next few weeks most likely. The next version will be a release candidate. So I'm going over all documentation, examples, etc to make sure that everything is up to date and working.

@SriRam-Macha
Copy link

That's really great. Looking forward towards it.

@yahu1031
Copy link
Contributor

@vlidholt can you open up this ticket if this isn't fixed yet.

@vlidholt
Copy link
Collaborator

vlidholt commented Dec 7, 2022

I tried this in the example, and it works for me as far as I can tell:
https://github.com/serverpod/serverpod/tree/main/examples/chat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants