Viewing 14 replies - 16 through 29 (of 29 total)
  • Plugin Author Meitar

    (@meitar)

    Hm! That is helpful, thank you leoboiko. I am currently 100% focused on a different project (one I’m really excited about for its privacy implications) and it seems this issue has a functional workaround so I’m not going to take a closer look until I have more time and stability to do so, but I do appreciate all the information people have been sharing about how they ran into this problem and worked around it, so please keep doing that. The more info people provide the more info I have to look for the problem and ultimately resolve it. ??

    I’m getting this error now aswell.

    I revoked my app and created a new one, disconnected and was gonna connect with new credentials, but nothing happens.

    The funny thing is that it works on my local install, but on the live one it refuses.

    I’ve tried using Firefox, Safari and Chrome (+ Incognito).
    And also tried an entirely different computer.

    Not seeing anything associated with Tumblr Crosspostr in my apache error log.. No error log generated in the wp-content folder (wp_debug and wp_debug_log enabled).

    Also tried downgrading from .14 to .13 with no luck.

    Isn’t there some way of inducing the authorization process manually? Totally lost here and as always with time constraints.

    The local and live server should be similar in any sense. What I can think about is that they’re a bit different in the way mod rewrites are setup. But that shouldn’t be the issue right? As the authorization process doesn’t need the hosting side, except when sending you back to the callback url. Right?

    As the connection between the local setup and tumblr could be initiated I decided to dig into the option table and found tumblr_crosspostr_access_token, tumblr_crosspostr_access_token_secret and tumblr_crosspostr_settings listed there. I copied the data from these three fields to my live server and now the settings page for Tumblr Crosspostr shows up as “connected to tumblr”. However if I try to post anything I get 401 error, not authorized.

    Settings page looks a bit weird:
    https://dl.dropboxusercontent.com/u/3618143/screenshots/Sk%C3%A4rmavbild%202014-08-04%20kl.%2000.41.18.png

    Meitar: Any ideas?

    Plugin Author Meitar

    (@meitar)

    wob, if you enable Tumblr Crosspostr’s detailed debugging information you should see more details for why the 401 Not Authorized error is being raised. I’m not surprised that copying the access token manually didn’t work because these are OAuth tokens that need to come from Tumblr on a per-account basis.

    Also if you’re only having this trouble on a live site and not on a local install I wonder if there is a cache that’s causing some problems along the way? Clearly there’s something different between the two setups and if you can find out what then it’d go a long way to helping resolve this issue for everyone.

    I’m sorry I can’t offer more advice and that I’ve been somewhat quiet about this problem for a while. In addition to the focus on other projects mentioned above, my one and only laptop recently broke and I’ve been scrounging to find funds to cover the costs of its repair. I’ve resorted to rebuilding my development environment entirely on my Android phone in the meantime, which works but gosh do I miss having a full keyboard.

    Thanks for your reply Meitar! I really appreciate it. I realize you’re busy doing other stuff, and that’s a real bummer with your laptop ?? If you’d be able to focus a bit on this I’d surely be able donate some money as a token of gratitude for this smallish gig I’m doing.

    The debug output is simply:

    object(stdClass)#276 (2) {
      ["meta"]=>
      object(stdClass)#279 (2) {
        ["status"]=>
        int(401)
        ["msg"]=>
        string(14) "Not Authorized"
      }
      ["response"]=>
      array(0) {
      }
    }

    I’ve been toying around with a tumblr app of my own and I’ve been able to store cookies with the access tokens for later use, and that seems to have been working just serving them up for authentication, when needed. In my head it seems like it should work. I’m logged in to the very same Tumblr account when trying to authenticate with the live server as with the local one. Disconnecting and reconnecting is no problem with the local server.

    Now I’ve also tried deleting all cache and saved data from previous sessions (entire wipe in the chrome settings). I’ve disabled all plugins.

    What bugs me the most is that it worked before I started fiddling. I had to revoke my app and since then I cannot reinitiate. I’ve tried creating 4 new apps all together with the same result.

    I wonder if there could be any server settings that’s changed that could cause this. Do you have any thoughts on that?

    Plugin Author Meitar

    (@meitar)

    Sorry, I should have clarified that the WordPress debug log is where the interesting data would be output in this situation. If you turn on the detailed debugging option in this plugin’s settings and you enable the standard debug logging features in WordPress then Tumblr Crosspostr will log each and every HTTP request/response with Tumblr including all headers.

    Sadly I still don’t really understand what’s causing this problem and I very certainly don’t understand why only a fraction of people are reporting running into it and others are not. In my own testing, I found that every time I ran into this problem clearing my browser cookies solved the issue immediately, so that’s why I’ve been suggesting people really truly double and triple check that they’ve cleared their browser cookies. (Some browsers are notoriously bad about actually deleting cookies unless you dive really deeply into their settings screens.)

    Also, I appreciate the offer to pay me for my focus on this but as explained on my homepage, I don’t make exchange agreements of any kind, for any reason. I’ll work something out w/r/t my laptop eventually anyway and I don’t know what else to tell you given all my own testing with this is resoled by clearing cookies…? ?? I won’t turn down a donation but I don’t want you to send me money expecting something that I can’t offer anyway.

    Hm, this is really strange, because I’ve set

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);

    and there’s nothing showing up on the screen and a log is not generated..

    What leads me to believe that this is not a cookie issue is because I tried authing with a computer that never touched tumblr or this particular wordpress site ever before..

    Enabling define('WP_DEBUG_DISPLAY', true);

    Gives me this:

    Notice: Trying to get property of non-object in /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/lib/TumblrCrosspostrAPIClient.php on line 32
    
    Call Stack:
        0.0008     377556   1. {main}() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/index.php:0
        0.0017     456416   2. require_once('/var/www/domain.com/releases/20140804104857/web/wp/wp-admin/admin.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/index.php:10
        0.0020     474236   3. require_once('/var/www/domain.com/releases/20140804104857/web/wp/wp-load.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/admin.php:30
        0.0023     477488   4. require_once('/var/www/domain.com/releases/20140804104857/web/wp-config.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-load.php:34
        0.0148    1229488   5. require_once('/var/www/domain.com/releases/20140804104857/web/wp/wp-settings.php') /var/www/domain.com/releases/20140804104857/web/wp-config.php:9
        0.3203   21855216   6. do_action() /var/www/domain.com/releases/20140804104857/web/wp/wp-settings.php:347
        0.3492   21966912   7. call_user_func_array() /var/www/domain.com/releases/20140804104857/web/wp/wp-includes/plugin.php:429
        0.3492   21966940   8. Tumblr_Crosspostr->setSyncSchedules() /var/www/domain.com/releases/20140804104857/web/wp/wp-includes/plugin.php:0
        0.3497   21968600   9. Tumblr_Crosspostr_API_Client->getUserBlogs() /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php:1207
    
    Notice: Trying to get property of non-object in /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/lib/TumblrCrosspostrAPIClient.php on line 32
    
    Call Stack:
        0.0008     377556   1. {main}() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/index.php:0
        0.0017     456416   2. require_once('/var/www/domain.com/releases/20140804104857/web/wp/wp-admin/admin.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/index.php:10
        0.0020     474236   3. require_once('/var/www/domain.com/releases/20140804104857/web/wp/wp-load.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/admin.php:30
        0.0023     477488   4. require_once('/var/www/domain.com/releases/20140804104857/web/wp-config.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-load.php:34
        0.0148    1229488   5. require_once('/var/www/domain.com/releases/20140804104857/web/wp/wp-settings.php') /var/www/domain.com/releases/20140804104857/web/wp-config.php:9
        0.3203   21855216   6. do_action() /var/www/domain.com/releases/20140804104857/web/wp/wp-settings.php:347
        0.3492   21966912   7. call_user_func_array() /var/www/domain.com/releases/20140804104857/web/wp/wp-includes/plugin.php:429
        0.3492   21966940   8. Tumblr_Crosspostr->setSyncSchedules() /var/www/domain.com/releases/20140804104857/web/wp/wp-includes/plugin.php:0
        0.3497   21968600   9. Tumblr_Crosspostr_API_Client->getUserBlogs() /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php:1207

    But that shouldn’t be anything fatal, no?

    Edit: Hm. If Tumblr Crosspostr is activated and WP_DEBUG_DISPLAY is set to true I can no longer upload images. I guess it’s because I’m not authed properly and that throws errors on post-new.php.

    This appears in the Tumblr Crosspostr metabox:

    Notice: Trying to get property of non-object in /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/lib/TumblrCrosspostrAPIClient.php on line 32
    
    Call Stack:
        0.0005     351256   1. {main}() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/post-new.php:0
        0.6209   26538084   2. include('/var/www/domain.com/releases/20140804104857/web/wp/wp-admin/edit-form-advanced.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/post-new.php:65
        0.6969   27473952   3. do_meta_boxes() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/edit-form-advanced.php:546
        0.7095   27485732   4. call_user_func() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/includes/template.php:924
        0.7095   27485764   5. Tumblr_Crosspostr->renderMetaBox() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/includes/template.php:0
        0.7110   27487716   6. Tumblr_Crosspostr->tumblrBlogsSelectField() /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php:858
        0.7110   27487908   7. Tumblr_Crosspostr_API_Client->getUserBlogs() /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php:1459
    
    Notice: Trying to get property of non-object in /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/lib/TumblrCrosspostrAPIClient.php on line 32
    
    Call Stack:
        0.0005     351256   1. {main}() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/post-new.php:0
        0.6209   26538084   2. include('/var/www/domain.com/releases/20140804104857/web/wp/wp-admin/edit-form-advanced.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/post-new.php:65
        0.6969   27473952   3. do_meta_boxes() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/edit-form-advanced.php:546
        0.7095   27485732   4. call_user_func() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/includes/template.php:924
        0.7095   27485764   5. Tumblr_Crosspostr->renderMetaBox() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/includes/template.php:0
        0.7110   27487716   6. Tumblr_Crosspostr->tumblrBlogsSelectField() /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php:858
        0.7110   27487908   7. Tumblr_Crosspostr_API_Client->getUserBlogs() /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php:1459
    
    Warning: Invalid argument supplied for foreach() in /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php on line 1459
    
    Call Stack:
        0.0005     351256   1. {main}() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/post-new.php:0
        0.6209   26538084   2. include('/var/www/domain.com/releases/20140804104857/web/wp/wp-admin/edit-form-advanced.php') /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/post-new.php:65
        0.6969   27473952   3. do_meta_boxes() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/edit-form-advanced.php:546
        0.7095   27485732   4. call_user_func() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/includes/template.php:924
        0.7095   27485764   5. Tumblr_Crosspostr->renderMetaBox() /var/www/domain.com/releases/20140804104857/web/wp/wp-admin/includes/template.php:0
        0.7110   27487716   6. Tumblr_Crosspostr->tumblrBlogsSelectField() /var/www/domain.com/releases/20140804104857/web/app/plugins/tumblr-crosspostr/tumblr-crosspostr.php:858

    Still not sure why uploads fail, as this isn’t anything fatal either..

    Edit 2: Also tried running curl -I https://www.tumblr.com/oauth/authorize?oauth_token=xxx from the live server. It shows:

    HTTP/1.1 302 Moved Temporarily
    Server: nginx
    Date: Mon, 04 Aug 2014 11:04:32 GMT
    Content-Type: text/html
    Connection: keep-alive
    Set-Cookie: tmgioct=53df68c073aa830137052310; expires=Thu, 01-Aug-2024 11:04:32 GMT; path=/; httponly
    P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
    Location: /
    X-UA-Compatible: IE=Edge,chrome=1

    So the server can access the tumblr servers..

    Omg. Thought I’d tried everything. You know what solved it? Simply rebooting the Digital Ocean Droplet and it was working again (Still using the credentials from the local install though).

    Hope it’ll be of some help for others facing this problem.

    Plugin Author Meitar

    (@meitar)

    Digital Ocean Droplet? This is a virtual server, yes?

    FWIW, I’m gonna take a guess and say that what may have been happening for you is that your PHP session was never getting cleared so each time you connected to the server you were reloading the $_SESSION variables from before. Rebooting your VPS clears your /tmp directory, wiping out your PHP session store.

    Just a guess, but seems plausible.

    Regardless, I’m glad you got it working. ??

    I have also not been able to get my wordpress site to connect with tumblr in this plugin, and have been trying everything in this thread without success.

    I enabled debug logging, and found this in my log:

    [25-Oct-2014 05:50:59 UTC] PHP Warning:  Unknown: open(/var/php_sessions/sess_6d0319c1dcdea40d28c5473c652466b0, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
    [25-Oct-2014 05:50:59 UTC] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0

    I don’t have shell access on my host, so I can’t access /var, or anything outside of my /home directory. I can only access my /home folder.

    However, my host does allow me to edit php.ini. (I’m on ipower, and this is found under “CGI and scripted language support > PHP Scripting”. My host is running PHP 5.3.13)

    I changed this line in php.ini:

    session.save_path = "/var/php_sessions"

    to reflect a path that already had a phpsessions directory I had access to in my /root path. It looks like an older version of php used it, and was no longer used when my host upgraded PHP.

    Changing this session.save_path fixed my issue, and now the plugin can connect to tumblr, shows my tumblelog, and everything seems to work as intended.

    I wanted to share my solution, in case it could help someone else.

    Plugin Author Meitar

    (@meitar)

    Thanks for detailing this, Iomara. ?? Figured this had something to do with wonky PHP server settings but it’s nice to read validation that is indeed related.

    JeremiahAndrewsPhotography

    (@jeremiahandrewsphotography)

    I am receiving a 404 error code when I select the “click here to connect” button. the web address bar changes from:
    https://jap.goodgallery.com/blog/wp-admin/options-general.php?page=tumblr_crosspostr_settings

    to:
    https://jap.goodgallery.com/oauth/authorize?oauth_token=rZEJ2T9XsxMlX4V3EWFYJ6SxgWkwcjV8jggEDxlJP1NzKUXNgq

    I have tried to delete browsing history, closed all open browsers and reboot, requested new codes. I am wondering if this issue has something to do with the code requesting process … I am using the autofilled info in the “application website” field and the same info in the “APP Store URL” fields. I assumed that the URL info should be entered as I would access the site and entered it as such (see above), but should I be entering the public access for the website instead?

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘"Click here to connect to Tumblr" not working’ is closed to new replies.