Error occurs on lightning:recordViewForm

I have a simple component which uses lightning:recordViewForm My component loads fine with proper data, however I am getting this error:

Action failed:
lightning:recordViewForm$controller$handleRecordIdChange [Cannot read
property ‘querySelectorAll’ of null]

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:hasSObjectName" access="global" >
    <aura:attribute name="sObjectName" type="String" />
    <aura:attribute name="acctRecId" type="Id" />
    <aura:attribute name="recordId" type="Id" />
    <aura:attribute name="recFields" type="Object" />

    <force:recordData aura:Id="fullRecord"
                      recordId="{!v.recordId}"
                      layoutType="FULL"
                      targetFields="{!v.recFields}"                      
                      />
    <lightning:card title="Internship Work Site Details:" iconName="standard:account">
        <div class="slds-p-around_x-small">                
            <lightning:recordViewForm recordId="{!v.recFields.InternshipWorkSite__c}" objectApiName="Internship_Work_Site__c">         
                <lightning:outputField fieldName="Name" />
                <lightning:outputField fieldName="Amount__c" />
                <lightning:outputField fieldName="Price_Per_Seat__c" />
                <lightning:outputField fieldName="Specialty__c" />                                           
            </lightning:recordViewForm>
        </div>
    </lightning:card>

</aura:component>

Error:
enter image description here

Lightning Debug:

DOMException: Failed to execute ‘querySelectorAll’ on ‘Element’:
‘*,:x’ is not a valid selector.
at chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/js/jquery/jquery.js:1361:7
at assert (chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/js/jquery/jquery.js:930:12)
at Sizzle.setDocument (chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/js/jquery/jquery.js:1331:3)
at chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/js/jquery/jquery.js:2742:1
at chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/js/jquery/jquery.js:2797:3
at chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/js/jquery/jquery.js:36:3
at chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/js/jquery/jquery.js:40:4

Answer

Attribution
Source : Link , Question Author : Ajay , Answer Author : Community

Leave a Comment