Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing/Unhelpful Error at Login When XML-RPC Is Blocked #8459

Closed
SiobhyB opened this issue Oct 21, 2018 · 12 comments
Closed

Confusing/Unhelpful Error at Login When XML-RPC Is Blocked #8459

SiobhyB opened this issue Oct 21, 2018 · 12 comments

Comments

@SiobhyB
Copy link
Contributor

SiobhyB commented Oct 21, 2018

Expected behavior

If I enter the URL for a WordPress site that blocks XML-RPC, I expect to receive a helpful error message that informs me why I'm not able to log into that site via the app.

Actual behavior

The following error appears when a URL for a WordPress site that blocks XML-RPC is entered:

"Couldn't connect to WordPress site. There is no valid WordPress site at this address. Check the site address (URL) you entered."

Screenshot:

screenshot_20181021-212857

Steps to reproduce the behavior

  1. Navigate to the app's login screen and select the "Log in by entering site address" option.
  2. Submit the URL to a site that blocks XML-RPC.
Tested on Pixel, alpha-132 of WordPress for Android

As per this convo, more informative error messages were displaying in the Android app until at least March:

https://a8c.slack.com/archives/C9JMWK5HQ/p1520333424000220-slack-happier-hes

It seems the code for these errors are defined here:

https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/develop/fluxc/src/main/java/org/wordpress/android/fluxc/network/discovery/SelfHostedEndpointFinder.java

@SiobhyB
Copy link
Contributor Author

SiobhyB commented Oct 21, 2018

iOS version: wordpress-mobile/WordPress-iOS#10293

@aerych
Copy link
Member

aerych commented Oct 22, 2018

A few thoughts:

  • We need to harmonize the messages shown between WPAndroid and WPiOS.
  • This might be a good time to switch from our current self-hosted discovery logic to querying public-api.wordpress.com/rest/v1.1/connect/site-info or use this call as a fall back.
  • When all else fails we might check for the presence of the WP REST API to confirm we're dealing with a self-hosted site.
  • In cases where we can't identify a WordPress site it would be nice if we could tweak the message shown to allow for cases the apps are wrong.

@planarvoid
Copy link
Contributor

planarvoid commented Oct 23, 2018

@aerych

  • We need to harmonize the messages shown between WPAndroid and WPiOS.
  • querying public-api.wordpress.com/rest/v1.1/connect/site-info
  • check for the presence of the WP REST API

All of these make sense as a new project. I think switching to the other endpoint is not a short time fix. Quoting the docs - "RSD is the least-preferred method of autodiscovery" and we still use it - so we should definitely plan this. If we get a list of sites that are showing the incorrect message, we could investigate them and try to fix them.

@shiki
Copy link
Member

shiki commented Jul 19, 2019

@planarvoid Is PR wordpress-mobile/WordPress-FluxC-Android#943 supposed to fix this issue? I'm not sure how to reproduce this so I thought I'd ask you first.

@planarvoid
Copy link
Contributor

@shiki I don't think so. I think the issue is much bigger and this only added some additional information in one certain case. I don't remember the details though

@malinajirka
Copy link
Contributor

malinajirka commented Aug 14, 2019

I like Aerych's proposal, but I completely agree with Vojta. It might be better to handle it in a small project and not as a quick groundskeeping fix.

@SiobhyB I've tried the following and all the messages looked ok

  1. Forbidden XML-RPC (403 error)

Screenshot 2019-08-14 at 10 18 33

2. Missing XML-RPC methods

Screenshot 2019-08-14 at 10 18 53

3. Blocked XML-RPC (405 error)

Screenshot 2019-08-14 at 10 19 09

Can you please confirm it works as expected and close the issue.

Thank you!

Update: cc @designsimply

@oguzkocer
Copy link
Contributor

@malinajirka Do you know the steps to reproduce each scenario in the app? If so, could you document them? I know we can manually trigger each one from the code, but I am not entirely sure how to setup the site to do it.

@malinajirka
Copy link
Contributor

malinajirka commented Jan 31, 2020

@oguzkocer IIRC the testing steps are the same for all the errors. The only thing that changes is the URL of the self-hosted site. I used the URLs from the test.properties in FluxC. The file is private, so I'd rather not share it publicly.

  1. Click on "Log in"
  2. Click on "Log in by entering your site address"
  3. Enter the URL and click on "Next"
  4. Notice the error.

The urls in the test.properties has the following comments

  1. Self hosted - Forbidden XML-RPC (403 error)
  2. Self hosted - Missing XML-RPC methods
  3. Self hosted - Blocked XML-RPC (405 error)

Let me know if you need more info ;)

@oguzkocer
Copy link
Contributor

Thanks @malinajirka!

@designsimply I've also verified that we are getting the messages we expect from the server for each case as documented by Jirka in this comment.

My suggestion is to close this issue. If we feel further improvement is necessary, we can open a new issue describing the expectations. I think the current messages are very descriptive and any further improvement here will have diminishing returns.


Related to the discussion we were having on Slack about a way for HEs to test/reproduce the issue, I think these error messages will likely be enough. If we feel they are lacking in this regard, it'd be good to document why that is in a separate issue and figure out the best way to tackle it.

@SiobhyB
Copy link
Contributor Author

SiobhyB commented Mar 21, 2021

@SiobhyB I've tried the following and all the messages looked ok. Can you please confirm it works as expected and close the issue.

@malinajirka, sorry that I missed your ping originally! I was on sabbatical at the time and pretty much wiped all emails when I was back. 🤦‍♀️ I'm seeing the "missing XML-RPC methods" error when testing a few examples but there also still seem to be some cases where the generic "couldn't connect to WordPress site" error is show, such as the site listed in 3829320-zen. I also see a more recent issue was created in #12401 for this. I'm happy for this older one to be closed in favour of that one.

@malinajirka
Copy link
Contributor

No worries at all @SiobhyB! These two issues seem quite similar. I'd suggest closing this one as you suggested. We might also consider assigning the other issue to groundskeeping if you feel it should be prioritized. Wdyt?

@designsimply
Copy link
Contributor

+1 to closing in favor of #12401 and adding to Groundskeeping. I'll do both. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants