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

[BUG] Web console warning: "Expected server HTML to contain a matching <button> in <button>" #1498

Closed
3 tasks
gozineb opened this issue Oct 26, 2023 · 2 comments
Assignees
Labels
area: frontend Related to frontend functionality or under the /frontend directory bug Something isn't working Stale

Comments

@gozineb
Copy link
Contributor

gozineb commented Oct 26, 2023

How to reproduce ?

  • Go to the chat page of Quivr (locally)
  • Open the console -> Warning is as follows:

Image

Investigation:

  • The ChatInput contains a button to open ConfigModal
  • The ConfigModal used in the ChatInput contains a Trigger which is an html button

TO DO:

  • Investigate more

Validation criteria

  • Go to Quivr
  • Open developer console
  • Check that you don't have an error related to a button children
@gozineb gozineb converted this from a draft issue Oct 26, 2023
@gozineb gozineb added the bug Something isn't working label Oct 26, 2023
@dosubot dosubot bot added the area: frontend Related to frontend functionality or under the /frontend directory label Oct 26, 2023
@dosubot
Copy link

dosubot bot commented Oct 26, 2023

🤖

Hello @gozineb,

It's good to see you again and thank you for your detailed bug report.

The warning you're seeing is a common issue in React when server-side rendered (SSR) and client-side rendered content do not match. This is often due to conditional rendering on the client-side that doesn't match the server-side rendering.

In the case of the ChatInput component, it seems like the ConfigModal component, which contains a button, might be causing this issue. The ConfigModal is conditionally rendered based on the state of the isConfigModalOpen variable, which is managed by the useConfigModal hook. If the initial state of isConfigModalOpen on the server-side doesn't match its initial state on the client-side, this could cause the warning you're seeing.

To debug this issue, you could try the following steps:

  1. Check the initial state of isConfigModalOpen on both the server-side and client-side. They should be the same to prevent a mismatch.

  2. If the initial states are the same, try to identify any other differences between the server-side and client-side rendering of the ChatInput component. This could be due to other conditional rendering or effects that run only on the client-side.

  3. If you're unable to identify the cause, you could try to isolate the issue by temporarily removing parts of the ChatInput component. For example, you could remove the ConfigModal component and see if the warning still occurs. This could help you identify which part of the component is causing the issue.

I hope this helps! Please let me know if you have any other questions or if there's anything else I can do to assist you.

Best,
Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@mamadoudicko mamadoudicko moved this from Bugs & Improvements to Todo in Quivr's Roadmap Nov 1, 2023
mamadoudicko added a commit that referenced this issue Nov 3, 2023
@mamadoudicko mamadoudicko moved this from Todo to In Progress in Quivr's Roadmap Nov 3, 2023
@mamadoudicko mamadoudicko moved this from In Progress to To Be Validated in Quivr's Roadmap Nov 3, 2023
@Chloeroumengas Chloeroumengas moved this from To Be Validated to Done in Quivr's Roadmap Nov 7, 2023
Copy link
Contributor

github-actions bot commented Dec 2, 2023

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

@github-actions github-actions bot added the Stale label Dec 2, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
coolCatalyst added a commit to coolCatalyst/quivr that referenced this issue Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Related to frontend functionality or under the /frontend directory bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants