MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.74k stars 4.81k forks source link

[Bug]: "TypeError: this.codeReader.stop is not a function" - When clicking on Grey area under "Webcam not found" popup #21900

Closed emanuelb closed 2 weeks ago

emanuelb commented 8 months ago

Describe the bug

Metamask crash instead of "back/cancel" operation

Expected behavior

No crash, the effect is the same as cancel

Screenshots/Recordings

MetaMaskBugQRScan1 MetaMaskBugQRScan2

Steps to reproduce

  1. Click MetaMask
  2. Click Send
  3. Click QR Icon
  4. it shows "Webcam not found" (it was tested on Chromium on Linux in virtual machine)
  5. Click on Grey area below the popup (under "Cancel" and "Try again" buttons) to have the same effect as "Cancel"

Error messages or log output

> MetaMask encountered an error
Try again by closing and reopening the popup, or contact support here.
Error details
Message: this.codeReader.stop is not a function
Code: TypeError
Stack:
TypeError: this.codeReader.stop is not a function
  at _.teardownCodeReader (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-5.js:1:200617)
  at _.componentWillUnmount (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-5.js:1:200517)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:79022
  at Tu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:79063)
  at Ou (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:80824)
  at Ds (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:100114)
  at n.unstable_runWithPriority (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:491157)
  at Qo (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:46225)
  at Ns (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:97994)
  at xs (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:88366)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:46516
  at n.unstable_runWithPriority (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:491157)
  at Qo (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:46225)
  at ti (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:46461)
  at ei (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:46396)
  at gs (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:84932)
  at Object.enqueueSetState (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:51177)
  at w.setState (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-3.js:1:470338)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-5.js:1:169797
  at HTMLDivElement.n (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-5.js:1:169512)

Version

11.4.1

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

anaamolnar commented 8 months ago

Hello, @emanuelb. Thanks for reporting! Do you still experience this issue on 11.5.1?

emanuelb commented 8 months ago

Hello, @emanuelb. Thanks for reporting! Do you still experience this issue on 11.5.1?

Yes, Ive updated to 11.5.1, issue still apply, looks like the fix should add more error handling in: https://github.com/MetaMask/metamask-extension/blob/a341f2da064eb9744e9061b61ebdbbd28452f0e9/ui/components/app/modals/qr-scanner/qr-scanner.component.js#L107-L119

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

Akaryatrh commented 3 weeks ago

@emanuelb As of today, I can not replicate. Please see below recording: https://github.com/user-attachments/assets/c9f114aa-47a2-4892-9827-6af48c33539d