prisma / prisma-admin-feedback

Feedback for Prisma Admin (currently in invite-only preview)
6 stars 1 forks source link

Prisma Admin, on different port, not loading data on local. #154

Open devniel opened 5 years ago

devniel commented 5 years ago

Describe the bug There is a 500 error in the request made by Prisma Admin when the port is different than 4466 on local environment.

To Reproduce Steps to reproduce the behavior:

  1. Follow the quickstart https://github.com/prisma/prisma#quickstart
  2. Change the ports on docker-compose.yml to 4467
  3. Change ports to 4467 in prisma.yml
  4. Deploy with prisma deploy
  5. Visit http://localhost:4467/_admin
  6. The view got stuck on 'loading'.
  7. Open developer tools and see the error on the console: Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Expected behavior Data loaded.

Screenshots image

Versions (please complete the following information):

divyenduz commented 5 years ago

@devniel I tried this but I wasn't able to reproduce it, can you please share the output of docker logs <prisma container name>?

You can use docker ps to find the "prisma container name".

hazabaum commented 5 years ago

Hey~! I was just playing around with Prisma and run into the same issue. I set up a local MongoDB database with prisma init but the admin panel is unable to load the data browser. I didn't change the port of the database which is set to 4466 by default. Here is the log file.

In the Chrome developer console I also get the following two errors: TypeError: Cannot read property 'query' of undefined at app.js:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

pantharshit00 commented 5 years ago

Hi @hazabaum

Can you please clear your localStorage and try this again

BjoernRave commented 5 years ago

I have the same problem with my local deployment with PostgreSQL. It was working when I was using the demo server. I tried to clear the localStorage, but it did not fix the problem.

- Connector: Postgres
- Prisma Server: 1.33
- prisma CLI: prisma/1.33
- OS: macOS Mojave

The logs of my prisma container:

[INFO] {} - Started.
[INFO] Obtaining exclusive agent lock...
[INFO] Initializing workers...
[INFO] Obtaining exclusive agent lock... Successful.
[INFO] Successfully started 1 workers.
[INFO] Deployment worker initialization complete.
Server running on :4466
[Warning] Management authentication is disabled. Enable it in your Prisma config to secure your server.
Trying (via loadLibrary) jnidispatch
Looking in classpath from sun.misc.Launcher$AppClassLoader@7852e922 for /com/sun/jna/linux-x86-64/libjnidispatch.so
Found library resource at jar:file:/app/lib/net.java.dev.jna.jna-4.5.2.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
Trying /tmp/jna-3506402/jna637619601633748806.tmp
Found jnidispatch at /tmp/jna-3506402/jna637619601633748806.tmp
Looking for library 'jwt_native'
Adding paths from jna.library.path: null
Trying libjwt_native.so
Adding system paths: [/lib64, /usr/lib, /lib]
Trying /lib/libjwt_native.so
Found library 'jwt_native' at /lib/libjwt_native.so
pantharshit00 commented 5 years ago

@BjoernRave Try disabling rawAccess: false in your docker-compose.yml file

respectTheCode commented 5 years ago

@BjoernRave Try disabling rawAccess: false in your docker-compose.yml file

I ran into this same issue and that fixed it

BjoernRave commented 5 years ago

@pantharshit00 @respectTheCode thank you. yes, I also read that somewhere else and it fixed it for me as well. I also read, that they are working on the fix

pantharshit00 commented 5 years ago

Yes, 1.34 should actually fix most of these issue as we have upgraded the prisma admin version.

joshhopkins commented 5 years ago

@pantharshit00 I'm still seeing this issue with 1.34, unfortunately.

yassinebridi commented 5 years ago

Still happening in 1.34

pantharshit00 commented 5 years ago

Can you all please try clearing your localstorage and trying this again?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.