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

ManifestGenerate - URI malformed #2560

Closed
ar-srinivas opened this issue Nov 8, 2023 · 13 comments
Closed

ManifestGenerate - URI malformed #2560

ar-srinivas opened this issue Nov 8, 2023 · 13 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@ar-srinivas
Copy link

ar-srinivas commented Nov 8, 2023

Summary

Getting URI malformed error while generating the manifest using the CLI.

Steps To Reproduce

IMPORTANT
Run "sf project generate manifest -p force-app -t package --api-version=58.0 --json "

{ "code": 1, "context": "ManifestGenerate", "commandName": "ManifestGenerate", "message": "URI malformed", "name": "URIError", "status": 1, "stack": "URIError: URI malformed\n at decodeURIComponent (<anonymous>)\n at DecodeableMap.getExistingKey (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/decodeableMap.js:71:32)\n at DecodeableMap.set (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/decodeableMap.js:53:31)\n at ComponentSet.add (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSet.js:332:35)\n at buildComponents (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSet.js:89:25)\n at ComponentSet.fromSource (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSet.js:93:9)\n at ComponentSetBuilder.build (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSetBuilder.js:40:59)\n at ManifestGenerate.run (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/plugin-deploy-retrieve/lib/commands/project/generate/manifest.js:38:81)\n at async ManifestGenerate._run (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/plugin-deploy-retrieve/node_modules/@oclif/core/lib/command.js:117:22)\n at async Config.runCommand (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@oclif/core/lib/config/config.js:529:25)\n at async run (/Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@oclif/core/lib/main.js:90:16)", "exitCode": 1, "warnings": [] }

Expected result

It should generate package manifest

Actual result

URI malformed"

System Information

sf version --verbose
 CLI Version:
	@salesforce/cli/2.15.9

 Architecture:
	darwin-arm64

 Node Version:
	node-v18.15.0

 Plugin Version:
	@oclif/plugin-autocomplete 2.3.10 (core)
	@oclif/plugin-commands 3.0.4 (core)
	@oclif/plugin-help 6.0.4 (core)
	@oclif/plugin-not-found 3.0.2 (core)
	@oclif/plugin-plugins 3.9.4 (core)
	@oclif/plugin-search 1.0.4 (core)
	@oclif/plugin-update 4.1.3 (core)
	@oclif/plugin-version 2.0.3 (core)
	@oclif/plugin-warn-if-update-available 3.0.2 (core)
	@oclif/plugin-which 3.0.6 (core)
	@salesforce/cli 2.15.9 (core)
	apex 2.3.20 (core)
	auth 2.8.25 (core)
	data 2.6.1 (core)
	deploy-retrieve 1.19.2 (core)
	info 2.6.51 (core)
	limits 2.3.41 (core)
	login 1.2.39 (core)
	marketplace 0.3.1 (core)
	org 2.11.5 (core)
	packaging 1.26.4 (user)
	schema 2.3.31 (core)
	settings 1.4.36 (core)
	sobject 0.2.14 (core)
	source 2.10.45 (core)
	telemetry 2.3.8 (core)
	templates 55.5.17 (core)
	trust 2.6.22 (core)
	user 2.3.39 (core)
	@salesforce/sfdx-scanner 3.18.0 (user)

 OS and Version:
	Darwin 22.6.0

 Shell:
	zsh

Additional information

@ar-srinivas ar-srinivas added the investigating We're actively investigating this issue label Nov 8, 2023
Copy link

github-actions bot commented Nov 8, 2023

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 Nov 8, 2023
@ar-srinivas
Copy link
Author

The command works fine with CLI version 2.13.9 and failing in all latest versions.

@shetzel shetzel added the bug Issue or pull request that identifies or fixes a bug label Nov 8, 2023
Copy link

git2gus bot commented Nov 8, 2023

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

@shetzel
Copy link
Contributor

shetzel commented Nov 8, 2023

Thanks for reporting. I'll get this bug fixed asap.

If you add this code : console.log(key); above line 71 of this file /Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/decodeableMap.js then run the command again the last key logged is the name of the metadata that's it's having a problem decoding. I'd be interested in what the key is if you're willing to share it. I can add a test for it as well.

@ar-srinivas
Copy link
Author

Thanks for reporting. I'll get this bug fixed asap.

If you add this code : console.log(key); above line 71 of this file /Users/srinivas.s/.local/share/sf/client/2.15.9-ffa76de/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/decodeableMap.js then run the command again the last key logged is the name of the metadata that's it's having a problem decoding. I'd be interested in what the key is if you're willing to share it. I can add a test for it as well.

Thanks for your response @shetzel .

Here is the metadata type and the file path pattern.

documents/xxxxx/xxxx.txt%7E

@shetzel
Copy link
Contributor

shetzel commented Nov 9, 2023

Hmmm, that decodes just fine. Regardless, I have a PR to fix this in SDR here: forcedotcom/source-deploy-retrieve#1167

@ar-srinivas
Copy link
Author

@shetzel Can you please let me know which version of the SF CLI will have this fix?

@shetzel
Copy link
Contributor

shetzel commented Nov 13, 2023

@ar-srinivas - it will be in the next CLI release candidate (Nov 15th, 2023). You might be able to install the latest deploy-retrieve plugin now for the fix.

@ar-srinivas
Copy link
Author

ar-srinivas commented Nov 16, 2023

@shetzel What is the exact command to update this specific plugin without upgrading the version from 2.14.x?

@shetzel
Copy link
Contributor

shetzel commented Nov 16, 2023

To install the latest version of the deploy-retrieve plugin, sf plugins install deploy-retrieve@latest

@ar-srinivas
Copy link
Author

@shetzel Thank you again!

Facing some issues with plugin install command. So, planning to upgrade the Cli to "2.17.3": "https://developer.salesforce.com/media/salesforce-cli/sf/versions/2.17.3/3dd8f2a/sf-v2.17.3-3dd8f2a-linux-x64.tar.gz".

Hope the fix is included in this version.

@ar-srinivas
Copy link
Author

@shetzel Can you please help us on this error.

I am facing an issue when we run plugins install command, the error remains same for any plugin installation.

Command:
sf plugins install deploy-retrieve@latest

Error:
image


image

Version:
CLI Version:
@salesforce/cli/2.17.14

Architecture:
linux-x64

Node Version:
node-v20.9.0

Plugin Version:
@oclif/plugin-autocomplete 3.0.1 (user)
@oclif/plugin-commands 3.0.6 (user)
@oclif/plugin-help 6.0.5 (user)
@oclif/plugin-not-found 3.0.3 (user)
@oclif/plugin-plugins 4.1.7 (user)
@oclif/plugin-search 1.0.6 (user)
@oclif/plugin-update 4.1.3 (user)
@oclif/plugin-version 2.0.6 (user)
@oclif/plugin-warn-if-update-available 3.0.2 (user)
@oclif/plugin-which 3.0.8 (user)
@salesforce/cli 2.17.14 (core)
apex 2.3.20 (user)
data 2.6.3 (user)
info 3.0.1 (user)
limits 3.0.1 (user)
login 2.0.1 (user)
marketplace 1.0.2 (user)
org 2.11.8 (user)
schema 3.0.1 (user)
settings 2.0.2 (user)
sobject 0.2.15 (user)
source 2.11.0 (user)
telemetry 3.1.0 (user)
templates 55.5.18 (user)
trust 3.0.2 (user)
user 2.3.42 (user)

OS and Version:
Linux 6.2.0-1011-aws

Shell:
bash

Root Path:
/home/ubuntu/sf

@shetzel
Copy link
Contributor

shetzel commented Nov 27, 2023

That's a different error so you should post a new issue. It's odd that the output of sf version --verbose lists most plugins as user plugins. It should be rare when a plugin is a user plugin, meaning not the default plugin version bundled with the CLI. I would completely uninstall everything and install again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants