Skip to content

Error 'Post failed: Continue' even though Gist was actually published #205

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

Closed
sloria opened this issue Apr 23, 2016 · 48 comments
Closed

Error 'Post failed: Continue' even though Gist was actually published #205

sloria opened this issue Apr 23, 2016 · 48 comments

Comments

@sloria
Copy link

sloria commented Apr 23, 2016

On Vim 7.4.1707 with the latest gist-vim (as of this writing), I am getting an error every time I run :Gist that reads

Post failed: Continue

Consequently, let g:gist_open_browser_after_post = 1 does not work.

However, the Gists actually get posted successfully.

Any ideas?

@mkozjak
Copy link

mkozjak commented Apr 24, 2016

Same for neovim 0.1.3.

@mattn
Copy link
Owner

mattn commented Apr 24, 2016

are you using gist.vim over http proxy?

@mkozjak
Copy link

mkozjak commented Apr 24, 2016

Nope, but something strange just happened. I've tried adding a new private gist just now (after restarting neovim) and it worked... It printed the link...

@m9
Copy link

m9 commented Apr 24, 2016

Having same issue
full vim version information available here

@mattn
Copy link
Owner

mattn commented Apr 25, 2016

Could you please upgrade webapi-vim?

@mkozjak
Copy link

mkozjak commented Apr 25, 2016

I already have the latest version and managed to get the error with ':Gist -p' just now.

@mattn
Copy link
Owner

mattn commented Apr 25, 2016

Could you please apply following patch to debug this issue?

diff --git a/autoload/webapi/http.vim b/autoload/webapi/http.vim
index f7b9eb2..123768e 100644
--- a/autoload/webapi/http.vim
+++ b/autoload/webapi/http.vim
@@ -159,6 +159,7 @@ function! webapi#http#get(url, ...) abort
     throw "require `curl` or `wget` command"
   endif
   if follow != 0
+    let g:debug = res
     while res =~ '^HTTP/1.\d 3' || res =~ '^HTTP/1\.\d 200 Connection established' || res =~ '^HTTP/1\.\d 100 Continue'
       let pos = stridx(res, "\r\n\r\n")
       if pos != -1
  1. Apply patch above.
  2. Gist -p
  3. :echo debug

Note that please don't paste secret contents on here.

@mkozjak
Copy link

mkozjak commented Apr 25, 2016

E121: Undefined variable: debug
E15: Invalid expression: debug

Using latest neovim with vim-plug on OS X.

@mattn
Copy link
Owner

mattn commented Apr 25, 2016

Maybe fixed. Could you please try latest webapi-vim.

@mkozjak
Copy link

mkozjak commented Apr 25, 2016

Installed the update. Same issue.

@mattn
Copy link
Owner

mattn commented Apr 25, 2016

@eiginn
Copy link

eiginn commented Apr 27, 2016

@mattn
Copy link
Owner

mattn commented Apr 27, 2016

Today, I updated webapi-vim. could you please try latest?

@eiginn
Copy link

eiginn commented Apr 27, 2016

could be related to vim-plug, i nuked and re cloned the repo in the right place and its working. previously git log only showed last commit about curl workaround and nothing else

@mkozjak
Copy link

mkozjak commented Apr 27, 2016

Updated. Worked for the first paste. Then I tried to paste again with Gist -p and it failed with:

Updating gist...                                                                                                                                                       
Post failed: Not Found

@mattn
Copy link
Owner

mattn commented Apr 27, 2016

@enkeyz
Copy link

enkeyz commented Apr 28, 2016

Same error here with vim.

@mattn
Copy link
Owner

mattn commented Apr 28, 2016

@enkeyz do you use latest gist-vim and webapi-vim?

@mkozjak
Copy link

mkozjak commented Apr 28, 2016

@mattn I did PlugUpdate before testing.

@mattn
Copy link
Owner

mattn commented Apr 28, 2016

@mkozjak could you please try #205 (comment) ?

@enkeyz
Copy link

enkeyz commented Apr 28, 2016

@mattn Yes, I'm using latest of everything.

@conrman
Copy link

conrman commented May 2, 2016

+1 on this issue as well. NeoVim 0.1.4 using vim-plug.

@JLoureir0
Copy link

JLoureir0 commented May 10, 2016

+1, using neovim 0.1.5

The gist gets posted even with the error. However if i select just a small amount of lines and run :'<,'>Gist there is no error and the plugin behaves as expected.

@mattn
Copy link
Owner

mattn commented May 11, 2016

I don't reproduce this after I fixed webapi-vim in few days ago.

@tombeynon
Copy link

Seeing the same thing with NeoVim 0.1.4 using vim-plug (all versions latest). Seems to only occur when posting to Gist, but does happen on both create and updating.

@mattn
Copy link
Owner

mattn commented May 11, 2016

This is my gist that I did :Gist and :w after opening gist from :Gist -l.

https://gist.github.com/mattn/a0158a1b46da3a52cb576a6ff99ebffd/revisions

AFAICS, no problem.

@tombeynon
Copy link

It works fine if I only save a very small gist (e.g. by visual selecting a line and :'<,'>Gist, as per @JLoureir0's comment), so your example works fine @mattn. The error seems to appear when you save larger gists - in my case it failed when I tried to save over 20 lines.

@mkozjak
Copy link

mkozjak commented May 11, 2016

@tombeynon +1

@mattn
Copy link
Owner

mattn commented May 11, 2016

This is a gist I just post https://gist.github.com/mattn/318aa07ee9cee4c47984cdb7c27c6d69/revisions

6498 lines.

@mattn
Copy link
Owner

mattn commented May 11, 2016

And this is one that :<,>Gist of mbyte.c

https://gist.github.com/mattn/dadb18fc63ff457acc89b37878d23553

@JLoureir0
Copy link

With Vim 7.4.1707 the behavior is exactly the same as NeoVim, it post to Github but it gives out the error unless the amount of data on the gist is really small.

My version of curl is 7.48.0

@tombeynon
Copy link

tombeynon commented May 11, 2016

I can reproduce in Vim 7.3 using this minimal vimrc, and this content.

vim -u test-vimrc
// create test file, didn't save
:Gist

As mentioned it does actually save (that gist I linked to is the result of getting that error), and doesn't seem to happen with smaller files.

screen shot 2016-05-11 at 12 17 09

@JLoureir0
Copy link

@mattn
Copy link
Owner

mattn commented May 11, 2016

@mattn
Copy link
Owner

mattn commented May 11, 2016

Maybe this part doesn't work expected.

https://github.com/mattn/webapi-vim/blob/master/autoload/webapi/http.vim#L243

@mattn
Copy link
Owner

mattn commented May 11, 2016

Someone, could you please try following?

  1. download this
  2. save aa.vim in same directory
  3. :so aa.vim

@JLoureir0
Copy link

@mattn
Copy link
Owner

mattn commented May 11, 2016

Strange. Then your gist-vim or webapi-vim should work well.

@mattn
Copy link
Owner

mattn commented May 12, 2016

Many thanks to responses for this.

I figure out that some version of curl return response that contains strange \r.

@tombeynon
Copy link

Thanks for the getting to the bottom of it @mattn - working great now.

@mkozjak
Copy link

mkozjak commented May 12, 2016

Working good, thanks!

@JLoureir0
Copy link

Thanks for the fix @mattn. Working great again.

@mblarsen
Copy link

mblarsen commented Jul 10, 2016

Still getting (:Gist):

Posting it to gist...
Post failed: Not Found
Press ENTER or type command to continue

No operations are working except for when I set:

let g:gist_post_anonymous = 1

Note that :Gist -l is working so it is not an issue with my user.

MacVim
Both plugins updated just now
Using token in ~/.gist-vim

@mattn
Copy link
Owner

mattn commented Jul 10, 2016

@mblarsen did you try with latest gist-vim and webapi-vim ?

@mblarsen
Copy link

@mattn I ran an update with vundle's :PluginUpdate should I update manually to get the latest?
Note that I can read gists but I cannot post unless anonymous.

@mblarsen
Copy link

@mattn Just tried checking out both repos. It made no difference. I can post as anonymous only, but I can connect to github and get my gists. I cannot save them after making changes.

@mblarsen
Copy link

@mattn my apologies, it turns out that my two-factor token didn't have gist access.

@mattn
Copy link
Owner

mattn commented Jul 12, 2016

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants