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

clasp login --no-localhost if we can't create a server #577

Open
grant opened this issue Mar 15, 2019 · 0 comments
Open

clasp login --no-localhost if we can't create a server #577

grant opened this issue Mar 15, 2019 · 0 comments

Comments

@grant
Copy link
Contributor

grant commented Mar 15, 2019

Expected Behavior

clasp login automatically detects that the user can't run localhost.
At least suggest clasp login --no-localhost.

Actual Behavior

Clasp login will fail with an uncaught error:

clasp login
Logging in globally...
🔑 Authorize clasp by visiting this url:
https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fscript.deployments%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fscript.projects%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fscript.webapp.deploy%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.metadata.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.file%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fservice.management%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Flogging.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&client_id=1072944905499-vm2v2i5dvn0a0d2o4ca36i1vge8cvbn0.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A33109

(node:13565) UnhandledPromiseRejectionWarning: Error: Exited with code 3
    at ChildProcess.cp.once.code (/usr/lib/node_modules/@google/clasp/node_modules/opn/index.js:84:13)
    at Object.onceWrapper (events.js:285:13)
    at ChildProcess.emit (events.js:197:13)
    at maybeClose (internal/child_process.js:984:16)
    at Socket.stream.socket.on (internal/child_process.js:401:11)
    at Socket.emit (events.js:197:13)
    at Pipe._handle.close (net.js:611:12)
(node:13565) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13565) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant