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

Entered unreachable code using an illegal connection string #23906

Open
MagnusOestlund opened this issue Apr 20, 2024 · 1 comment
Open

Entered unreachable code using an illegal connection string #23906

MagnusOestlund opened this issue Apr 20, 2024 · 1 comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/schema Issue for team Schema. tech/engines Issue for tech Engines. topic: connection-url topic: entered unreachable code topic: prisma db pull CLI: prisma db pull topic: rust panic

Comments

@MagnusOestlund
Copy link

MagnusOestlund commented Apr 20, 2024

Bug description

Hi!

I am submitting this since the package asked yes/no if I wanted to report the bug, and since the error message was the unreachable code was reached I figured this may be interesting for you to know.

This submission is just to help you, and thanks for prisma, it's really great! I believe the problem is in my connection string so from my part this doesn't need any fixing if you don't want to fix it due to it giving that error.

I used this in my .env file:

DATABASE_URL="sqlserver://81.95.105.76:1433;database=DBNAME;user={SERVER/USERNAME};password={PWD;};encrypt=true;TrustServerCertificate=true"

And on running prisma db pull:

:\Users\username\source\vscode\prisma db pull

Prisma schema loaded from prisma\schema.prisma
Environment variables loaded from .env
Datasource "db": SQL Server database

✖ Introspecting based on datasource defined in prisma\schema.prisma

Oops, an unexpected error occurred!
Error in Schema engine.
Reason: [libs\user-facing-errors\src\quaint.rs:125:18] internal error: entered unreachable code

How to reproduce

Set the .env file to match my DATABASE_URL setup, then try and connect with a normal empty connection to pull the existing database with prisma db pull.

Expected behavior

I would have expected an error message that my connection string was incorrect. If you compare how the documentation example is, then this matches the string I tried, but since it doesn't connect I can be sure the problem lies in my code.

Prisma information

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "sqlserver"
  url      = env("DATABASE_URL")
}

Environment & setup

  • OS: Windows 11 Home edition
  • Database: SQL Server, trying to connect to a MS SQL database
  • Node.js version: v18.12.1

Prisma Version

prisma                  : 5.12.1
@prisma/client          : 5.12.1
Computed binaryTarget   : windows
Operating System        : win32
Architecture            : x64
Node.js                 : v18.12.1
Query Engine (Node-API) : libquery-engine 473ed3124229e22d881cb7addf559799debae1ab (at ..\..\..\AppData\Roaming\nvm\v18.12.1\node_modules\prisma\node_modules\@prisma\engines\query_engine-windows.dll.node)
Schema Engine           : schema-engine-cli 473ed3124229e22d881cb7addf559799debae1ab (at ..\..\..\AppData\Roaming\nvm\v18.12.1\node_modules\prisma\node_modules\@prisma\engines\schema-engine-windows.exe)
Schema Wasm             : @prisma/prisma-schema-wasm 5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab
Default Engines Hash    : 473ed3124229e22d881cb7addf559799debae1ab
Studio                  : 0.499.0
@MagnusOestlund MagnusOestlund added the kind/bug A reported bug. label Apr 20, 2024
@Weakky Weakky added team/client Issue for team Client. bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. tech/engines Issue for tech Engines. team/schema Issue for team Schema. topic: prisma db pull CLI: prisma db pull topic: rust panic and removed team/client Issue for team Client. labels Apr 24, 2024
@Weakky
Copy link
Member

Weakky commented Apr 24, 2024

Hey @MagnusOestlund,

Thanks for the thorough reproduction steps. This will be very useful for us 🙏

@janpio janpio changed the title Entered unreachable code using an illegal connection string Entered unreachable code using an illegal connection string Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/schema Issue for team Schema. tech/engines Issue for tech Engines. topic: connection-url topic: entered unreachable code topic: prisma db pull CLI: prisma db pull topic: rust panic
Projects
None yet
Development

No branches or pull requests

3 participants