cli
cli copied to clipboard
running `sfdx force:source:push -f -u alias` has weird staticResources errors
Summary
A new error is happening when attempting to push code when it wasn't happening on the same code base a few weeks ago
Steps To Reproduce:
- name staticresources folder like staticresources or staticResources
-
sfdx force:source:push -f -u alias
- wait
Expected result
it works when folder is named staticresources
Actual result
when folder is named staticresources failure with error
ERROR running force:source:push: The "path" argument must be of type string. Received undefined
when folder is named staticResources failure with error
Type Name Problem
───── ────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error ah_CommonCss An object 'ah_CommonCss' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error ah_playerLibraries An object 'ah_playerLibraries' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error ah_resources An object 'ah_resources' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error siteAsset_1604a2f6716347a88cce8ed89cd731dd An object 'siteAsset_1604a2f6716347a88cce8ed89cd731dd' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error siteAsset_9d7ee7103d7e4cc8b4b926f3084e7b1c An object 'siteAsset_9d7ee7103d7e4cc8b4b926f3084e7b1c' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error siteAsset_fc0419fe726f42c5993ac81d491698fe An object 'siteAsset_fc0419fe726f42c5993ac81d491698fe' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory```
files are not of type EmailServicesFunction, there is no reference to this type in code.
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.
Using sfdx force:source:deploy
works. Push is broken.
This is still not working.
Can you please do the part of the Issue Template where we ask for the output of sfdx version --verbose
so we can see what's needed to reproduce this
➜ staticRepro1572 sfdx force:source:push
*** Pushing with SOAP API v55.0 ***
DEPLOY PROGRESS | ████████████████████████████████████████ | 1/1 Components
Updating source tracking... done
=== Pushed Source
STATE FULL NAME TYPE PROJECT PATH
─────── ─────────────── ────────────── ────────────────────────────────────────────────────────────────────────
Created staticResources StaticResource force-app/main/default/staticresources/staticResources.resource-meta.xml
Created staticResources StaticResource force-app/main/default/staticresources/staticResources/hi.txt
sfdx-cli/7.160.0
Architecture:
win32-x64
Node Version :
node-v16.16.0
Plugin Version:
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.3.1 (core)
@oclif/plugin-not-found 1.2.6 (core)
@oclif/plugin-plugins 1.10.11 (core)
@oclif/plugin-update 1.5.0 (core)
@oclif/plugin-warn-if-update-available 1.7.3 (core)
@oclif/plugin-which 1.0.4 (core)
@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)
alias 2.1.0 (core)
apex 1.1.0 (core)
auth 2.2.2 (core)
community 2.0.0 (core)
config 1.4.14 (core)
custom-metadata 2.0.0 (core)
data 2.0.4 (core)
generator 2.0.2 (core)
info 2.0.1 (core)
limits 2.0.1 (core)
org 2.0.3 (core)
salesforce-alm 54.6.2 (core)
schema 2.1.1 (core)
sfdx-cli 7.160.0 (core)
signups 1.2.0 (core)
source 2.0.7 (core)
telemetry 2.0.0 (core)
templates 55.0.0 (core)
trust 2.0.1 (core)
user 2.1.0 (core)
OS and Version:
Windows_NT 10.0.22000
The fact that no one else is having this issue worries me that it's something on my end, but nothing changed with our statisresources files in years for this to stop working because of something we did. This has killed my productivity as I have to do a full deploy every change I make in code.
would changing the name of it help?
would changing the name of it help?
Changing it to what?
anything besides staticResources
Closing this due to lack of response. Please feel free to re-open if you still need help.
Hi @RodEsp I'm having the same issue here when pushing code to a fresh new scratch org. Deploy works No EmailServicesFunction metadata components do exists in the code
=== Component Failures [1]
Type Name Problem
───── ──── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error UUid An object 'UUid' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Here is my sfdx version:
monitor git:(feature/CHN4-9024-flushThroughApi) ✗ sfdx version --verbose CLI Version: sfdx-cli/7.167.2
Architecture: darwin-x64
Node Version: node-v16.17.0
Plugin Version: @oclif/plugin-autocomplete 1.3.0 (core) @oclif/plugin-commands 2.2.0 (core) @oclif/plugin-help 5.1.12 (core) @oclif/plugin-not-found 2.3.1 (core) @oclif/plugin-plugins 2.1.0 (core) @oclif/plugin-update 3.0.0 (core) @oclif/plugin-version 1.1.2 (core) @oclif/plugin-warn-if-update-available 2.0.4 (core) @oclif/plugin-which 2.1.0 (core) alias 2.1.0 (core) apex 1.2.0 (core) auth 2.2.3 (core) community 2.0.1 (core) config 1.4.19 (core) custom-metadata 2.0.0 (core) data 2.1.2 (core) generator 2.0.2 (core) info 2.0.1 (core) limits 2.0.1 (core) org 2.2.0 (core) packaging 1.6.0 (core) schema 2.1.1 (core) signups 1.2.0 (core) source 2.0.13 (core) telemetry 2.0.0 (core) templates 55.1.0 (core) trust 2.0.3 (core) user 2.1.0 (core) @salesforce/sfdx-plugin-lwc-test 1.0.1 (core) salesforce-alm 54.8.1 (core) sfdx-mohanc-plugins 0.0.202 (user)
OS and Version: Darwin 21.6.0
Shell: zsh
Root Path: /Users/clemente.sanchez/.local/share/sfdx/client/7.167.2-93d663e
I'm on the latest sfdx cli version, and still getting this error.
ERROR running force:source:push: upint\up-at-home\src\main\staticresources\ah_playerLibraries.resource-meta.xml: Expected source files for type 'StaticResource'
if I rename the static resources folder, I get errors that it's not able to find the files.
=== Component Failures [6]
Type Name Problem
───── ────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error ah_CommonCss An object 'ah_CommonCss' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error ah_playerLibraries An object 'ah_playerLibraries' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error ah_resources An object 'ah_resources' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error siteAsset_1604a2f6716347a88cce8ed89cd731dd An object 'siteAsset_1604a2f6716347a88cce8ed89cd731dd' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error siteAsset_9d7ee7103d7e4cc8b4b926f3084e7b1c An object 'siteAsset_9d7ee7103d7e4cc8b4b926f3084e7b1c' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
Error siteAsset_fc0419fe726f42c5993ac81d491698fe An object 'siteAsset_fc0419fe726f42c5993ac81d491698fe' of type EmailServicesFunction was named in package.xml, but was not found in zipped directory
there is another issue #1515 that also states the same problem, in that case related to weird naming management of BO custom index when pulling/pushing vs package generation.
the error says that it's looking for a file or folder in the directory next to ah_playerLibraries.resource-meta.xml
is ah_playerLibraries
a folder with files inside it that are not going to match your .forceignore
?
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.
I don't want to re-open this but I wanted to return to give an update. On the latest version of the cli 7.184.2, I still encountered an error trying to push my code. But this time, the error was a bit clearer.
ERROR running force:source:push: upint\up-at-home\src\main\staticresources\ah_playerLibraries.resource-meta.xml: Expected source files for type 'StaticResource'
Turns out, we had deprecated a folder in StaticResources and put a .txt
file in there to indicate as such. Turns out, you cannot just have a text file in a static resources folder. Adding a blank CSS file makes the deploy work.
This was probably the original error as well, but the older error output was misleading.
You 🪨 @chriskarpyszyn. Thanks for following up! :heart: