Prisma1: Prisma login should work in environment without a browser, such as codesandbox.io

Created on 27 Sep 2018  路  6Comments  路  Source: prisma/prisma1

Describe the bug
When using the Prisma CLI in the new https://codesandbox.io container environment, signing in fails with error code 3. This happens because the login flow requires the CLI to open a browser window, which is not available in the container environment.

To work around the issue, you can manually copy the login url, but because the CLI returns an error, it is not longer listening for the successful login.

To Reproduce
Steps to reproduce the behavior:

  1. Get access to the new https://codesandbox.io container environment (currently invite only)
  2. Install Prisma
  3. Use the CLI to login
  4. See error

Expected behavior
Instead of returning an error, the CLI should tell the user to copy/paste the url, and keep listening for successful login.

bu2-confirmed arecli

All 6 comments

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

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.

This is resolved in 1.25.0-beta.5 (install via npm install -g prisma@beta) via this PR https://github.com/prisma/prisma/pull/3842

Here is a sample sandbox that can be used to test it: https://codesandbox.io/s/91qj216zny

This might still yield this message (to manually login via opening the URL to authenticate) incorrectly on some operating systems, see https://github.com/sindresorhus/opn/issues/86

However, this won't stop them from logging in.

Thank you, that worked for me! 馃帀 With the @beta installed. Very useful when running in a headless vm.

This is available in the latest version 1.25.0, npm install -g prisma. I am closing this issue. Please let me know if the issue still persists via opening a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

schickling picture schickling  路  3Comments

notrab picture notrab  路  3Comments

sedubois picture sedubois  路  3Comments

MitkoTschimev picture MitkoTschimev  路  3Comments

AlessandroAnnini picture AlessandroAnnini  路  3Comments