Skip to content

Unhelpful error message when deploying unexpected .xml files in lwc folders using sfdx #1295

Closed

Description

@andrewburns1

Summary

If an unexpected .xml file exists in the lwc folder when deploying to an org using sfdx, e.g. sfdx force:source:push, the error message received is: WARNING: Infinite loop detected..

This is an unhelpful error message as it gives no indication as to what is causing the command to fail, and is very difficult to debug.

Steps To Reproduce:

Repository to reproduce: dreamhouse-lwc

NOTE: If your issue is not reproducable by dreamhouse-lwc, i.e. requires specific metadata or files, we require a link to a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem.

  1. Checkout dreamhouse-lwc repo
  2. Add file nonsense.xml to folder dreamhouse-lwc/force-app/main/default/lwc/
  3. Run command sfdx force:source:push

Expected result

Push should fail with a helpful error message about the unexpected file.

Actual result

Push has failed with error message: WARNING: Infinite loop detected.

System Information

  • If you are using sfdx
    • Run sfdx version --verbose --json
  • If you are using sf
    • Run sf version AND sf plugins --core
  • Paste the output here
    {
    "cliVersion": "sfdx-cli/7.123.0",
    "architecture": "darwin-x64",
    "nodeVersion": "node-v16.13.0",
    "pluginVersions": [
    "@oclif/plugin-autocomplete 0.3.0 (core)",
    "@oclif/plugin-commands 1.3.0 (core)",
    "@oclif/plugin-help 3.2.6 (core)",
    "@oclif/plugin-not-found 1.2.4 (core)",
    "@oclif/plugin-plugins 1.10.2 (core)",
    "@oclif/plugin-update 1.5.0 (core)",
    "@oclif/plugin-warn-if-update-available 1.7.2 (core)",
    "@oclif/plugin-which 1.0.3 (core)",
    "@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
    "alias 1.1.22 (core)",
    "apex 0.3.0 (core)",
    "auth 1.7.3 (core)",
    "config 1.2.41 (core)",
    "custom-metadata 1.0.12 (core)",
    "data 0.6.3 (core)",
    "generator 1.2.1 (core)",
    "limits 1.2.2 (core)",
    "org 1.8.3 (core)",
    "salesforce-alm 53.0.0 (core)",
    "schema 1.0.10 (core)",
    "sfdx-cli 7.123.0 (core)",
    "source 1.2.4 (core)",
    "telemetry 1.2.8 (core)",
    "templates 52.4.0 (core)",
    "trust 1.0.11 (core)",
    "user 1.5.2 (core)"
    ],
    "osVersion": "Darwin 20.6.0"
    }

Activity

  1. added
    investigating
    on Nov 25, 2021
  2. github-actions commented on Nov 25, 2021

    @github-actions

    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.

  3. mshanemc commented on Dec 6, 2021

    @mshanemc
    Contributor

    both deploy and beta:push (using the new library) give you a better error

    === Component Failures [1]
    Type   Name  Problem
    ─────  ────  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    Error  test  Unable to build Lightning Component source for markup://c:test: Invalid meta-xml name: lwc/test/nonsense.xml, should end with js-meta.xml
    
  4. mshanemc commented on Apr 1, 2022

    @mshanemc
    Contributor

    closed with new commands GA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigating

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions