mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 15:50:28 +01:00
ddeaeb5ba5
Sentry breadcrumb collection during initialization was broken in #20529 because we failed to consider that the `getSentryState` check was also used for an opt-in check in the `beforeBreadcrumb` hook. I had assumed that `getSentryState` was only used to get state to add additional context to an error report. But the function has a second purpose: to get state for the purposes of checking whether the user has opted into MetaMetrics. In this second case, `mostRecentRetrievedState` is sometimes unset (which violates an assumption made in #20529) The `getMostRecentPersistedState` hook removed in #20529 has been restored, ensuring that the `getSentryState` function returns Sentry state after loading state for the first time, but before the first error has occurred. This mistake didn't cause e2e tests to fail because multiple errors are currently thrown in the background upon initialization on `develop` (relating to Snow scuttling). These errors were early enough that they happened before the console logs that our breadcrumb test was testing for. When #20529 was ported onto the v10.34.5 RC, these errors were not present so the test failed correctly. |
||
---|---|---|
.. | ||
ens-ipfs | ||
middleware | ||
migrator | ||
rpc-method-middleware | ||
segment | ||
account-tracker.js | ||
account-tracker.test.js | ||
cleanErrorStack.js | ||
cleanErrorStack.test.js | ||
ComposableObservableStore.js | ||
ComposableObservableStore.test.js | ||
createDupeReqFilterMiddleware.js | ||
createDupeReqFilterMiddleware.test.js | ||
createLoggerMiddleware.js | ||
createMetamaskMiddleware.js | ||
createMetaRPCHandler.js | ||
createMetaRPCHandler.test.js | ||
createOnboardingMiddleware.js | ||
createOriginMiddleware.js | ||
createRPCMethodTrackingMiddleware.js | ||
createRPCMethodTrackingMiddleware.test.js | ||
createStreamSink.js | ||
createTabIdMiddleware.js | ||
extractEthjsErrorMessage.js | ||
get-first-preferred-lang-code.js | ||
getObjStructure.js | ||
local-store.js | ||
local-store.test.js | ||
metaRPCClientFactory.js | ||
metaRPCClientFactory.test.js | ||
network-store.js | ||
notification-manager.js | ||
notification-manager.test.ts | ||
security-provider-helpers.test.ts | ||
security-provider-helpers.ts | ||
seed-phrase-verifier.js | ||
seed-phrase-verifier.test.js | ||
sentry-filter-events.ts | ||
setup-initial-state-hooks.js | ||
setupSentry.js | ||
setupSentry.test.js | ||
stream-utils.js | ||
util.test.js | ||
util.ts |