Wordpress-android: Facebook publicize connection keeps failing

Created on 3 Dec 2018  路  6Comments  路  Source: wordpress-mobile/WordPress-Android

Related to #8115

Expected behavior

When the user tries to connect a Facebook account with no pages to their site the app displays meaningful error with explanation why it can't connect to the account.

Actual behavior

When the user tries to connect a Facebook account with no pages to their site the app displays generic error which isn't very helpful.

Steps to reproduce the behavior

  1. Try to add a Facebook account with no pages.

Notes
I think the issue is on the following line -> we don't show the chooser dialog when there is exactly one connection and we assume this connection will work. However, if this is a User Profile connection and the service (such as Facebook) doesn't support other than external connections, it'll fail with meaningless error message.

I think we should modify the check to if (... || jsonConnectionList.length() == 0) and here propagate a specific error to the UI and show a meaningful message.

cc @kwonye

Sharing [Type] Bug

All 6 comments

That sounds like a great solution, @malinajirka. If I recall correctly I thought we didn't get a profile back at all if there was no pages. Looks like that's not the case.

Tested and confirmed (11s) using WPAndroid alpha-156 (12.0 alpha) on Pixel 3 Android 9. In my case I tested with a Facebook account that has a Page that is unpublished in Facebook > Page > Settings > General > Page Visibility (screenshot).

sharing-screen connect-facebook connect-facebook-profile-error

I couldn't get the app logs to save for some reason (or I missed them) but I caught a screenshot:

Screenshot_20190318-111926

This came up again in 12.3 beta testing. I found that I was unable to connect Facebook or LinkedIn鈥攖he result was the same for each: "An error occurred". My test Facebook account does have a Page but it is unpublished (screenshot).

Video: 4m39s

Screen Shot 2019-05-03 at 1 10 04 AM   Screen Shot 2019-05-03 at 1 10 49 AM
Tested with WPAndroid alpha-168 on Pixel 3 Android 9 on architectural-worm.wordpress.com Jetpack (and also other sites).

app-log-to-connect-LinkedIn-and-Facebook-sharing-services.txt

71 - [May-03 01:54 SHARING] publicize service > created
72 - [May-03 01:54 SHARING] publicize service > destroyed
73 - [May-03 01:54 SHARING] null
74 - [May-03 01:54 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)

75 - [May-03 01:54 UTILS] App goes to background
76 - [May-03 01:54 MAIN] ConnectionChangeReceiver successfully unregistered
77 - [May-03 01:55 UTILS] App comes from background

(internal reference: p5T066-Pl-p2)

Here is a ticket with a user experiencing this issue. Getting more info from the user to understand the issue 2047729-zen.

@osullivanchris 2047729-zen mentions a different case because they are trying to connect a Facebook account with a page whereas this bug is about trying to connect a Facebook account with no pages. If you can open a new issue with a quick list of steps to reproduce then I will check it out!

The LinkedIn failure does not seem to be related to the Facebook error. I created a separate issue for it: https://github.com/wordpress-mobile/WordPress-Android/issues/10252.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

designsimply picture designsimply  路  29Comments

roundhill picture roundhill  路  33Comments

malinajirka picture malinajirka  路  20Comments

oguzkocer picture oguzkocer  路  64Comments

oguzkocer picture oguzkocer  路  27Comments