Skip to content
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

Empty Static Resource files can't be included in a sf package version #2973

Open
mekadigital opened this issue Jul 29, 2024 · 5 comments
Open
Labels
owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated

Comments

@mekadigital
Copy link

mekadigital commented Jul 29, 2024

Summary

Running sf package version create with a Static Resource that is empty will error.

Steps To Reproduce

Sample repo is available here: https://github.com/mekadigital/md-package-tests-empty-resource
Clone repo and run

% sf package version create --path force-app --wait 1000 --code-coverage -x
Warning: Record types defined in the scratch org definition file will stop being capitalized by default in a future release.
Set the org-capitalize-record-types config var to true to enforce capitalization.
Version create.... Create version status: Error
Error (MultipleErrorsError): Multiple errors occurred:
(1) An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 1057494537-1609187 (-852365351)

Adding a whitespace character to the staticresource solves the issue.

Expected result

Package created

Actual result

Package can't be created.

(I've already worked around this by removing the resource, but it took so long to work out why it wasn't working I raised the issue)

System Information

zsh

{
  "architecture": "darwin-x64",
  "cliVersion": "@salesforce/cli/2.51.6",
  "nodeVersion": "node-v20.15.0",
  "osVersion": "Darwin 22.6.0",
  "rootPath": "/Users/nich/.local/share/sf/client/2.51.6-e49d0be",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.1.7 (core)",
    "@oclif/plugin-commands 4.0.7 (core)",
    "@oclif/plugin-help 6.2.6 (core)",
    "@oclif/plugin-not-found 3.2.11 (core)",
    "@oclif/plugin-plugins 5.3.7 (core)",
    "@oclif/plugin-search 1.2.3 (core)",
    "@oclif/plugin-update 4.4.9 (core)",
    "@oclif/plugin-version 2.2.8 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.9 (core)",
    "@oclif/plugin-which 3.2.8 (core)",
    "@salesforce/cli 2.51.6 (core)",
    "apex 3.2.5 (core)",
    "auth 3.6.36 (core)",
    "data 3.5.5 (core)",
    "deploy-retrieve 3.9.17 (core)",
    "info 3.3.18 (core)",
    "limits 3.3.18 (core)",
    "marketplace 1.2.18 (core)",
    "org 4.3.5 (core)",
    "packaging 2.7.1 (core)",
    "schema 3.3.19 (core)",
    "settings 2.3.8 (core)",
    "sobject 1.4.19 (core)",
    "source 3.5.5 (core)",
    "telemetry 3.6.2 (core)",
    "templates 56.3.3 (core)",
    "trust 3.7.13 (core)",
    "user 3.5.18 (core)"
  ]
}

Additional information

@mekadigital mekadigital added the investigating We're actively investigating this issue label Jul 29, 2024
Copy link

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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jul 29, 2024
@mshanemc mshanemc changed the title Empty Static Resource files can't be included in a sf project version Empty Static Resource files can't be included in a sf package version Jul 29, 2024
@mdonnalley
Copy link
Contributor

mdonnalley commented Jul 29, 2024

@mekadigital Thanks for taking the time to provide a repo that replicates the issue 🏆

I'm able to successfully do a sf project convert source and sf project deploy start on your repo, which indicates to me that this an issue for the packaging team. I'll send this over to them to take a look

@mdonnalley mdonnalley added owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. and removed investigating We're actively investigating this issue labels Jul 29, 2024
Copy link

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

@sethmuss
Copy link

Hello @mekadigital , sorry you've run into this I'm sure it was annoying to track down. Thank you for the report and the reproduction repo, I've created an internal bug and we'll get to it when we can.

Seth

@rnavroze
Copy link

I received the exact same error message and trace code while creating a package version. In my case, it was an empty CSS file in an LWC. So I believe the more appropriate header would be - "Empty files can't be included in an sf package version"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

4 participants