JavaScript error on custom domain blade; cannot generate TXT to verify my domain

Raymond Dean 116 Reputation points
2023-05-09T14:08:07.41+00:00

I originally posted this under the GitHub section for Static Web Apps, but I've not seen a response from Microsoft in about 3 days... https://github.com/Azure/static-web-apps/issues/1159

Describe the bug

I am following the "Set up a custom domain in Azure Static Web Apps" instruction set. I'm trying to verify ownership of the domain, as instructed. But, the code I'm supposed to copy for the TXT record is never generated, and JavaScript errors are dumped to the console.

To Reproduce
Steps to reproduce the behavior:

  1. Under a static web app project, got to Custom Domains
  2. Click Add, then choose 'Custom domain on other DNS'
  3. Put in your domain name: "domain.tech" WITHOUT the subdomain, as per the instructions (my domain ends in a .tech; JS error dumped to console after pressing next)
  4. Press the Generate Code button... you're supposed to wait, but mine is never generated. Instead, JavaScript errors are dumped to the console.

Expected behavior
I had expected to see a code that I could copy and paste as a TXT record for my registrar.

Screenshots
image

image

Device info (if applicable):

  • I have used both Brave and Firefox.

Additional context
I have also tried this with a different static app, and got the same results. I was only able to finish the first part of the instructions: adding the "www", and that part was verified by Azure. I just need to get to part 2 & 3 of the instructions: generated the TXT code, and setting up an Alias.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,173 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2023-05-11T10:49:56.31+00:00

    @Raymond Dean

    update: The issue has been resolved.

    Please let us know if further query or issue remains.

    Please accept as "Yes" if the answer provided is useful , so that you can help others in the community looking for remediation for similar issues.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2023-05-10T04:55:59.88+00:00

    @Raymond Dean

    Apologies for inconvenience on this, Acknowledged the issue is reproducible and product team is working towards fix, will update here accordingly.

    Workaround suggested.

    Use Azure CLI command to generate a token:

    az staticwebapp hostname set -n MyStaticAppName --hostname example.com --validation-method "dns-txt-token"

    Once executed, a TXT token will be generated. But the command will not complete until the validation complete. 

    You can retrieve the token via Azure portal > Static Web App > Custom Domain. 

    You can also retrieve the token with below Azure CLI command in a different command prompt:

    az staticwebapp hostname show -n MyStaticAppName -g MyResourceGroup --hostname example.com --query "validationToken"

    Also, could you send us an email with subject line “Attn:Sneha |thread title” to AzCommunity[at]microsoft[dot]com referencing this thread.

    Please let us know if further query.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.