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

Prisma Engine does not start (PrismaClientInitializationError: null Engine startup failed.) #451

Open
urusai88 opened this issue Nov 20, 2024 · 2 comments
Labels
bug Something isn't working needs triage

Comments

@urusai88
Copy link

urusai88 commented Nov 20, 2024

What version of Prisma Dart is running?

5.2.1

What version of Prisma CLI is running?

5.22.0

What type of app are you using?

Dart Native (Server/CLI)

What database are you using?

MariaDB

What steps can reproduce the bug?

Hello everyone!
Unfortunately I can't provide the source code now, but I made a dump of the arguments with which the engine starts.
After looking at them, can you please help me?

arguments:

--enable-metrics, --enable-raw-queries, --engine-protocol, json, --port, 0

environment:

SECURITYSESSIONID: 186a3
DATABASE_URL: mysql://game:password@localhost:3306/game
DATABASE_URL_TESTING: mysql://game:password@localhost:3307/game
RUST_BACKTRACE: 1
RUST_LOG: info
OVERWRITE_DATASOURCES: W3sibmFtZSI6ImRiIiwidXJsIjoibXlzcWw6Ly9nYW1lOnBhc3N3b3JkQGxvY2FsaG9zdDozMzA3L2dhbWUifV0=
PRISMA_DML: Ly8gVGhpcyBpcyB0ZXN0aW5nIFByaXNtYSBzY2hlbWEgZmlsZQ==

prisma-query-engine output:

{
  "is_panic": false,
  "message": "Error in data model: Diagnostics { errors: [DatamodelError { span: Span { start: 0, end: 0, file_id: FileId(0) },     message: \"Error validating: You defined no datasource. You must define exactly one datasource.\" }], warnings: [] }",
  "backtrace":"0: __mh_execute_header\n   1: __mh_execute_header\n   2: __mh_execute_header\n   3: __mh_execute_header\n   4: __mh_execute_header\n   5: __mh_execute_header\n   6: __mh_execute_header\n"
}

Both 3306 and 3307 ports and listens.

@urusai88 urusai88 added bug Something isn't working needs triage labels Nov 20, 2024
@medz
Copy link
Owner

medz commented Nov 21, 2024

[{"name":"db","url":"mysql://game:password@localhost:3307/game"}]
// This is testing Prisma schema file

Judging from your DML, your schema.prisma content is empty, which is the cause.

@medz
Copy link
Owner

medz commented Nov 21, 2024

If your current schema.prisma has the correct datasource and model definitions, you need to re-run prisma generate to generate a new client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants