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

Setup not working #3

Closed
MatthewDarling opened this issue Jan 25, 2013 · 6 comments
Closed

Setup not working #3

MatthewDarling opened this issue Jan 25, 2013 · 6 comments

Comments

@MatthewDarling
Copy link
Contributor

Having set the relevant variable for my blog, I can't seem to get tumblesocks-api-test-auth to complete using Emacs 24.1 on either Windows 7 or Ubuntu 12.04. I don't know enough about Emacs Lisp to really debug the issue, but I also tried the changes mentioned here and it didn't help.

Sorry this isn't particularly helpful; I keep trying to step through the code to find where the error occurs, but as soon as something goes wrong, the backtrace disappears and I get the "something didn't work, retry? y/n" prompt. So I keep passing it by accident and not noticing where the real error is.

If you've got any suggestions for an easy solution/how to start investigating, I'd be happy to try it.

@gcr
Copy link
Owner

gcr commented Jan 26, 2013

Hey there!

Odd that some people are having problems with Tumblesocks. I wasn't aware of this; thanks for letting me know (and for linking me to that post!)

I'll find an ubuntu VM and see if I can't reproduce this. In the mean time, mind answering some questions?

  • How'd you install Tumblesocks? Through Marmalade or something?
  • Does evaluating (require 'sasl nil t) print sasl in the minibuffer? (You can type that in the scratch buffer and then use C-x e to evaluate it)

@gcr
Copy link
Owner

gcr commented Jan 26, 2013

Oh also, what happens if you just try to evaluate (tumblesocks-api-user-info)?

And finally, did Firefox (or your web browser) pop up and ask Tumblr to authorize your account, or did you even get to that step?

@gcr
Copy link
Owner

gcr commented Jan 26, 2013

Aha! I just tried a fresh Ubuntu install, got Emacs from the Ubuntu software center, and it broke, just like you're saying.

I was able to fix this by installing the curl program. Does installing curl fix your problem?

sudo apt-get install curl

You can see this because just running (tumblesocks-api-user-info) complains that curl wasn't found.

If this solves your problem, let me know and I'll update the README and maybe add a line to the tumblesocks-api-test-auth function that asks people to install curl if they don't already have it.

@MatthewDarling
Copy link
Contributor Author

So, in order: I installed Tumblesocks through MELPA, because Marmalade happened to be down. I think MELPA just pulls from your Github repo, don't know if Marmalade is any different.

(require 'sasl nil t) does print sasl, yes.

When I evaluate (tumblesocks-api-user-info), I get the output:

Search failed: "^M
"

With that newline character in it. Does that tell you anything? I don't get any web browser popping up in Windows, at any rate.

I should have mentioned that Windows is my primary OS. I created the Ubuntu VM yesterday just to see if this was a problem with me being a Windows+Cygwin user (wouldn't be the first time). Without curl installed on Ubuntu, calling (tumblesocks-api-user-info) gives me the error "no such file or directory curl" like you said. Once I installed it, Firefox popped up and I was able to authorize successfully (though I did have to followDaniel Gempesaw's instructions - maybe you should byte-compile oauth.el yourself?). So that seems to suggest there's another problem specific to Windows users.

However, the odd thing is that I know I have curl installed through Cygwin, and that Emacs can access it. I did notice curl was being called, so I tested to make sure. When I hit M-! (shell-command) and type curl --help, I get the proper help output, so it's in my path and callable.

On Windows, though, I don't seem to be getting the error message about curl. The message about "search failed" doesn't seem to be written in your code from a quick grep... Any other Unix utility dependencies I might be lacking on Windows?

@gcr
Copy link
Owner

gcr commented Jan 26, 2013

Aha! I think I may have found the culprit for Windows.

I installed NTEmacs 24 on Windows 7, added Mramalade to my packages, and installed curl.

I then opened up my .emacs.d/elpa/oauth-1.0.3/oauth.el file (on my computer, this is C:\Users\me\AppData\Roaming\.emacs\...). I then just commented out/deleted the problem line in the oauth-fetch-token function, near L324:

; (delete-region (point-min) (+ (search-backward "\r\n") 2))

...Apparently it's not needed on Windows for some reason. I'll have to investigate why and find out the proper thing to do.

After commenting that and re-evaluating the function, I was able to authenticate with tumblr and view my dashboard.

If this solves your problem, it merits a patch to oauth.el. Let me know if commenting out that line fixes it.

@MatthewDarling
Copy link
Contributor Author

Wow, yeah, it worked after that. It works just as well on Ubuntu too - almost like that line isn't needed on any OS.

Thanks for helping figure this out!

gargle pushed a commit to gargle/tumblesocks that referenced this issue Aug 19, 2023
…now in the new tumblr web interface)' (gcr#3) from gargle/tumblesocks:fix into fix

Reviewed-on: https://codeberg.org/martianh/tumblesocks/pulls/3
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

2 participants