-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong stack traces for errors #1202
Comments
➤ Automation for Jira commented: The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3550 |
Hey @ionTea, thank for reaching out! This certainly looks odd to me, although it's hard to make sense of those stack traces. Would it be possible to share a minimal reproduction or give us some more information about your webpack config and which version of webpack you're using? There are a few minor singleton classes used within ably-js but I'm fairly sure this is unrelated so I'm wondering if the root cause here is a weird side-effect of some webpack optimisation |
@ionTea, that's perfect, thanks! After testing against your example repo I found that the underlying issue was that this particular error, along with a few others, is being initialised upon importing the library and therefore its stack trace was being created as soon as the library is first imported. I guess in your case, |
I have more than one Ably client in my application, and when one of them has an error the stack trace indicates the wrong client had the issue.
Here's an error message that seem to indicate that it originated from a client created in
realtime-data/real-time-data-provider/realtime-data-provider
However, by removing that client and repeating the steps to get the Error, I get the error again but with a different stack trace:
This one hinted at the correct Ably client being the source of the error, created in
./collaboration/ably.ts
I don't understand how this can even happen, are multiple Ably clients not isolated from each other?
The text was updated successfully, but these errors were encountered: