I expected to be able to connect my WordPress.com site to my Twitter account or other social media accounts so that future blog posts are automatically shared.
After going through the steps to connect to my Twitter account, when I have connected more than one Twitter account in the past, a toast message comes up with an error and the site isn't connected.
Similar errors occur for other social media accounts I try to connect (LinkedIn, Facebook).
If you don't see the Connecting Twitter modal, and your Twitter account is connected successfully, delete the connection and repeat the steps above using a second Twitter account. The second time, you will see the Connecting Twitter modal with both Twitter accounts.
Result: A toast message comes up with the error "An error occurred."
I confirmed the issue, and confirmed that it's only happening with Twitter (not other publicize connections) and only on Android (works as expected on iOS & web).
When I try to connect to Twitter I get the following in my app log:
92 - [Nov-22 10:44 SHARING] null
93 - [Nov-22 10:44 SHARING] StackTrace: com.android.volley.ServerError
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:179)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114)
We had a report of an error connecting to Facebook in 1587043-z, also.
I tested and was able to reproduce the error when attempting to connect to a Facebook page.
I also tested connecting to LinkedIn within the Android app and saw an error there too.
I don't have a Tumblr account to test with.
Here's the specific Volley error I'm getting — I'm now seeing it on different Publicize connections, not just Twitter, and regardless of the locale:
11-23 11:08:33.246 8823-8898/? E/Volley: [1553] BasicNetwork.performRequest: Unexpected response code 400 for https://public-api.wordpress.com/rest/v1.1/sites/154199540/publicize-connections/new?locale=en_US
I just checked the user reports, and I think the issue we see when testing in the alpha version is different from what these users are running into.
In 1581544-zen the user reports this error after entering their Twitter details:
Unable to verify account name or password
That suggests an authentication error. Can we confirm exactly where that error appears (i.e. does it come from Twitter or from the WP app)?
In 1587043-zen the logs indicate that something is blocking the user's device from connection to the WordPress.com API altogether.
Other testing results:
I see the same behavior on my moto e5 play with Android 8.1 and my Nexus 9 with Android 7.1.1.
I updated to alpha-138 and get the same results, and I switched back to the release version 11.2 (from the play store) and also get the same results there.
When I use a new test account and site, instead of the issue described above I get this error immediately after selecting Connect on any sharing service (before I have a chance to log in to the service):
Invalid/missing request nonce
I investigated this issue with @planarvoid and we concluded that the error is related to the Connecting Twitter modal that appears when you have connected multiple Twitter accounts in the past. I also see that modal for other services (LinkedIn, Facebook) that result in the same error, regardless of the number of accounts previously connected. I updated the original issue based on those finding.
Since it isn't breaking _all_ new connections, and the user reports seem to have a different root cause, it isn't as urgent as it seemed at first. I've marked it for priority groundskeeping but we should monitor for further reports in case there's an uptick in reports of the exact error we see in testing.
@rachelmcr: Thanks again for looking into this! I've followed up with the user in 1581544-zen to get those extra details.
We also have another report in 1588765-z from a user trying to connect to Facebook.
I did a quick sweep through issues and am finding a number of reports (including much older versions) that fit this issue:
It looks like the earliest report of this issue is in 10.4, which released in July. One important thing to note is that this release coincides with the point where Facebook removed the ability to publicize to Facebook profiles (you can only connect to pages now). I wonder if this error is occurring for accounts where there was previously a Facebook profile connected.
User has reported that the issue is specific to their WP App and not showing in Twitter. They also mentioned having troubles to share any post from the app in particular, so I'm wondering if this is more related to authentication with the app. I have asked them to log out and back in to their WordPress.com account to confirm if the issue still happens after doing so.
1581544-zen
The user in 1590155-zen did confirm this only happened when they try to add a new connection. Despite the old connection being broken in Publicize Report and not displaying in the site as connected on a browser, when clicking to connect through Twitter, the option displayed in the app also showed the old connection.

When trying to connect through a browser, they were able to connect to the new Twitter account.
I also wanted to note that Publicize Report showed the new connection 'ok' after the user had tried to add it through the app even though it wasn't actually connected.
A two star review in Google Play:
Can't seem to connect to my social media accounts... I get error messages always
A four star review in Google Play:
Good app Little problem though...I am yet to configure it to automatically share my blog posts on the social media platforms. It keeps showing "an error occurred".
Another report of this same issue was mentioned in 1612501-zen.
The user was able to connect through the browser, but before doing so old connections were showing in Publicize RC.
Tested and confirmed using WPAndroid alpha-156 (12.0 alpha) on Pixel 3 Android 9 with a WordPress.com Business site (simple, no plugins). (24s)

I am moving this to the Prioritized Android list in Groundskeeping for review because there have been several user reports and low app star ratings because of it.
Adding [Pri] High to this issue because of the high number of user reports and because it has been confirmed a few times over.
First report: 132 days ago on Nov 22, 2019
User impact: 19 reports and low app store ratings referenced by happiness engineers.
Validity: tested and confirmed by 3 people.