Skip to content

Conversation

@HazAT
Copy link
Member

@HazAT HazAT commented Nov 20, 2020

We have a race condition in the electron SDK where we set the user on the scope but since we call the notifies in setTimeout the user is not properly propagated to the main process.

So if you have this for example:

configureScope(scope => {
    scope.setUser({ id: 'abc' }); // This invokes notify scope listeners
  });
}

captureException(new Error('test'));

On electron, we sync the scope across different processes via IPC calls.

The previous code resulted in:

IPC -> captureException
IPC -> Scope update

after the change, because we are removing the setTimeout

its:

IPC -> Scope update
IPC -> captureException

@HazAT HazAT requested a review from lobsterkatie November 20, 2020 13:30
@HazAT HazAT requested a review from kamilogorek as a code owner November 20, 2020 13:30
@HazAT HazAT self-assigned this Nov 20, 2020
@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 19.71 KB (-0.05% 🔽)
@sentry/browser - Webpack 20.58 KB (-0.01% 🔽)
@sentry/react - Webpack 20.58 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 26.85 KB (-0.04% 🔽)

@HazAT HazAT merged commit 8054837 into master Nov 23, 2020
@HazAT HazAT deleted the fix/sync-scope-listeners branch November 23, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants