+ Start a Discussion
J C 36J C 36 

Error Step 5 when trying to create unmanaged package v. 1.0 in Trailhead Unlocked Packages for customers/build your first unlocked package

Create the package version - Step 5
Error Attempt to create unlocked pkg step 5
Following Error:
ERROR:  An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 1394095453-59495 (-1373703285).

Anyone know what this is?
DevHub set up; Packaging2 Beta enabled in DevHub; and I have an active GitHub account.
Arun K TallapragadaArun K Tallapragada
I too keep getting the same error. 
ERROR:  An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 521499568-435486 (-1373703285).
i tried it multiple times and all the attempts resulted in the same error. I understand that the 2nd gen packages are in Beta version, but how can i resolve this? Below is the command line history
$ git clone https://github.com/dreamhouseapp/dreamhouse-sfdx.git
$ cd dreamhouse-sfdx/
$ sfdx force:org:list
$ sfdx force:org:create --definitionfile config/project-scratch-def.json --durationdays 30 --setalias MyScratchOrg
$ sfdx force:package2:create --name th-dreamhouse --description "My DreamHouse Package" --containeroptions Unlocked --nonamespace --targetdevhubusername DevHub
$ vi sfdx-project.json
$ sfdx force:package2:version:create --directory force-app --wait 10
Diego Machado 5Diego Machado 5
Same problem here, any ideas?
Seth Stoll 3Seth Stoll 3
Use the Spring18 branch and it will work.  Thanks to Roarke Lynch for the workaround:

https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009NekCAE&fId=0D53A00003cPaZkSAK
Roarke Lynch 12Roarke Lynch 12
No problem Seth. Always glad to help.
Arun K TallapragadaArun K Tallapragada
Thank a lot Seth and Roarke. Switching to Spring18 branch worked and i was able to create the package version successfully.
Stephen Johnson 13Stephen Johnson 13
I've got this issue too -- what commands did you use to switch to Spring18 that made it work?
Roarke Lynch 12Roarke Lynch 12
You can switch branches using 'git checkout' from the command line.
Arun K TallapragadaArun K Tallapragada
This command should clone the spring18 branch directly onto your local machine. git clone -b spring18 https://github.com/dreamhouseapp/dreamhouse-sfdx.git regards Arun
Stephen Johnson 13Stephen Johnson 13
OK not a major git person, but this worked for me:
git clone https://github.com/dreamhouseapp/dreamhouse-sfdx.git
git checkout origin/spring18
git checkout -b spring18-1
Then follow the steps to
sfdx force:package2:create --name th-dreamhouse --description "My DreamHouse Package" --containeroptions Unlocked --nonamespace --targetdevhubusername DevHub
and done


 
J C 36J C 36
Anyone getting this error:
MacBook-Pro-3:dreamhouse-sfdx admin$ sfdx force:package2:create --name th-dreamhouse --description "My DreamHouse Package" --containeroptions Unlocked --nonamespace --targetdevhubusername DevHub
WARNING: The command "force:package2:create" has been deprecated and will be removed in v43.01.0 or later. Use "force:package:create" instead.
ERROR:  The package name must be unique for the namespace.

I've tried to install this thing so many times! if the command explicity states not using a namespace, what does this error mean?
Orlando BricenoOrlando Briceno
Hi everybody, I was able to create my package, but I did it cloning the latest sources in the dreamhouse github repo, maybe that was wrong? So I tried to install and got errors saying that some componenents listed in the package.xml file were not present in the zipped directory.


I created the unmanaged package for the dreamhouse app in my Developer ORG

sfdx force:package:version:create -p th-dreamhouse -d force-app -k test1234 --wait 10 -v mytrailheadorg
Successfully created the package version [08c41000000XZAMAA4]. Subscriber Package Version Id: 04t41000002eb4TAAQ.
Package Installation URL: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t41000002eb4TAAQ

But when I tried to install

sfdx force:package:install --wait 10 --publishwait 10 --package th-dreamhouse@1.0.0-1 -k test1234 -r -u mytrailheadorg

Got these errors:

ERROR:  Encountered errors installing the package!,Installation errors:
1) An object 'Advertise_New_Property-2' of type Flow was named in package.xml, but was not found in zipped directory, Details: Advertise_New_Property-2: An object 'Advertise_New_Property-2' of type Flow was named in package.xml, but was not found in zipped directory
2) An object 'Opportunity_Status_Change-1' of type Flow was named in package.xml, but was not found in zipped directory, Details: Opportunity_Status_Change-1: An object 'Opportunity_Status_Change-1' of type Flow was named in package.xml, but was not found in zipped directory
ERROR:  Installation errors:
1) An object 'Advertise_New_Property-2' of type Flow was named in package.xml, but was not found in zipped directory, Details: Advertise_New_Property-2: An object 'Advertise_New_Property-2' of type Flow was named in package.xml, but was not found in zipped directory
2) An object 'Opportunity_Status_Change-1' of type Flow was named in package.xml, but was not found in zipped directory, Details: Opportunity_Status_Change-1: An object 'Opportunity_Status_Change-1' of type Flow was named in package.xml, but was not found in zipped directory.



I'm not sure how to proceed now, I found that is not possible to remove a package from a DevHub, so I can not create the package again 

sfdx force:package:create --name th-dreamhouse --description "My DreamHouse Package" --packagetype Unlocked --path force-app --nonamespace --targetdevhubusername mytrailheadorg
ERROR:  The package name must be unique for the namespace.

So the other option I'm thinking about is create a new Developer Org, do the whole auth dance again, but then, should I use the spring18 branch of the dreamhouse repo? my current playgrounds and developer orgs are in Winter 19.

Thank you!
 
Blanche AngleaBlanche Anglea
Getting the same error as Orlando.  Can anyone point me in the right direction?
LABBOOLABBOO
Getting the same error as Orlando.  Tried with the spring18 branch but still getting the same error.  Confirmed that I had gotten the spring18 branch 

BTW, Orlando - if you change the package name in Step 1 of Create the Package - it avoids the error for the name can't be repeated
 
dandamudidandamudi
@René Winkelmeyer  just fixed the repo in github,  you just need clone master branch and create new version , don't need to create package again .then install in to SO and  TPG org with new version , i just  finish the module successfully let me know if you need any help.
Orlando BricenoOrlando Briceno
Hey Labbo, but I guess that exact 'th-dreamhouse' name is needed to fullfill the requirement and pass the validation right?
Blanche AngleaBlanche Anglea
@dandamudi Thank you finally finished
LABBOOLABBOO
@Orlando - basically yes that exact name and version 1.0 and the exact description to fulfill the requirement and pass the validation - though I did learn how to change the description in my package (force:package:update but you need the packageid to do it)
Martina PastorkovaMartina Pastorkova
I'm trying to pass this module as well, unfortunately, it says that my ID given for DreamHouse is invalid. Anybody could help me to understand and pass this one? It would be much appreciated.

Martina
Sean Harp 15Sean Harp 15
This has to be the most frustratingly broken Trailhead module I've ever encountered.  How do these issues even get past QA?  I'm also stuck at the installed package not containing the flow definitions in the zip file.  
Sean Harp 15Sean Harp 15
Solved it my way.  Just removed the 4 problem flows from the source on my machine before I packaged it.  It then deployed cleanly on the target and I completed the module.  Not sure what's wrong with the flows not appearing in the zip file but showing up in the package.xml.  That sounds like a defect.
SAKTHIVEL MSAKTHIVEL M
Steps to complete the Trailhead Challenge:
  1. Install the Command Line Interface (CLI)
  2. Enable Dev Hub (Developer/Trailhead PlayGround) (Setup -> Dev Hub)
  3. Git Clone the app repository (git clone https://github.com/dreamhouseapp/dreamhouse-sfdx.git)
  4. Login Your Developer/Trailhead Org (sfdx force:auth:web:login -d -a DevHub)
  5. Create Package (sfdx force:package:create –name th-dreamhouse –description “My DreamHouse Package” –packagetype Unlocked –path force-app –targetdevhubusername DevHub)
  6. Create ScratchOrg from Developer/Trailhead Org (sfdx force:org:create –definitionfile config/project-scratch-def.json –durationdays 30 –setalias MyScratchOrg -v DevHub)
  7. Create Package Version (sfdx force:package:version:create -p th-dreamhouse -d force-app -k test1234 –wait 10 -v DevHub)
  8. Install the Package to ScratchOrg (sfdx force:package:install –wait 10 –publishwait 10 –package th-dreamhouse@1.0.0-1 -k test1234 -r -u MyScratchOrg)
  9. Release the Package Version to Developer/Trailhead Org (sfdx force:package:version:promote -p th-dreamhouse@1.0.0-1 -v DevHub)
  10. Install the Package to Developer/Trailhead Org (sfdx force:package:install –wait 10 –publishwait 10 –package th-dreamhouse@1.0.0-1 -k test1234 -r -u DevHub)
Notes:
DevHub – Developer Org Alias Name
MyScratchOrg – Scratch org of DevHub

For More Details:
http://theblogreaders.com/use-salesforce-cli-create-install-package-trailhead-challenge/

Thanks & Regards,
Sakthivel Madesh
Shankar Anand 17Shankar Anand 17
Hi All, I've tried everything - package creation, version creation, spring branch clone - but nothing works. Can someone please help me?
Cristian_CociobanCristian_Cocioban
I had the same problem. When running the create package script an error was thrown, when tried the second time I got a different error saying the package already exist. So I checked if the package was somehow created the first time and - it was there, you need to run on your local machine, in the project folder: sfdx force:package:list --targetdevhubusername your_dev_hub.

Copy the th-dreamhouse ID in your sfdx-project.json file. Should be something like this:

{
    "packageDirectories": [
        {
            "path": "force-app",
            "default": true,
            "package": "th-dreamhouse",
            "versionName": "ver 1.0",
            "versionNumber": "1.0.0.NEXT"
        }
    ],
    "namespace": "",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "44.0",
    "packageAliases": {
        "th-dreamhouse": "0Ho......",
    }
}

Run the following script to create version 1.0.1: sfdx force:package:version:create -p  "th-dreamhouse" -d force-app  --wait 10 -v your_dev_hub

Once the version is ready you can install it in your trailhead playground.

Hope this helps.