wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.97k stars 1.32k forks source link

Unified Login: site address login fails with "Error while adding site. Error code GENERIC_ERROR" for private custom-domain WordPress.com sites using a 2FA login #12832

Closed rezzap closed 4 years ago

rezzap commented 4 years ago

Expected behavior

I would expect that I could log in with the new unified login flow using my site address for a private WordPress.com site with a custom domain or be directed in the correct direction to be able to login.

Actual behavior

When I try to log in with my site address for a WordPress.com site using a custom domain, I get a generic error message.

Steps to reproduce the behavior

  1. Install the app fresh.
  2. Use the Enter Site Address of a WordPress.com private site using a custom domain (this may require an account with 2FA enabled)
  3. Enter your log in credentials in the next screen and see the Generic Error screen. Image 2020-08-29 at 1 54 03 pm

Note that on iOS I got a pop-up error at this same stage with the notice this account has two-step authentication enabled. Please configure an application-specific password to use with this application so I tried doing this on Android and was able to log in to the site using the application-specific password.

On all other types of sites I tried this worked normally:

As a side-note, it's also odd that on iOS when I log in with the application-specific password I am logged into my WordPress.com account, but on Android, although I see all my sites listed and can manage them in the app if I click on 'Me' I'm not logged into my WordPress.com account which means there is no way for me to log out of these sites or WordPress.com without first logging into WordPress.com and logging out again.

Tested on Samsung Tab A, Android 10, WPAndroid 15.5-rc-3 & 15.6-rc-2
designsimply commented 4 years ago

Tested and confirmed that attempting a 2FA login for a WordPress.com custom-domain private site using the site address flow fails with the following error while a 2FA login in for a .wordpress.com private site on the same account using the site address flow works normally.

Error while adding site. Error code GENERIC_ERROR

Video: 2m3s Tested with WPAndroid 15.6-rc-2 on Pixel 3 Android 10 logging to gotravelrewards.blog (while set to private) using the "Enter your site address" login flow.

image
App logs for the timestamp matching the video ``` WordPress - 15.6-rc-2 - Version code: 913 Android device name: Google Pixel 3 01 - [Aug-31 23:29 API] StackTrace: com.android.volley.VolleyError: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:66) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:143) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) Caused by: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLSerializerUtils.deserialize(XMLSerializerUtils.java:84) at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:63) ... 3 more 02 - [Aug-31 23:29 API] Dispatching action: SiteAction-UPDATE_SITE 03 - [Aug-31 23:29 API] Volley error on https://myfiadventures.wordpress.com/xmlrpc.php - exception: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. 04 - [Aug-31 23:29 API] StackTrace: com.android.volley.VolleyError: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:66) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:143) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) Caused by: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLSerializerUtils.deserialize(XMLSerializerUtils.java:84) at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:63) ... 3 more 05 - [Aug-31 23:29 API] Dispatching action: SiteAction-FETCHED_POST_FORMATS 06 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 07 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 08 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 09 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 10 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 11 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 12 - [Aug-31 23:29 API] Dispatching action: SiteAction-REMOVE_SITE 13 - [Aug-31 23:29 API] Volley error on https://lovinglycompetitivestorytellingnews.wordpress.com/xmlrpc.php - exception: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. 14 - [Aug-31 23:29 API] StackTrace: com.android.volley.VolleyError: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:66) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:143) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) Caused by: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLSerializerUtils.deserialize(XMLSerializerUtils.java:84) at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:63) ... 3 more 15 - [Aug-31 23:29 API] Dispatching action: SiteAction-UPDATE_SITE 16 - [Aug-31 23:29 API] Volley error on https://lovinglycompetitivestorytellingnews.wordpress.com/xmlrpc.php - exception: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. 17 - [Aug-31 23:29 API] StackTrace: com.android.volley.VolleyError: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:66) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:143) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) Caused by: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLSerializerUtils.deserialize(XMLSerializerUtils.java:84) at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:63) ... 3 more 18 - [Aug-31 23:29 API] Dispatching action: SiteAction-FETCHED_POST_FORMATS 19 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 20 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 21 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 22 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 23 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 24 - [Aug-31 23:29 SETTINGS] An error occurred while updating the post formats with type: GENERIC_ERROR 25 - [Aug-31 23:29 API] Dispatching action: SiteAction-REMOVE_SITE 26 - [Aug-31 23:29 STATS] 🔵 Tracked: login_accessed 27 - [Aug-31 23:29 STATS] 🔵 Tracked: login_prologue_viewed 28 - [Aug-31 23:29 STATS] 🔵 Tracked: unified_login_step, Properties: {"source":"default","flow":"prologue","step":"prologue"} 29 - [Aug-31 23:29 NUX] Google API client connected 30 - [Aug-31 23:29 NUX] SmartLock: Unsuccessful credential request. 31 - [Aug-31 23:29 STATS] 🔵 Tracked: unified_login_interaction, Properties: {"source":"default","flow":"prologue","step":"prologue","click":"login_with_site_address"} 32 - [Aug-31 23:29 STATS] 🔵 Tracked: login_url_form_viewed 33 - [Aug-31 23:29 STATS] 🔵 Tracked: unified_login_step, Properties: {"source":"default","flow":"login_site_address","step":"start"} 34 - [Aug-31 23:30 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"start","failure":"Please enter a complete website address, like example.com."} 35 - [Aug-31 23:30 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"start","failure":"Please enter a complete website address, like example.com."} 36 - [Aug-31 23:30 STATS] 🔵 Tracked: unified_login_interaction, Properties: {"source":"default","flow":"login_site_address","step":"start","click":"submit"} 37 - [Aug-31 23:30 API] Dispatching action: SiteAction-FETCH_WPCOM_SITE_BY_URL 38 - [Aug-31 23:31 STATS] 🔵 Tracked: unified_login_interaction, Properties: {"source":"default","flow":"login_site_address","step":"start","click":"submit"} 39 - [Aug-31 23:31 API] Dispatching action: SiteAction-FETCH_WPCOM_SITE_BY_URL 40 - [Aug-31 23:31 UTILS] App goes to background 41 - [Aug-31 23:31 STATS] 🔵 Tracked: application_closed, Properties: {"time_in_main_reader":0,"last_visible_screen":"Site Picker","time_in_reader_paged_post":0,"time_in_app":249,"time_in_subfiltered_list":0,"time_in_reader_filtered_list":0} 42 - [Aug-31 23:31 MAIN] ConnectionChangeReceiver successfully unregistered 43 - [Aug-31 23:31 API] Volley error on https://public-api.wordpress.com/rest/v1.1/sites/gotravelrewards.blog/?locale=en_US - exception: java.net.ConnectException: Failed to connect to public-api.wordpress.com/192.0.78.23:443 44 - [Aug-31 23:31 API] StackTrace: com.android.volley.NoConnectionError: java.net.ConnectException: Failed to connect to public-api.wordpress.com/192.0.78.23:443 at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:181) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) Caused by: java.net.ConnectException: Failed to connect to public-api.wordpress.com/192.0.78.23:443 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) at okhttp3.RealCall.execute(RealCall.java:77) at org.wordpress.android.fluxc.network.OkHttpStack.performRequest(OkHttpStack.java:66) at com.android.volley.toolbox.AdaptedHttpStack.executeRequest(AdaptedHttpStack.java:48) at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:123) ... 3 more Caused by: java.net.ConnectException: failed to connect to public-api.wordpress.com/192.0.78.23 (port 443) from /:: (port 0) after 30000ms: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.IoBridge.connect(IoBridge.java:143) at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436) at java.net.Socket.connect(Socket.java:621) at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:69) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238) ... 23 more Caused by: android.system.ErrnoException: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.Linux.connect(Native Method) at libcore.io.ForwardingOs.connect(ForwardingOs.java:95) at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:136) at libcore.io.ForwardingOs.connect(ForwardingOs.java:95) at libcore.io.IoBridge.connectErrno(IoBridge.java:174) at libcore.io.IoBridge.connect(IoBridge.java:135) ... 31 more 45 - [Aug-31 23:31 API] Dispatching action: SiteAction-FETCHED_WPCOM_SITE_BY_URL 46 - [Aug-31 23:31 API] Volley error on https://public-api.wordpress.com/rest/v1.1/sites/gotravelrewards.blog/?locale=en_US - exception: java.net.ConnectException: Failed to connect to public-api.wordpress.com/192.0.78.23:443 47 - [Aug-31 23:31 API] StackTrace: com.android.volley.NoConnectionError: java.net.ConnectException: Failed to connect to public-api.wordpress.com/192.0.78.23:443 at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:181) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) Caused by: java.net.ConnectException: Failed to connect to public-api.wordpress.com/192.0.78.23:443 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) at okhttp3.RealCall.execute(RealCall.java:77) at org.wordpress.android.fluxc.network.OkHttpStack.performRequest(OkHttpStack.java:66) at com.android.volley.toolbox.AdaptedHttpStack.executeRequest(AdaptedHttpStack.java:48) at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:123) ... 3 more Caused by: java.net.ConnectException: failed to connect to public-api.wordpress.com/192.0.78.23 (port 443) from /:: (port 0) after 60000ms: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.IoBridge.connect(IoBridge.java:143) at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436) at java.net.Socket.connect(Socket.java:621) at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:69) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238) ... 23 more Caused by: android.system.ErrnoException: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.Linux.connect(Native Method) at libcore.io.ForwardingOs.connect(ForwardingOs.java:95) at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:136) at libcore.io.ForwardingOs.connect(ForwardingOs.java:95) at libcore.io.IoBridge.connectErrno(IoBridge.java:174) at libcore.io.IoBridge.connect(IoBridge.java:135) ... 31 more 48 - [Aug-31 23:31 API] Dispatching action: SiteAction-FETCHED_WPCOM_SITE_BY_URL 49 - [Aug-31 23:31 UTILS] App comes from background 50 - [Aug-31 23:31 STATS] 🔵 Tracked: application_opened 51 - [Aug-31 23:31 NUX] Google API client connected 52 - [Aug-31 23:31 UTILS] Remote config updated: false 53 - [Aug-31 23:31 STATS] 🔵 Tracked: unified_login_interaction, Properties: {"source":"default","flow":"login_site_address","step":"start","click":"submit"} 54 - [Aug-31 23:31 API] Dispatching action: SiteAction-FETCH_WPCOM_SITE_BY_URL 55 - [Aug-31 23:31 API] Volley error on https://public-api.wordpress.com/rest/v1.1/sites/gotravelrewards.blog/?locale=en_US - exception: null 56 - [Aug-31 23:31 API] StackTrace: com.android.volley.AuthFailureError at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:195) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) 57 - [Aug-31 23:31 API] Dispatching action: SiteAction-FETCHED_WPCOM_SITE_BY_URL 58 - [Aug-31 23:31 API] Dispatching action: AuthenticationAction-DISCOVER_ENDPOINT 59 - [Aug-31 23:31 NUX] Calling system.listMethods on the following URLs: [https://gotravelrewards.blog/xmlrpc.php, http://gotravelrewards.blog/xmlrpc.php, https://gotravelrewards.blog, http://gotravelrewards.blog, gotravelrewards.blog] 60 - [Aug-31 23:31 NUX] Trying system.listMethods on the following URL: https://gotravelrewards.blog/xmlrpc.php 61 - [Aug-31 23:31 NUX] system.listMethods replied with XML-RPC objects for https://gotravelrewards.blog/xmlrpc.php 62 - [Aug-31 23:31 NUX] Validating the XML-RPC response... 63 - [Aug-31 23:31 NUX] Validation ended with success! Endpoint found! 64 - [Aug-31 23:31 API] Dispatching action: AuthenticationAction-DISCOVERY_RESULT 65 - [Aug-31 23:31 NUX] Discovery succeeded, endpoint: https://gotravelrewards.blog/xmlrpc.php 66 - [Aug-31 23:31 NUX] Discovery succeeded, endpoint: https://gotravelrewards.blog/xmlrpc.php 67 - [Aug-31 23:31 STATS] 🔵 Tracked: login_username_password_form_viewed 68 - [Aug-31 23:31 STATS] 🔵 Tracked: unified_login_step, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 69 - [Aug-31 23:31 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 70 - [Aug-31 23:31 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 71 - [Aug-31 23:31 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 72 - [Aug-31 23:31 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 73 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 74 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 75 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 76 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 77 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 78 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 79 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 80 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 81 - [Aug-31 23:32 UTILS] App goes to background 82 - [Aug-31 23:32 STATS] 🔵 Tracked: application_closed, Properties: {"time_in_main_reader":0,"last_visible_screen":"Site Picker","time_in_reader_paged_post":0,"time_in_app":17,"time_in_subfiltered_list":0,"time_in_reader_filtered_list":0} 83 - [Aug-31 23:32 MAIN] ConnectionChangeReceiver successfully unregistered 84 - [Aug-31 23:32 UTILS] App comes from background 85 - [Aug-31 23:32 STATS] 🔵 Tracked: application_opened 86 - [Aug-31 23:32 NUX] Google API client connected 87 - [Aug-31 23:32 UTILS] Remote config updated: false 88 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password"} 89 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_interaction, Properties: {"source":"default","flow":"login_site_address","step":"username_password","click":"submit"} 90 - [Aug-31 23:32 API] Dispatching action: SiteAction-FETCH_SITES_XML_RPC 91 - [Aug-31 23:32 API] Volley error on https://gotravelrewards.blog/xmlrpc.php - exception: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. 92 - [Aug-31 23:32 API] StackTrace: com.android.volley.VolleyError: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:66) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:143) at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90) Caused by: org.wordpress.android.fluxc.network.xmlrpc.XMLRPCFault: This account has two step authentication enabled. Please configure an application-specific password to use with this application. at org.wordpress.android.fluxc.network.xmlrpc.XMLSerializerUtils.deserialize(XMLSerializerUtils.java:84) at org.wordpress.android.fluxc.network.xmlrpc.XMLRPCRequest.parseNetworkResponse(XMLRPCRequest.java:63) ... 3 more 93 - [Aug-31 23:32 API] Dispatching action: SiteAction-FETCHED_SITES_XML_RPC 94 - [Aug-31 23:32 API] Login with username/pass onSiteChanged has error: GENERIC_ERROR - Error while adding site. Error code: GENERIC_ERROR 95 - [Aug-31 23:32 STATS] 🔵 Tracked: unified_login_failure, Properties: {"source":"default","flow":"login_site_address","step":"username_password","failure":"Error while adding site. Error code: GENERIC_ERROR"} 96 - [Aug-31 23:34 STATS] 🔵 Tracked: unified_login_interaction, Properties: {"source":"default","flow":"login_site_address","step":"username_password","click":"show_help"} 97 - [Aug-31 23:34 STATS] 🔵 Tracked: unified_login_step, Properties: {"source":"default","flow":"login_site_address","step":"help"} 98 - [Aug-31 23:34 STATS] 🔵 Tracked: support_opened, Properties: {"origin":"LOGIN_USERNAME_PASSWORD"} 99 - [Aug-31 23:34 UTILS] trackLastActivity, activityId: Help Screen ```
designsimply commented 4 years ago

I set this issue to medium priority because, even though this bug is in one of our critical flows (login), a workaround is available which is to use the "Continue with WordPress.com" login flow.

Adding the Requires Triage label to get a confirmation on priority—is medium fine or should this issue be escalated to high priority and assigned because it's a login issue?

@renanferrari or @planarvoid, in unified login, should logging in to a private custom-domain site also log me in to my WordPress.com account like it does for a private .wordpress.com domain site?

elibud commented 4 years ago

@frosty @renanferrari can you please look into this one?

planarvoid commented 4 years ago

let me know @renanferrari if you need any help with investigating/fixing this issue

renanferrari commented 4 years ago

@designsimply @elibud @planarvoid Thanks for pinging me here.

Adding the Requires Triage label to get a confirmation on priority—is medium fine or should this issue be escalated to high priority and assigned because it's a login issue?

Since that workaround is available, medium seems fine for me as well.

@renanferrari or @planarvoid, in unified login, should logging in to a private custom-domain site also log me in to my WordPress.com account like it does for a private .wordpress.com domain site?

I'm not sure. We haven't done much testing on the site address flow, since we haven't modified it in any meaningful way. That said, how would I go about testing a private site? Do we have a wpmt site for that? If not, I guess I should setup my own and if that's the case, is it just a matter of going to the site's settings and changing it to private? Other than that, if I'm understanding correctly, I also should have a custom domain in place and a 2FA enabled? Is that it?

designsimply commented 4 years ago

The wpmt sites are hosted elsewhere, and so you will want to setup a WordPress.com private site with a custom domain and set the owner account to be 2FA-enabled—quite the combination of things (another reason for medium priority and not high). 👍

I have a test account (I actually have MANY! 😂) and can add a test user to it if you have one (note: I almost always test as a regular user with an account separate from my a8c account for issues like this one). Or you can create a new test account and site any time. If you need free credits to use for testing the custom domain part, I can add those for you too.

designsimply commented 4 years ago

fwiw, here's the same flow tested on WPiOS 15.6.0.1 and you can see that the workaround in that case is to ask the user to sign in with an application-specific password (as mentioned on the issue). I suspect this is because if the site is private and has 2FA then we may not be able to detect that it's a WordPress.com at the login stage in the app (?) and if that's the case then this flow might be a good option to match with WPiOS on.

Video: 46s

Tested with WPiOS 15.6.0.1 TestFlight beta on iPhone 11 iOS 13.6.1.

image
designsimply commented 4 years ago

Alternately, I'd suggest simply logging someone with this kind of setup in to their WP.com account—if we can detect that—even if they choose the site address flow. I don't know why we'd want to let people sign in to WordPress.com with the site address flow anyway.

rezzap commented 4 years ago

Just for some context, the reason why I've brought this up is that I seem to be seeing an increase of WordPress.com users who end up in the site address log in flow and get confused or stuck. This is new since the unified login, but on testing, this was the only area I ran into trouble. A lot of 'new sites' are set to private by default so I think this could be affecting a high number of new users who are trying to log back into the app after already creating a WordPress.com account. I can keep track of more tickets though going forward to see how much this is impacting and help with prioritizing.

renanferrari commented 4 years ago

@planarvoid It seems that we are not handling this specific error on FluxC. I haven't looked into the endpoint we're using, but I think we can handle this by just updating FluxC. Could you please let me know what you think?

planarvoid commented 4 years ago

I don't really know any specifics @renanferrari of the FluxC part but I think you're right. It should be enough to use a specific error that says something similar as the iOS app.