It seems MetaMask 8.1.9 starting shipping with data analytics? I am getting many errors from api.segment.io
TypeError: Cannot read property 'message' of undefined
initSentry.js:1 POST https://api.segment.io/v1/batch net::ERR_NAME_NOT_RESOLVED
(anonymous) @ initSentry.js:1
(anonymous) @ initSentry.js:8
(anonymous) @ background.js:formatted:32635
t.exports @ background.js:formatted:32563
t.exports @ background.js:formatted:32885
Promise.then (async)
c.request @ background.js:formatted:32777
(anonymous) @ background.js:formatted:33060
flush @ background.js:formatted:31356
enqueue @ background.js:formatted:31323
track @ background.js:formatted:31283
(anonymous) @ background.js:formatted:1442
_track @ background.js:formatted:1440
The extension should continue to work even if that request fails. Right now it freezes.
This segment.io tracker/spyware bricks Metamask completely when blocked.
You need to unblock this segment.io temporally and then turn "Participate in MetaMetrics" off in the Metamask settings.
Afterwards you can block the URL again.
First, @mohamedmansour, thank you for reporting your problem by creating an issue.
Second, as a general point of information, Segment is the service we use for our _opt-in_ usage metrics. We previously used a different service, but first shipped metrics in 2018, if memory serves. In any event, it is not "spyware".
Third, if erroring Segment calls hang our UI, it's because we've failed to handle those error requests properly.
Finally, @mohamedmansour, did opting out of metrics solve your problem?
@rekmarks I can鈥檛 opt out of metrics in setting. When I click it, it doesn鈥檛 toggle off.
@mohamedmansour, what browser (name and version) are you on?
@rekmarks Freezes on both Microsoft Edge Canary and Google Chrome Stable.

From debugging locally, if the user blocks the analytics/tracking services (like segment.io), then it will mess up the Metamax making it unusable. So any call to segment.io should pass otherwise it will fail and act as "frozen".
I allowed segment.io to go through in my network appliance (Pi-Hole/uBlock) and it works. The correct fix would be not be coupled with segment.io and assume every user wants that. Perhaps test if the API call goes through, if not, then turn off analytics.
BTW these are all related #10113 #10097
Most helpful comment
@mohamedmansour, what browser (name and version) are you on?