P
Prismaβ€’2mo ago
Eagle

Prisma Studio βž– Getting no records in T3 Stack

(dot)env with:
DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/databaseName?schema=public"
DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/databaseName?schema=public"
When typing the following:
pnpm prisma studio
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Prisma Studio is up on http://localhost:5555
pnpm prisma studio
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Prisma Studio is up on http://localhost:5555
I am getting no records, anyone who can help troubleshoot this? The schema is loaded correctly but the records are not showing like they are in pgadmin. I am using a Docker container to host postgres on port 5432
16 Replies
Nurul
Nurulβ€’5w ago
Hello @Eagle πŸ‘‹ Do you see the tables in Prisma Studio and not the records of the tables? Or you don't see anything in Prisma Studio? Do you mind sharing your docker file? I would like to try to reproduce this and check.
Eagle
EagleOPβ€’5w ago
Hello, thanks for taking interest in my question. Before I answer your question: I have checked Prisma Studio again and now it does show new records but not old records from before I opened Prisma Studio. Is this intended or should it show all records in the database? If it's intended then I am happy to say it is working. TO answer your questions: Correct: I can see the tables & the schema as it is loaded from my project directory prisma/schema.prisma. However can't see the records. How can I find the dockerfile? Does this command help? I think I just used a command to host
docker run --hostname=dfe03a01e375 --mac-address=02:42:ac:11:00:03 --env=POSTGRES_PASSWORD=mysecretpassword --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/17/bin --env=GOSU_VERSION=1.17 --env=LANG=en_US.utf8 --env=PG_MAJOR=17 --env=PG_VERSION=17.0-1.pgdg120+1 --env=PGDATA=/var/lib/postgresql/data --volume=postgres_data:/var/lib/postgresql/data --volume=/var/lib/postgresql/data --network=bridge -p 5432:5432 --restart=no --runtime=runc -d postgres
docker run --hostname=dfe03a01e375 --mac-address=02:42:ac:11:00:03 --env=POSTGRES_PASSWORD=mysecretpassword --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/17/bin --env=GOSU_VERSION=1.17 --env=LANG=en_US.utf8 --env=PG_MAJOR=17 --env=PG_VERSION=17.0-1.pgdg120+1 --env=PGDATA=/var/lib/postgresql/data --volume=postgres_data:/var/lib/postgresql/data --volume=/var/lib/postgresql/data --network=bridge -p 5432:5432 --restart=no --runtime=runc -d postgres
This is the pgadmin command:
docker run --hostname=32601001ca0d --user=pgadmin --mac-address=02:42:ac:11:00:02 [email protected] --env=PGADMIN_DEFAULT_PASSWORD=mysecretpassword --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=PYTHONPATH=/pgadmin4 --volume=/var/lib/pgadmin --network=bridge --workdir=/pgadmin4 -p 5050:80 --restart=no --runtime=runc -d dpage/pgadmin4
docker run --hostname=32601001ca0d --user=pgadmin --mac-address=02:42:ac:11:00:02 [email protected] --env=PGADMIN_DEFAULT_PASSWORD=mysecretpassword --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=PYTHONPATH=/pgadmin4 --volume=/var/lib/pgadmin --network=bridge --workdir=/pgadmin4 -p 5050:80 --restart=no --runtime=runc -d dpage/pgadmin4
Nurul
Nurulβ€’5w ago
I have checked Prisma Studio again and now it does show new records but not old records from before I opened Prisma Studio.
Prisma Studio should show all the records. All the records you see in PgAdmin should be visible in Prisma Studio. Though for a large number of records, it maybe paginated, so you might need to go to next page to see remaining records.
Eagle
EagleOPβ€’5w ago
Hmmm ok, I dont have many records so it must be something awry then.
azzerty23
azzerty23β€’5w ago
I can't see any data neither since today. Is there a bug with Prisma Postgres Studio?
Nurul
Nurulβ€’5w ago
@azzerty23 I just tested and I can see the data in Prisma Postgres Studio. Do you see any errors?
azzerty23
azzerty23β€’5w ago
Currently, I can no longer see the data on mobile; it was displaying correctly just a few days ago. Unfortunately, I don’t have access to a computer to check if the issue is elsewhere. I will get back to you with more information in two days. Thank you for your support.
azzerty23
azzerty23β€’5w ago
No description
azzerty23
azzerty23β€’4w ago
@Nurul (Prisma) My Prisma Postgres instance was working correctly; I had about 450 users in my User table. For the past few days, I can no longer connect to it: This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to your database. The underlying error is: Can't reach database server at 01jfgnp8dw076471swtwpeb21c.cdg0.db.prisma-data.net:5432\n\nPlease make sure your database server is running at 01jfgnp8dw076471swtwpeb21c.cdg0.db.prisma-data.net:5432."}} (The request id was: 8fb4d2a69db02a08)
Nurul
Nurulβ€’4w ago
@azzerty23 Can you please share your email id or GitHub Handle with which you signed up on Prisma Console? This would allow me to check logs for your account
azzerty23
azzerty23β€’4w ago
I replied to you via DM
Nurul
Nurulβ€’4w ago
Thanks! We are investigating. I'll get back as soon as I have an update πŸ™ @azzerty23 Can you check now? Hopefully this should be resolved now
azzerty23
azzerty23β€’4w ago
Thank you, I checked Prisma Studio, it's working now!
Nurul
Nurulβ€’4w ago
I am glad to hear that! πŸ™‚
Deeksha Rungta
Deeksha Rungtaβ€’4w ago
@Nurul I am getting the same error with my prisma postgres instance. It was working just fine a few days ago
This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to your database. The underlying error is: Can't reach database server at `01jdpa97nkkn55vzfx27krp3n1.ewr1.db.prisma-data.net:5432`\n\nPlease make sure your database server is running at `01jdpa97nkkn55vzfx27krp3n1.ewr1.db.prisma-data.net:5432`."}} (The request id was: 8fd070b3cc01124f)
This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to your database. The underlying error is: Can't reach database server at `01jdpa97nkkn55vzfx27krp3n1.ewr1.db.prisma-data.net:5432`\n\nPlease make sure your database server is running at `01jdpa97nkkn55vzfx27krp3n1.ewr1.db.prisma-data.net:5432`."}} (The request id was: 8fd070b3cc01124f)
would be happy to get some help here @Nurul (Prisma) Can you help here? Its a bit urgent

Did you find this page helpful?