Wordpress-ios: Domain Registrations are failing with "Please enter a valid address" a for valid addresses

Created on 28 Oct 2019  Â·  22Comments  Â·  Source: wordpress-mobile/WordPress-iOS

Expected behavior

Should be able to register a domain in the WordPress mobile app using United Kingdom as the country and HU5 3RJ or HU53RJ as the Postal Code.

Actual behavior

Selecting UK country code, not able to register a domain using the postal code HU5 3RJ - with or without the space will result in Please enter a valid postal code

Steps to reproduce the behavior

  1. Have WordPress.com site with domain credit
  2. In App, tap Register domain, filling out contact information
  3. Register domain once all fields are filled out.
Tested on iPhone X, iOS [version], WPiOS 13.4.1
Domain Credit Mobile Request [Pri] High [Type] Bug

Most helpful comment

@pinarol I tested with my UK address on a phone and also saw validation errors for the Address and Postal Code fields.

I checked our validation and the main problem seems to be with the space character: The API only allows a regular space character (char code 32), but the app is sending a non-breaking space character (char code 160) for any spaces.

When I delete the space in my postcode it doesn't validate, which per the discussion in https://github.com/Automattic/wp-calypso/issues/8681#issuecomment-336752693 is the expected behavior for UK postcodes.

All 22 comments

Tested in Calypso on web, not a problem. Video:

Changed video to private for privacy reasons. Ping me for password.

Reported in 2453524-zen

Hi I’m trying to register my domain but it won’t accept my post code. Please can someone help?

Reported in 2455346-zen

I’m trying to register my domain but when I get to the address it doesn’t allow an UK address postcode?

Tested and confirmed that I cannot register a domain with an address using using certain post codes with an otherwise a valid UK address.

Note: I used https://www.royalmail.com/find-a-postcode to make sure the address I was testing was a valid address and postcode.

I also tested with 13.4.0.1 and 13.3.0.0 from TestFlight and found the same problem happens for me in those versions. I found that the problem does not happen in the Android app.

Aside: in v13.3 of the app, the "Problem purchasing your domain" notice happens every time it fails after tapping the "Register Domain" button while that notice appeared only the first time in v13.4+.

@danielebogo would you look into this when you have time?

@rfaile313 could you please let users know the temporary workaround is to use a browser to register their domain and that we're looking into the problem?

@rfaile313 could you please let users know the temporary workaround is to use a browser to register their domain and that we're looking into the problem?

Have done.

Hey @designsimply maybe @pinarol or @jklausa can help with this?

@pinarol could you check to see whether this is a quick fix for you? If not, we will queue it up for iOS Groundskeeping noting there are several high priority crashes that may take up the next few rotations which could push this issue back a few months.

Actually the error code is coming from the server side, from this endpoint : https://public-api.wordpress.com/rest/v1.1/me/domain-contact-information/validate

I tried the same thing on Calypso and the same service worked OK so it looks like we need to update something but I am comparing the request parameters sent by 2 platforms and they are the same.

I should be missing some context here. @jklausa any ideas?

A similar issue was reported for a US address where the domain registration form in WPiOS was rejected if "Unit 2" was used in Address line 1. It looked very similar to the UK postal codes not being accepted issue to me, but if it turns out it's not the same problem then we can create a separate bug report.

/hat tip @thehenrybyrd for the report, internal reference: p4a5px-2sE-p2

These validation errors are coming from server side, would it be possible to get some opinions from WP.com REST API developers? @designsimply

@pinarol I tested with my UK address on a phone and also saw validation errors for the Address and Postal Code fields.

I checked our validation and the main problem seems to be with the space character: The API only allows a regular space character (char code 32), but the app is sending a non-breaking space character (char code 160) for any spaces.

When I delete the space in my postcode it doesn't validate, which per the discussion in https://github.com/Automattic/wp-calypso/issues/8681#issuecomment-336752693 is the expected behavior for UK postcodes.

Could this be a side effect of the change in https://github.com/wordpress-mobile/WordPress-iOS/pull/12564?

@pinarol I tested a valid US address "1200 Getty Center Dr, Los Angeles, CA 90049" in the Domain Registration form for a WordPress.com Premium site and it works for me on Calypso (30s) but fails with the following errors on the iOS app. (37s)

Please enter a valid address
Please enter a valid City

I noticed in the app logs that it mentions tracking automated_transfer_custom_domain_suggestion_selected even though I wasn't using an automated transfer site, and there isn't too much info past that:

2019-11-04 10:31:45:367 🔵 Tracked: application_opened
2019-11-04 10:31:45:374 🔵 Tracked: my_site_tab_accessed
2019-11-04 10:31:45:390 checkAppleIDCredentialState: Apple ID state: 1
2019-11-04 10:31:46:400 🔵 Tracked: domain_credit_redemption_tapped
2019-11-04 10:31:47:924 🔵 Tracked: automated_transfer_custom_domain_suggestion_selected
2019-11-04 10:31:53:367 🔵 Tracked: automated_transfer_custom_domain_suggestion_selected
2019-11-04 10:32:00:529 TracksService sendQueuedEvents completed. Sent 6 events.
2019-11-04 10:32:20:651 🔵 Tracked: me_tab_accessed
2019-11-04 10:32:24:533 🔵 Tracked: my_site_tab_accessed
2019-11-04 10:32:30:683 TracksService sendQueuedEvents completed. Sent 2 events.
2019-11-04 10:32:36:253 🔵 Tracked: domain_credit_redemption_tapped
2019-11-04 10:32:38:536 🔵 Tracked: automated_transfer_custom_domain_suggestion_selected
2019-11-04 10:32:45:794 TracksService sendQueuedEvents completed. Sent 2 events.
2019-11-04 10:33:38:681 🔵 Tracked: automated_transfer_custom_domain_contact_information_validation_failed
2019-11-04 10:33:46:304 TracksService sendQueuedEvents completed. Sent 1 events.

I tested removing this line:

    textField.text = textField.text?.replacingOccurrences(of: " ", with: "\u{00a0}")

from this file:

WordPress/Classes/ViewRelated/Cells/InlineEditableNameValueCell.swift

ref: https://github.com/wordpress-mobile/WordPress-iOS/pull/12564/commits/613ab8411ae9693b52e8300b7799e280774bdbc4

and it worked for me with that line removed for both the UK postcode and the Los Angeles, CA addresses. (44s)

/hat tip @rachelmcr for finding the culprit!

@frosty can you help fix this since you were the reviewer on https://github.com/wordpress-mobile/WordPress-iOS/pull/12564?

I can look into this, sure!

Another report in 2471007-zen this time a Denmark address.

Hi, I’m trying to register my site as [domain]. The address form keeps saying that my address is invalid. It’s 100% my address though. Please help. Here’s what my address is: [Redacted]

Another report in 2471329-zen this time a Jamaica address.

Good morning. I have been having a challenge with registering my domain since last week. Every time I enter my address, an error comes up that prevents me from going further. This is strange since I am putting in my correct address. Also, I tried using other addresses and no matter what address I use, the same error message comes up. I’ve attached a copy of the message.

Report in 2473483-zen - looks like UK

Hi, my address is not accepted when I buy domain ... [my address] is the address?

This _should_ now be resolved in the next test release of 13.6.

@designsimply was this fix tested before the 13.6 release? I think we can close this issue but wanted to double check.

It was! Closing as fixed with https://github.com/wordpress-mobile/WordPress-iOS/pull/12886. Props @frosty. 🎉

I have a user on WordPress for iOS 14.0 reporting this same issue again when registering a domain. #2708585-zen

Thanks for the report! I confirmed the event automated_transfer_custom_domain_contact_information_validation_failed appears repeatedly in the user's logs. However, I tested (in the 14.2 internal beta) with the same address the user ended up using to successfully register the domain, and those same details worked in my test. I don't see any evidence that this same issue has come up again — it's possible the user actually entered invalid details without realizing it, or something else in their contact details didn't pass validation (in which case I'd recommend opening a new issue).

Although it's resolved for this user, in the future getting a screenshot of the app showing the contact information as it was entered is probably the most reliable way to capture what's causing the error.

Thank you for checking this out! I'm glad it doesn't look to be the same
issue.

On Thu, Feb 13, 2020 at 10:22 AM Rachel McR. notifications@github.com
wrote:

Thanks for the report! I confirmed the event
automated_transfer_custom_domain_contact_information_validation_failed
appears repeatedly in the user's logs. However, I tested (in the 14.2
internal beta) with the same address the user ended up using to
successfully register the domain, and those same details worked in my test.
I don't see any evidence that this same issue has come up again — it's
possible the user actually entered invalid details without realizing it, or
something else in their contact details didn't pass validation (in which
case I'd recommend opening a new issue).

Although it's resolved for this user, in the future getting a screenshot
of the app showing the contact information as it was entered is probably
the most reliable way to capture what's causing the error.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/wordpress-mobile/WordPress-iOS/issues/12796?email_source=notifications&email_token=AB4KPXBXPE4PJHVBRZNP3Y3RCVQUTA5CNFSM4JGBDQT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELVMQXA#issuecomment-585812060,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB4KPXA7ZYBCJ7DASW3JQXTRCVQUTANCNFSM4JGBDQTQ
.

Was this page helpful?
0 / 5 - 0 ratings