In SP2019 environment, sometime when trying to browse to pages that have SPFx Web Part in secure SharePoint site, error shows:
“Something went wrong….”
Or developer/admin tries to deploy the SPFx solution in the secure site and gets error:
Interestingly, some users find they can browse to the same pages and deploy the same SPFx web part with the corresponding Non-SSL URL just fine:
ULS log has following entries:
09/22/2020 21:03:38.57 w3wp.exe (0x2828) 0x3CAC SharePoint Foundation Site Cache bm4im High LookupHostHeaderSite: could not find SPSiteLookupInfo for host-header site-based multi-url lookup string https://sp2019 for request Uri https://sp2019/_api/web/GetOnePageContextAsStream in Database Using site lookup provider: Microsoft.SharePoint.Administration.SPConfigurationDatabaseSiteLookupProvider. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 Edg/85.0.564.51 45b47c9f-c217-10f4-a763-6e50045c7103
09/22/2020 21:03:38.57 w3wp.exe (0x2828) 0x3CAC SharePoint Foundation Configuration 8059 Warning Alternate access mappings have not been configured. Users or services are accessing the site http://sp2019 with the URL https://sp2019. This may cause incorrect links to be stored or returned to users. If this is expected, add the URL https://sp2019 as an AAM response URL.
In this case, the ULS log is quite helpful, it tells us that AAM has not be set correctly for the SSL site.
To fix this, go to Central Admin, add the SSL site URL as public URL of the AAM setting for the web application:
Now browsing to SSL pages and deployment in the SSL site should both work: