Open rodolfoBee opened 10 months ago
It looks like you didn't bind the client. Could that be the case? https://docs.sentry.io/platforms/javascript/configuration/tree-shaking/#:~:text=getCurrentHub().bindClient(client)%3B
I'm following the steps from here: https://docs.sentry.io/platforms/javascript/troubleshooting/#using-a-client-directly
What is the correct way of using the client? With getCurrentHub().bindClient(client);
, const hub = new Hub(client);
or both?
You cannot use replay with an unbound client, as of now. Replay is always global and will only work for the current, main hub. So using it with a client directly is not supported as of now.
What's the use case there? E.g. Replay will not work for e.g. browser extensions and similar things as of now.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
7.85.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
Run a simple server with the above setup.
Expected Result
Being able to record replays using the client directly.
Actual Result
The following warning is presented in the console:
SDK client is not available.
from this line.