Errors Working With Salesforce DX

There were some errors I encountered while working on a trailhead module – App Development with Salesforce DX which I know may help others that may face the same thing. Whether you are working on life projects or trailhead modules /projects, we know the effect of errors and don’t want any of them to block our flow of work.

Salesforce DX

Salesforce DX adds new tools that streamline the entire development life cycle. It provides an alternative to change set development, and shifts the source of truth from the org to your versiDon control system (VCS). It shifts your development focus from org development to package development.

Errors working with Salesforce DX and the Solutions

Error: INVALID_SESSION_ID: Session expired or invalid
This error occurred because the scratch org’s session I created the previous day expired and I needed to push changes in my local system to the scratch org.

Solution: I used sfdx force:org:open. After this command opened the org, and entered sfdx force:source:push to push the changes, it was successful but the error was still there. I then reset password for the User, user ( System Administration) for scratch org. This solve the problem because all other subsequent work that I pushed had no error.

Error: ERROR running force:org:create:  The signup request failed because this organization has reached its active scratch org limit
This command create a new scratch org but I could not because the org has reached its maximum limit.
Solution: I logged in to my Trailhead Playground used as Dev Hub org, clicked on App Launcher to find Scratch Org Info. There were 3 active scratch orgs. I deleted one of them and I was able to create a new scratch org.

Error: Error mdapioutput/aura/FundTileList/FundTileList.cmp FundTileList Compilation Failure
/c/Paginator/paginator.js:0,0 : LWC1010: Failed to resolve entry for module “paginator”.
Error mdapioutput/aura/Paginator Paginator Can’t create aura definition bundle if there is already a lightning component bundle with the same name and namespace. ERROR running force:mdapi:deploy: The metadata deploy operation failed.
This error occurred after converting the source format back to metadata format. After this there was need to deploy it to the testing environment.

Solution:
The error message – Paginator Can’t create aura definition bundle if there is already a lightning component bundle with the same name and namespace indicates that there was a naming conflict. I therefore renamed the Paginator folder and its files to Paginator1 and tried to execute the command. This generated the error below.

Error:  No COMPONENT named markup://c:Paginator1 found.

Solution: I changed the Paginator in the package.xml file to Paginator1 and the command was successfully executed.

Reference

Lightning Aura Developers Guide
Trailhead

Leave a Reply