html5-qrcode icon indicating copy to clipboard operation
html5-qrcode copied to clipboard

Scan Area and button appear twice

Open Mhussein27 opened this issue 2 years ago • 6 comments

Describe the bug Select Camera and Start Scanning button appears twice and when I click stop scanning to both buttons, I received the below error :

Screen Shot 2023-01-09 at 3 59 47 PM

To Reproduce Steps to reproduce the behavior:

  1. in chrome After giving Camera permission and start first scan , you will see twice Start Scanning
  2. Click on 'stop Scanning' first button
  3. Click on 'Start Scanning' second button
  4. NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

Expected behavior only one scan Area and button should appear

Screenshots Screen Shot 2023-01-09 at 3 59 47 PM

Desktop (please complete the following information):

  • OS: [MAC]
  • Browser [chrome,]
  • Version [Version 108.0.5359.124 (Official Build) (arm64)]

Additional context Add any other context about the problem here.

Mhussein27 avatar Jan 09 '23 14:01 Mhussein27

Can you provide me with a working example of how I can reproduce this?

A code example would also do.

mebjas avatar Feb 25 '23 04:02 mebjas

@Mhussein27 what framework are you using? If you are using the latest react, this might be due to they way the DOM is rendered in the latest version.

Caitlin-Finn avatar Feb 27 '23 16:02 Caitlin-Finn

Please close the issue, I managed to fixed, it seems that there was a tag that forcing render twice, once I removed it works fine

On Mon, Feb 27, 2023, 6:44 PM Caitlin Finn @.***> wrote:

@Mhussein27 https://github.com/Mhussein27 what framework are you using? If you are using the latest react, this might be due to they way the DOM is rendered in the latest version.

— Reply to this email directly, view it on GitHub https://github.com/mebjas/html5-qrcode/issues/668#issuecomment-1446670825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCAPGHVZDFEUSMVQ6YZXXLWZTKWVANCNFSM6AAAAAATVPC6PM . You are receiving this because you were mentioned.Message ID: @.***>

Mhussein27 avatar Feb 27 '23 17:02 Mhussein27

@Mhussein27 how did you manage that, can you provide the code, please?

Lobana-sky avatar Jun 01 '23 20:06 Lobana-sky

@Mhussein27 1 year later, we got same error message. Can you explain us how did you solved it?

onurerden avatar Jun 04 '24 08:06 onurerden

Hi,

After I removed this tag </React.StrictMode> my issue has been resolved Good luck with solving the issue

Thanks, Maha

On Tue, Jun 4, 2024, 11:31 AM Onur Erden @.***> wrote:

@Mhussein27 https://github.com/Mhussein27 1 year later, we got same error message. Can you explain us how did you solved it?

— Reply to this email directly, view it on GitHub https://github.com/mebjas/html5-qrcode/issues/668#issuecomment-2146925158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCAPGH6ILZAZP6ZZHFXIHTZFV3MRAVCNFSM6AAAAAATVPC6POVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBWHEZDKMJVHA . You are receiving this because you were mentioned.Message ID: @.***>

Mhussein27 avatar Jun 07 '24 11:06 Mhussein27