forcedotcom / analyticsdx-vscode

Salesforce Analytics Extensions for Visual Studio Code
BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

The SFDX: Update Analytics Template command is not working #175

Closed emmatzhou closed 4 months ago

emmatzhou commented 4 months ago

Summary

SFDX: Update Analytics Template command is not working

Steps To Reproduce:

  1. Click on SFDX Update Analytics Template. (It gives result "Fetching analytics apps... failed to run")
  2. The output gives "15:02:02.897 sfdx analytics:app:list --json --loglevel fatal ended with exit code 2"

Expected result

It should return a list of app templates to update

Actual result

{ "code": 2, "context": "List", "commandName": "List", "message": "Nonexistent flag: --loglevel\nSee more help with --help", "name": "Error", "status": 2, "stack": "Error: Nonexistent flag: --loglevel\nSee more help with --help\n at validateArgs (/Users/emmazhou/.local/share/sf/node_modules/@salesforce/analytics/node_modules/@oclif/core/lib/parser/validate.js:10:19)\n at validate (/Users/emmazhou/.local/share/sf/node_modules/@salesforce/analytics/node_modules/@oclif/core/lib/parser/validate.js:190:5)\n at Object.parse (/Users/emmazhou/.local/share/sf/node_modules/@salesforce/analytics/node_modules/@oclif/core/lib/parser/index.js:19:35)\n at async List.parse (/Users/emmazhou/.local/share/sf/node_modules/@salesforce/analytics/node_modules/@oclif/core/lib/command.js:253:25)\n at async List.run (file:///Users/emmazhou/.local/share/sf/node_modules/@salesforce/analytics/lib/commands/analytics/template/list.js:36:27)\n at async List._run (/Users/emmazhou/.local/share/sf/node_modules/@salesforce/analytics/node_modules/@oclif/core/lib/command.js:311:22)\n at async Config.runCommand (/Users/emmazhou/.local/share/sf/client/2.39.6-6819d56/node_modules/@oclif/core/lib/config/config.js:433:25)\n at async run (/Users/emmazhou/.local/share/sf/client/2.39.6-6819d56/node_modules/@oclif/core/lib/main.js:92:16)", "exitCode": 2, "warnings": [] } 15:02:02.896 sfdx analytics:template:list --json --loglevel fatal -e ended with exit code 2

15:02:02.897 sfdx analytics:app:list --json --loglevel fatal ended with exit code 2

Additional information

When on run "sf analytics template update" in the command line, it works

VS Code Version:

From About Visual Studio Code in VS Code

Salesforce Analytics VS Code Extensions Version:

Available from View > Extensions in VS Code

Salesforce VS Code Extensions Version:

Available from View > Extensions in VS Code

SFDX CLI and Plugins Versions:

Include the output from running: sfdx version and sfdx plugins --core

OS and version:

git2gus[bot] commented 4 months ago

This issue has been linked to a new work item: W-15715577

smithgp commented 4 months ago

Hi @emmatzhou - the cause was actually in the cli and plugin, due to the switch to better suport sf (vs. sfdx). I updated the analytics plugins to fix the backwards compatibility issue with the --loglevel argument, which should also make the commands start working with the analytics vscode extensions again. I will soon update the vscode extensions to update folks to the newer version of the plugin, but for now you can do it manually with sf plugins install @salesforce/analytics (which should get the latest, which should be 1.4.15).

smithgp commented 4 months ago

The latest vscode extensions (1.2.1) will now prompt to upgrade the cli analytics plugin if the current installed version is older than 1.4.15.