-
Notifications
You must be signed in to change notification settings - Fork 41
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
Can only deploy interactively (neither CLI arguments, nor config file work) #36
Comments
Did you try by running caprover login before? There is a note in doc for
|
Caprover stays logged on and when running |
@exlame I just realized - do you mean to say that deploying using only command line arguments or configuration file works for you? Are you using the same versions I do? (I updated my original post) |
Getting the exact same issue ("Ensuring authentication") when running the below;
This is me running it in a directory with a valid Note this works fine when I manually create an app with After reading this I thought it might be because I hadn't created the app just yet #12 So I called The contents of the .json file;
However if you pass in the following, you'll just get prompted for the password and the API call will successfully execute;
Pass in the password like so, and it'll stop working. So it seems like caproverPassword is the culprit
Ps this is a great project & thanks for the work! |
I am having trouble reproducing this issue on my end. I did the following:
I am running 2.0.2 as well. Having said that, I'll be publishing 2.1.0 soon which has some improvement around authentication. Please try it out and let me know if the issue still persists. |
No luck. FWIW, this is the debug output of request-promise. Note that the last part of the Click to expand
And this is the end of the log when setting Click to expandHTTP 22700: AGENT incoming response!
STREAM 22700: resume
STREAM 22700: readableAddChunk <Buffer 7b 22 73 74 61 74 75 73 22 3a 31 30 30 2c 22 64 65 73 63 72 69 70 74 69 6f 6e 22 3a 22 4c 6f 67 69 6e 20 73 75 63 63 65 65 64 65 64 22 2c 22 64 61 74 ... >
STREAM 22700: readableAddChunk null
STREAM 22700: emitReadable true
STREAM 22700: resume false
STREAM 22700: read 0
STREAM 22700: flow true
STREAM 22700: read undefined
STREAM 22700: need readable false
STREAM 22700: length less than watermark true
STREAM 22700: reading or ended false
STREAM 22700: endReadable false
STREAM 22700: read undefined
STREAM 22700: endReadable false
STREAM 22700: read 0
STREAM 22700: endReadable false
STREAM 22700: emitReadable_ false 0 true
STREAM 22700: flow true
STREAM 22700: read undefined
STREAM 22700: endReadable false
STREAM 22700: maybeReadMore read 0
STREAM 22700: read 0
STREAM 22700: need readable true
STREAM 22700: length less than watermark true
STREAM 22700: do read
NET 22700: _read
STREAM 22700: endReadableNT false 0
HTTP 22700: AGENT socket.destroySoon()
STREAM 22700: endReadableNT true 0
STREAM 22700: endReadableNT true 0
STREAM 22700: endReadableNT true 0
NET 22700: _final: not ended, call shutdown()
STREAM 22700: call pause flowing=true
STREAM 22700: pause |
Thanks for the additional information. I don't see any problems in the API call. What's your OS? If I cannot repro it on my end. I'll create more debug logs and ask you to retry again to find the problem. PS: The difference in API auth and cookie is expected. |
Interestingly, on Ubuntu 18 this issue doesn't occur. It just happens on Windows10. |
That's why I cannot reproduce the issue - I don't have a windows machine :| Or it could be NodeJS version. My NodeJS is I'll have to add a "debug" flag to the CLI so that we can get more info when running non-interactive command. |
That's correct, v10.16.3 on both Ubuntu/Win. Thanks for working to add a debug flag to the CLI. However I'm just happy its working on Ubuntu so no longer blocked. Cheers! |
@githubsaturn Sorry, only saw the activity in here just now - github has been weird for me with notifications lately. Anyway, @vohzd already uncovered the mystery I suppose. I'm on Windows 10 too. :) Since I planned on using this basically exclusively for deployment via CI anyway and can work out deployment scripts in WSL, it's not a problem for me either. So from my point of view, the issue could be closed. (Although I'd suggest to add a "Does not work on Windows" for |
Yea - generally speaking, non-interactive deployments are usually used on linux systems. But still, it'd be nice to sort out the root cause of this issue. There might be a more significant bug there. So for that reason, let's keep the issue open for now. |
is there any progress on this? (currently on caprover 1.6.1 and encountered the same bug) |
@ofirl I don't have windows machine to test this. Just to confirm, you're experiencing the issue on windows, right? |
yes, i can work around it for now but my main development system is gonna be windows. P.S. great project! thanks for all your work |
@githubsaturn I did some debugging on my windows machine and found out, that the cli hangs at caprover-cli/src/commands/deploy.ts Lines 232 to 237 in 179faf8
Seems the promise doesn't resolve |
You would think that caprover-cli/src/api/ApiManager.ts Lines 111 to 116 in fb632f7
But when I go the code of the Edit: there's something very weird going on here... sometimes it looks like all the http calls never resolve... I even tried swapping |
Hmm, getting stuck on similar on windows 10 cli when attempting:
If I go ahead with an ordinary deploy (i.e. without --default) I and click my way through the prompts then the deploy works without issue. |
@jekusz I can reproduce this too. |
Hi! I'm waiting for the fix too. I use Windows at home, but my pipelines are launched on linux so I can continue working without any problem. I would like to use it on Windows to test the pipeline jobs before using the actual ones. Thank you! |
The options I supplied are these:
caprover deploy --caproverUrl "https://captain.region.mydomain.com" --caproverApp myApp --branch master --caproverPassword "myPassword"
Similarly in a
.yml
file:But with both ways, I get stuck at (and by stuck I mean that it freezes there. If I supply a wrong password, I do get an error):
CLI version: 2.0.2
CapRover instance: 1.5.2
The text was updated successfully, but these errors were encountered: