Closed
Description
I am trying to add a picklist value and get the following error message:
ERROR running browserforce:apply: The "url" argument must be of type string. Received undefined
I don't understand which "url" argument the error message is talking about, or what I can do to prevent the problem.
To reproduce, use the following files:
sfdx-project.json
{
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "52.0"
}
config/project-scratch-def.json
{
"country": "US",
"edition": "Developer",
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
}
},
"orgName": "Test",
"adminEmail": "test@test.com"
}
config/project-scratch-browserforce.json
{
"$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/master/src/plugins/schema.json",
"settings": {
"security": {
"loginAccessPolicies": {
"administratorsCanLogInAsAnyUser": true
}
},
"picklists": {
"picklistValues": [{
"metadataType": "StandardValueSet",
"metadataFullName": "ForecastCategoryName",
"value": "Most Likely",
"newValue": "Most Likely",
"active": true
}
]
}
}
}
With these files, run the following commands:
$ sfdx force:org:create -s -a scratch -f config/project-scratch-def.json --wait 10
(node:11429) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
Successfully created scratch org: 00D1j000000EP2uECG, username: test-p0krdduvd2tc@example.com
$ sfdx force:config:set defaultusername=scratch
=== Set Config
Name Value Success
─────────────── ─────── ───────
defaultusername scratch true
$ sfdx browserforce:apply -f config/project-scratch-browserforce.json --targetusername scratch
logging in... done
Applying definition file config/project-scratch-browserforce.json to org test-p0krdduvd2tc@example.com
[Security] retrieving state... done
[Security] no action necessary
[Picklists] retrieving state... failed
ERROR running browserforce:apply: The "url" argument must be of type string. Received undefined
logging out... done
$
Notice how the security action seems to run fine, whereas the picklist action doesn't.