mastodon_wordpress_autopost
mastodon_wordpress_autopost copied to clipboard
Authorization fails silently
Hi.
I just installed Mastodon Autopost on a Wordpress 4.9.8 server (https://rose.telecom-paristech.fr/2019) that we are configuring. This WP server, despite being accessible from the internet, must use a proxy to access the internet, and this proxy is configured properly (WP_PROXY_HOST
/WP_PROXY_PORT
) and works fine to retrieve for example Wordpress plugins or upgrade Wordpress automatically.
When I choose my instance https://mamot.fr
(the account is https://mamot.fr/@rose) I get redirected to the authorization page on mamot.fr as expected, I press "Authorize" and get redirected to the Mastodon Autopost page on my Wordpress server.
However:
- No application is authorized on mamot.fr when I check.
- The Mastodon Autopost settings requests that I add a Mastodon account.
I also used with an account on mastodon.social to rule out any mamot.fr specificity, with the same results.
Any idea of what might have happened and how to fix it?
It could have something todo with the proxy. Sorry I never had that case.
Could you provide me with the manual how you did setup the proxy? (So maybe I can reproduce the bug on my testsystem)
At the end of wp-config.php
, I have:
define('WP_PROXY_HOST', 'host.name.of.my.proxy');
define('WP_PROXY_PORT', '3128');
define('WP_PROXY_BYPASS_HOSTS','localhost');
So with what url do you access your wordpress? Via the proxy url or the wordpress url?
Via wordpress URL. My wordpress is reachable from outside (https://rose.telecom-paristech.fr/2019), but it cannot itself access outside resources without using the proxy.
All the research I did brought me to the conclusion, that the standard wp_remote_get/post() I use should work with proxy.
Are you sure that your provider allows outgoing connections trough the proxy?
Yes. Not only did the plugin (as well as all updates to wordpress and plugins) get installed through the proxy, but a Twitter gateway plugin works just fine as well through the proxy. It is also my understanding that wp_remote_{get,post}
uses the proxy. Unfortunately, I couldn't find a setting in the plugin to enable debugging and trace what currently happens.
I am having a related issue, I click Authorize, am sent to Mastodon.social where I confirm, and then I'm redirected to my homepage and nothing has happened. I have no proxy setup though.
@RosemaryOrchard On what mastodon version is your server on? With the last update I introduced the narrowed down scopes, that are only available from v2.4.3 on.
According to https://mastodon.social/about it's running v2.8.0rc1
I'm having the same problem as @RosemaryOrchard with https://mastodon.sdf.org, which runs v2.7.4.
Same issue as @RosemaryOrchard on mastodon.social
. I am unsure of where I can check mastodon.social
's Mastodon version.
same issue on mstdn.su - v2.6.1
Fatal error: Uncaught Error: Call to a member function get() on null in /home/public_html/wp-includes/query.php:28
WP_Hook->apply_filters('HTTP/1.1 302 Fo...', Array) #3 /home/public_html/wp-includes/functions.php(1240): apply_filters('status_header', 'HTTP/1.1 302 Fo...', 302, 'Found', 'HTTP/1.1') #4 /home/public_html/wp-includes/pluggable.php(1235): status_header(302) #5 /home/public_html/wp-content/plugins/autopost-to-mastodon/mastodon_autopost.php(83): wp_redirect('https://planetr...') #6 /home/public_html/wp-includes/class-wp-hook.php(286): autopostToMastodon->init('') #7 /home/public_html/wp-includes/class-wp-hook.p in /home/public_html/wp-includes/query.php on line 28
Would you folks please try again with version 3.2.8 ? I hope it is fixed now. On my wp it works with chaos.social
Thanks
I am afraid it's not, for me. I am on 3.2.8 now, but I see this after authenticating with mastodon.social
:
Warning: Cannot modify header information - headers already sent by (output started at /srv/users/usera1de559a/apps/usera1de559a/public/wp-content/plugins/autopost-to-mastodon/mastodon_autopost.php:49) in /srv/users/usera1de559a/apps/usera1de559a/public/wp-includes/pluggable.php on line 1251
Warning: Cannot modify header information - headers already sent by (output started at /srv/users/usera1de559a/apps/usera1de559a/public/wp-content/plugins/autopost-to-mastodon/mastodon_autopost.php:49) in /srv/users/usera1de559a/apps/usera1de559a/public/wp-includes/pluggable.php on line 1254
Authentification, please wait...
I waited a bit to see if the page redirects me to the intended view, but no, it does not.