-
Notifications
You must be signed in to change notification settings - Fork 3.8k
.Net: Bug: InvalidOperationException while using working with Playwright MCP Tools #11292
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
Comments
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 1, 2025
…11309) ### Motivation, Context and Description This PR fixes the issue caused by accessing the `required` property value as if it were a boolean property, instead of accessing it as an array of strings. Additionally, it reads the `required` property from the object root instead of reading it from each individual property of the object because the `required` property is defined at the root level to specify which properties are mandatory for the entire object. So, when iterating over the object root level properties, the code now uses the `"required": ["options"]` property declared at the root level instead of the `"required": ["outputPath"]` declared at the `options` property level. ```json { "type": "object", "properties": { "options": { "type": "object", "description": "Code generation options", "properties": { "outputPath": { "type": "string", "description": "Directory path where generated tests will be saved (use absolute path)" }, "testNamePrefix": { "type": "string", "description": "Prefix to use for generated test names (default: \u0027GeneratedTest\u0027)" }, "includeComments": { "type": "boolean", "description": "Whether to include descriptive comments in generated tests" } }, "required": [ "outputPath" ] } }, "required": [ "options" ] } ``` JsonSpec: https://json-schema.org/understanding-json-schema/reference/object#required Fixes: #11292 Contributes to: #11212
eavanvalkenburg
pushed a commit
to eavanvalkenburg/semantic-kernel
that referenced
this issue
Apr 2, 2025
…icrosoft#11309) ### Motivation, Context and Description This PR fixes the issue caused by accessing the `required` property value as if it were a boolean property, instead of accessing it as an array of strings. Additionally, it reads the `required` property from the object root instead of reading it from each individual property of the object because the `required` property is defined at the root level to specify which properties are mandatory for the entire object. So, when iterating over the object root level properties, the code now uses the `"required": ["options"]` property declared at the root level instead of the `"required": ["outputPath"]` declared at the `options` property level. ```json { "type": "object", "properties": { "options": { "type": "object", "description": "Code generation options", "properties": { "outputPath": { "type": "string", "description": "Directory path where generated tests will be saved (use absolute path)" }, "testNamePrefix": { "type": "string", "description": "Prefix to use for generated test names (default: \u0027GeneratedTest\u0027)" }, "includeComments": { "type": "boolean", "description": "Whether to include descriptive comments in generated tests" } }, "required": [ "outputPath" ] } }, "required": [ "options" ] } ``` JsonSpec: https://json-schema.org/understanding-json-schema/reference/object#required Fixes: microsoft#11292 Contributes to: microsoft#11212
glorious-beard
pushed a commit
to glorious-beard/semantic-kernel
that referenced
this issue
Apr 6, 2025
…icrosoft#11309) ### Motivation, Context and Description This PR fixes the issue caused by accessing the `required` property value as if it were a boolean property, instead of accessing it as an array of strings. Additionally, it reads the `required` property from the object root instead of reading it from each individual property of the object because the `required` property is defined at the root level to specify which properties are mandatory for the entire object. So, when iterating over the object root level properties, the code now uses the `"required": ["options"]` property declared at the root level instead of the `"required": ["outputPath"]` declared at the `options` property level. ```json { "type": "object", "properties": { "options": { "type": "object", "description": "Code generation options", "properties": { "outputPath": { "type": "string", "description": "Directory path where generated tests will be saved (use absolute path)" }, "testNamePrefix": { "type": "string", "description": "Prefix to use for generated test names (default: \u0027GeneratedTest\u0027)" }, "includeComments": { "type": "boolean", "description": "Whether to include descriptive comments in generated tests" } }, "required": [ "outputPath" ] } }, "required": [ "options" ] } ``` JsonSpec: https://json-schema.org/understanding-json-schema/reference/object#required Fixes: microsoft#11292 Contributes to: microsoft#11212
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I am working with MCP Playwright server - I am getting an exception like this
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should not throw any exceptions.
Screenshots
Platform
Additional context
It is happening for a specific tool -
start_codegen_session
. If I write a try-catch and ignore the exception it is working as expected - I am able to use this tool.The text was updated successfully, but these errors were encountered: