-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On package version creation receiving error: "Admin: An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory" #2427
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Try renaming files which contains .profile-meta.xml" and ".profile" before version creation. |
thank you @ashishrajbanshi ! we took a look, we dont have any profiles in our codebase. it's the strangest thing and i don't think it has anything to do with what is in the package/codebase because we've seen this error in other random steps when we converted from sfdx to unified sf |
Hi @jdschleicher |
thank you @olektymchenko , there are no profiles in the codebase. The word "Admin" doesn't even exist. It has nothing to do with profiles but something to do with what was listed in the above details around the github actions run. We can run the package version creation commands fine localy but the moment the same exact commands with the same exact codebase run in github actions on an ubuntu system they put out the "admin not found in package.xml" error. The moment the operating system is changed to windows, it works fine. |
weeeird 😐 |
This is a duplicate of #2336 (same root cause). We have a fix for that in progress...stay tuned. |
Our workaround using windows is no longer working at what seems like that update from yesterday @mshanemc . I'm not sure if it's related. We've experienced this error with brand new packages that have no profiles present. The only workaround found was to use windows operating systems and it looks like they could be broke now too. |
just confirmed, in reverting back, the package version created and installed successfully |
@jdschleicher - this has more to do with the version of your packaging plugin and dependencies than the CLI version. It's possible that the "JIT plugins now respect a lock file during install" CLI change modified your packaging plugin in a way that makes your workaround stop working. I believe my recent fix to the packaging library and plugin should resolve your issue so it would be great if you could test that out. Please run I think the reason for this error is that the packaging library code was looking for profile metadata files anywhere within your project, including node_modules and other non-package directories. It must have found an admin profile and added it to the manifest but it wasn't included in the zip of metadata to be packaged. The most recent packaging plugin scopes the profiles it cares about to just the package directories defined within sfdx-project.json, so it should fix the problem for you. |
thank you @shetzel would the that is where we are receiving the errors and having a hard time reproducing locally. We have done global searches for admin profiles and even the word "admin". This may not have looked through any node_module folders though so I will take a look. We have had projects that were brand new, no profiles added and they would generate the same error. I'm attempting to get the temp folder results from the dev-debug but not quite sure where it's landing in github actions. I just came across the github contexts for temp but haven't tried it yet: https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context |
Yes it should. |
thank you, will give it a go |
hey hey @shetzel i gave it a go, and i do believe i tried this before as the second to last ditch effort before we changed our "runs-on" to use windows-latest. It did not seem to make a difference. This seems separate but it may be related since our workaround for package versoin creatoin and scratch org creatoin ended in recent releases. Our scratch org creatoin has stopped working recently I just added you as a collaborator https://github.com/jdschleicher/sf-sfdx-cli-version-troubleshooting/actions/runs/6291942045/job/17080829071 Feel free to adjust the code to log what you feel you need. For whatever the reason, when we auth devhub jwt we get the error " ENOENT: no such file or directory, ...". Which I don't think we've had any issues creating scratch orgs utnil 2.7.11. When I use authentication for devhub auth url, the scratch org creation works just fine. If you have any insights or want to jump on a call i would very much appreciate it. I'm also having issues capturing out the debug logs as the runner.temp context in github actions doesn't seem to capture the debug/verbose/preserve items from the sf cl. |
@jdschleicher change Then download the artifact and post the log here. |
thank you @AllanOricil ! Did not expect that artifact to be so massive 🚀 I am not seeing a folder under the "sf-sfdx-cli-version-troubleshooting" that looks like a guid that was highlighted in the image above. The only thing I see under the sf-sfdx-cli-version-troubleshooting folder is the actual codebase. I'm going to change the path to point to just the sf-sfdx-cli-version-troubleshooting |
@jdschleicher check the cli doc to find the path where logs are located |
@AllanOricil will do, that last artifact didn't seem to have anything that screamed logs. On my local windows machine it ends up in my appdata/local/temp folder. The artifact that was downloaded was from the github actions machine path D:\a\ I'll check out what salesforce has for debug/logging files documenation |
FYI: see the latest release notes for when this bug fix will be included in a CLI release. It will be CLI v2.11.8. More specifically, the fix is in |
@shetzel I have the same issue when I try to create a new package. |
@ctardif35 - append |
I'm still facing the same issue. I'm using @salesforce/cli/2.15.8 darwin-x64 node-v18.15.0 |
@rlbarreto - what version of the packaging plugin do you have? Did you run the command with |
My sfdx-project file looks like this: |
I believe this is working as expected then. There is a new feature coming soon to further scope profiles to just the package directory being packaged. It could be added as soon as the next CLI release candidate tomorrow. Watch for the release notes. |
@rlbarreto - I just published a new version (1.26.5) of |
@shetzel I tested the |
@petter-eikeland - Great to hear! Also note that if you enable debug output for that command (e.g., |
Confirmed upgrading the packaging plugin solves the issue. Upgrading to the latest SFDX and SF versions did not work. I had to update the packaging plugin directly: sf plugins:install packaging@latest sf package version create succeeded after that. Thank you! |
Issue suddenly appeared after upgrading CLI (2.21.8) and packaging plugin (2.0.1). Adding To me it appears to be trying to pull in all profile source from our I suspect I will need to add |
@gsbasso - I'm not a packaging expert but from what I understand from that team it's intended behavior that by default all profiles within the source project are included and then trimmed to only contain things relevant to the source being packaged. If you add |
@shetzel I took a closer look at the profiles from the |
@shetzel adding Windows OS |
Summary
Similar to : #2395 but this time with creating fully validated sf packages.
command used to create package version:
Was not getting any issues running locally so I did a compare cli version compare and the only thing that was different was the operating system. I setup our CI jobs to run on windows-latest and it worked. Below is the working sf --version --verbose --json:
I would not want to use windows so is there anything here that can point to the issue?
WORKING WINDOWS VERBOSE IN GIHUB ACTIONS
Steps To Reproduce
Use the package version create command
Expected result
created package version success
Actual result
failure with error: "Admin: An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory"
System Information
bash - > fails
when cmd.exe-> succeeds
FAILING UBUNTU VERBOSE IN GIHUB ACTIONS
Additional information
The text was updated successfully, but these errors were encountered: