Open
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
^9.4.0
Framework Version
^17.0.2
Link to Sentry event
n/a
Reproduction Example/SDK Setup
No response
Steps to Reproduce
- Call
getCurrentScope().setUser({ name, email })
with some details of the authenticated user like thename
andemail
- Call
getCurrentScope()
immediately after but elsewhere in the code and inspect the_user
property of the entire object. it will be out of date. - Call
getCurrentScope().getUser()
in the same location - the value will be the most recent value and will conflict with_user
from step 2. - Initialize the
feedbackIntegration()
usinguseSentryUser
set to{ name: 'name', email: 'email' }
. The default feedback dialog will not pre-populate the name and email fields with those properties from the scope because at time of initialization, they didn't get set.
Expected Result
The scope should update immediately everywhere and the properties on the scope
object fetched from using getCurrentScope()
should match the result of the getUser()
method on the scope
object itself.
Actual Result
see results of the following code in the screenshot below:
const scope = getCurrentScope();
console.log(scope, scope.getUser());
the feedback integration dialog's input values are empty because of this I think
it's really difficult to debug the feedback integration overall though. and its frustrating that you can't set a fallback value or another value for these inputs in the feedback integration constructor function - you're forced to rely on the scope which sucks.
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Community