MetaMask / metamask-extension

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

[Sentry] [Bug]: `TypeError: Cannot read properties of undefined (reading 'type')` #28256

Open seaona opened 2 weeks ago

seaona commented 2 weeks ago

Describe the bug

While testing the Security Alerts API, and intercepting some of the responses I entered into a MM state where I got the background error TypeError: Cannot read properties of undefined (reading 'type') and I cannot trigger any transaction/signature. The Dialog never loads the MM screen.

I cannot ensure this is due to some intercepted response to the Security Alerts or something else, so I'm currently investigating.

Expected behavior

Screenshots/Recordings

https://github.com/user-attachments/assets/4094d2ed-4c18-445f-a1c4-77305b65d615

Steps to reproduce

  1. Setup a proxy like Burpsuite, to intercept all network requests
  2. Open MM
  3. Connect to a dapp
  4. Trigger a transaction or signature (it seems to happens to both indistinctly)
  5. Intercept the first response for the security alerts api supported chains
  6. Return a 500 and send it (leave the rest of requests on hold)
  7. See how the confirmations page open
  8. Reject it right after, without forwarding any of the pending requests
  9. See error

https://github.com/user-attachments/assets/c96cb265-0e2d-4cd5-9ba6-0ebc20eccf5f

Error messages or log output

No response

Detection stage

During release testing

Version

12.7.0 - but might be earlier too

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

sentry-io[bot] commented 1 week ago

Sentry Issue: METAMASK-XCMG