.aio configuration: Error: Missing or invalid keys in config | Community
Skip to main content
heinm95
August 3, 2022
Question

.aio configuration: Error: Missing or invalid keys in config

  • August 3, 2022
  • 2 replies
  • 3974 views

Hey there, dear readers!

Yesterday i happened to run into a problem regarding the credentials when changing/switching workspaces.
I tested around a bit and am now able to reproduce the problem. 

When creating a new project for App Builder (in Dev Console) I go on with adding the services that I want to use in my project. For now that would be the

- api-mesh (Services -> add API -> API Mesh for Adobe Developer App Builder)

and then the 

I/O Management API (so that I can create an event provider and try out the functionality to throw custom events so that I can then consume them using actions...)

Whenever both of those are added in one workspace i can no longer "use the workspace" as the configuration "is broken". It doesn't matter whether I download the config myself using the "Download All" Button in the developer console or the cli command aio app use. Both throw the same error (which makes sense as the config would be the same either way.

 

Here the Error message: 

Error: Missing or invalid keys in config: [ { "keyword": "required", "dataPath": ".project.workspace.details.credentials[1].oauth2", "schemaPath": "#/definitions/oauth2/required", "params": { "missingProperty": "client_secret" }, "message": "should have required property 'client_secret'" }, { "keyword": "format", "dataPath": ".project.workspace.details.credentials[1].oauth2.redirect_uri[0]", "schemaPath": "#/definitions/oauth2/properties/redirect_uri/items/format", "params": { "format": "uri" }, "message": "should match format \"uri\"" } ]

The mentioned credential[1] would be the one for the apikey (API Mesh) in this case. If I add both APIs using the console then the entry for the API Mesh credentials is exactly the same as it is now - therefore I don't really get "what" the problem is.

 

 

Am I actually doing something wrong here or is it an issue on your side?

 

Best regards, 
Max

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Adobe Employee
August 4, 2022

Hi Max,

 

You might have to setup separate credentials for the oath2, you can find this in left menu as seen in below screenshot. Let me create a test project and get back to you.

 

Regards,

heinm95
heinm95Author
August 8, 2022

Hey dhindle, 
sorry for the rather late reply!

I am currently working on something else but I will try your idea and write back once i tested it. 

I honestly did not know that I can create separate credentials by myself, I thought of them as "fixed" and by adobe created pages as they are added whenever you add APIs or services. 

I just took a look inside my developer console and didn't find any way to create a separate way to create my own credentials - How are you doing that???

 

But that being that, the actual issue still is there:

I can use both services when I remove the other one and I don't face any problems when doing so. The individual configs for each of them looks just the same as well. Therefore I believe there must be some problem with the validation or something else along those lines.

 

There is simply no reason for the required keys of the config to suddenly change like that, or do I miss something???

Best regards, 
~Max

Adobe Employee
August 8, 2022

I feel like there is a conflict in what credentials to use as Mesh is using the `API key` and IO Management the `JWT`. Let me ask around.

 

 

 

 

Adobe Employee
August 11, 2022

Hi Max,

 

Apparently this is a bug, I have made a report for it. You can find it here: https://github.com/adobe/aio-cli/issues/363

 

Thanks for flagging this!

Regards,