Error: loginUrl missing from configuration

Hello, OpenFn Community,

I am trying to test a simple test job to create a beneficiary on Salesforce but I am getting the following error:

PS C:\openfn> openfn create.js -a salesforce
[CLI] :heavy_check_mark: Compiled from create.js
[R/T] :diamonds: Starting job job-1
[R/T] ✘ Failed job job-1 after 616ms
[R/T] ✘ Error: loginUrl missing from configuration.
[CLI] :heavy_check_mark: State written to output.json
[CLI] :warning: Errors reported in 1 jobs
[CLI] :heavy_check_mark: Finished in 751ms

However, the loginUrl is included in state.js:

{
“configuration”: {
“loginUrl”: “https://login.salesforce.com”,
“username”: “",
“password”: "
”,
“securityToken”: “****”
},

“data”: {
“_id”: 250088693,
“Cual_es_su_nombre”: “pepo”,
“Cua_es_su_edad”: “3663”,
“Cuando_nacio”: “2028-09-28”
}
}

Do you have any idea what would be the reason for it?

Thanks beforehand!

FH.

I’d recommend checking to ensure that you’re accessing the right state.json when you run the job. Maybe first try an explicit path:

openfn create.js -a salesforce -s ./path-to-your-state.json

And then try logging state with the common adaptor before switching to your salesforce adaptor.

new expression:

fn(state => {
  console.log(state);
  return state;
});

// upsert(...whateverCodeYouHadBefore);

If you can see everything you need in there (according to the Salesforce configuration schema) then you should be able to run successfully.

Taylor