Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

Avatar

Level 2

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

3 Replies

Avatar

Level 2

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.

 

Screenshot 2022-08-04 at 11.35.52.png

Regards,

Avatar

Level 2

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

Avatar

Level 2

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.

 

 

 

 

Avatar

Level 2

Hmm, never thought about it in that way. 

Maybe just splitting the mesh and my actual actions in multiple project would be better 😕
Overkill for my "App Builder Evaluation" project, as I only try our small stuff but I guess later on I should make several projects for that anyway..

I would need actions for the mesh anyway, for example to fit together some graphql endpoints when the type of queries is not the same (countries_id = String VS countires_id = ID!). In that case I would need to fix that using an action anyway right?
Something to look into I guess!

Avatar

Level 2

I think you can use a transform for that purpose, no need for an extra action built. I also tried to build the project without API service IO management there and I get the same error.

Avatar

Level 2

True. I will try that out now i guess. 

Good to know that you got the same error though - that means that it's not one of my "silly mistakes" this time. Somehow that really calms me down.

You just mentioned getting the same error without the API Service I/O Management, what else did you add then? 
I never had a problem if I add the API-Mesh only. 

Best regards, 
~Max

Avatar

Level 2

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,