Skip to content
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

Graph Connector Bot fails with SearchRequest Invalid #13116

Open
ridomin opened this issue Jan 29, 2025 · 3 comments
Open

Graph Connector Bot fails with SearchRequest Invalid #13116

ridomin opened this issue Jan 29, 2025 · 3 comments
Assignees
Labels
TA:Auth Team Area: Auth

Comments

@ridomin
Copy link

ridomin commented Jan 29, 2025

Describe the bug

Created a Teams bot app from the TTK template.

To Reproduce
Steps to reproduce the behavior:

  1. In VSCode TTK, View Samples
  2. Select Graph Connector Bot in TypeScript
  3. Preview your teams app (F5). Select Debug in Teams (Edge)

Expected behavior

See the bot deployed and running as in the screenshots provided in the README

Screenshots

I got this error

SearchRequest Invalid (EntityRequest Invalid (searchRequest -> query is invalid (queryString required)))

VS Code Extension Information (please complete the following information):

  • OS: windows 11
  • TTK Version: 5.12.1

** additional info **

npm install shows some warnings.

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '[email protected]',
npm warn EBADENGINE   required: { node: '18 || 20' },
npm warn EBADENGINE   current: { node: 'v22.11.0', npm: '11.0.0' }
npm warn EBADENGINE }
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @azure/[email protected]: This package is no longer supported. Please refer to https://github.com/Azure/azure-sdk-for-js/blob/490ce4dfc5b98ba290dee3b33a6d0876c5f138e2/sdk/core/README.md

added 388 packages, and audited 389 packages in 40s

40 packages are looking for funding
  run `npm fund` for details

7 moderate severity vulnerabilities
Copy link

👋 Hi @ridomin,

Thank you for reporting this issue! We want to let you know that:

⏱️ Our team will personally review your issue
🎯 You can expect a response within 2 business days

✨ This is an AI-generated initial response
🤖 AI-Generated Preliminary Analysis:

Based on the information you provided, it looks like there are two main issues that need to be addressed:

  1. SearchRequest Error: The error SearchRequest Invalid (EntityRequest Invalid (searchRequest -> query is invalid (queryString required))) suggests that the bot is not sending a valid search query to the Microsoft Graph API. This usually means that the bot is missing the required query string in its request.

  2. Warnings and Vulnerabilities in npm Install: The npm install warnings and vulnerabilities indicate that there are some issues with the packages being used. The EBADENGINE warning is particularly important as it shows that the Node.js version being used is not supported.

Steps to Resolve the Issues:

1. Fix the Invalid Search Request

Ensure that your bot is correctly sending the required query string to the Microsoft Graph API. Here is a checklist to follow:

  • Check the Bot Code: Ensure that the bot is constructing and sending the search query correctly. Look for where the queryString is being set and ensure it has a valid value.

    Example:

    const searchQuery = {
      query: {
        queryString: "YOUR_SEARCH_QUERY"
      }
    };
  • Update the Bot Logic: If the queryString is dynamically generated, make sure the logic correctly assigns a valid value to it before making the request.

2. Address npm Install Warnings and Vulnerabilities

  • Node.js Version: The warning indicates that the graph-connector-bot package requires Node.js version 18 or 20, but you are using v22.11.0. Downgrade your Node.js version to 18 or 20.

    You can use a version manager like nvm (Node Version Manager) to easily switch between different Node.js versions.

    nvm install 18
    nvm use 18
  • Update Deprecated Packages: Address the deprecated packages by updating them to their latest supported versions. If they are dependencies of other packages, consider updating the main package that uses them.

  • Fix Vulnerabilities: Run npm audit fix to automatically fix some of the vulnerabilities. For those that cannot be automatically fixed, review the audit report and manually update the packages.

    npm audit fix

    If there are still vulnerabilities, consider checking the detailed audit report:

    npm audit

Additional Resources:

By following these steps, you should be able to resolve the SearchRequest error and address the npm install warnings and vulnerabilities. If the issue persists, please provide additional details or error logs for further assistance.


Note: This is an automated first response generated by AI. A human team member will review your issue and provide a more detailed response soon. We appreciate your patience!

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Jan 29, 2025
@sayali-MSFT
Copy link

@ridomin , The warning indicates that the graph-connector-bot package requires Node.js version 18 or 20, but you are using v22.11.0. Downgrade your Node.js version to 18 or 20.

You can use a version manager like nvm (Node Version Manager) to easily switch between different Node.js versions.

nvm install 18
nvm use 18

@MSFT-yiz MSFT-yiz added TA:Auth Team Area: Auth and removed needs attention This issue needs the attention of a contributor. labels Feb 5, 2025
@sayali-MSFT
Copy link

@ridomin, could you please confirm if your issue has resolved with above suggestion or still looking for any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TA:Auth Team Area: Auth
Projects
None yet
Development

No branches or pull requests

4 participants