Skip to content
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

customInternalAttach -> authorize -> errCallback undefined? #29

Closed
ryzr opened this issue Dec 22, 2023 · 10 comments · Fixed by #30 or #31
Closed

customInternalAttach -> authorize -> errCallback undefined? #29

ryzr opened this issue Dec 22, 2023 · 10 comments · Fixed by #30 or #31

Comments

@ryzr
Copy link

ryzr commented Dec 22, 2023

Echo Version

1.0.3

Laravel Version

10.38.1

PHP Version

8.2

NPM Version

10.1

Database Driver & Version

MySQL 8.0.35 on AWS RDS

Description

Just a minor one, but gets a bit spammy in Sentry. There appears to be cases where the overriden channel attach method is called with an undefined errCallback. It doesn't appear to have any impact on the end user, but it does get reported in Sentry at least a few times a day

2023-12-22_103721_TypeError i is not a function — lumin-sports-technology — arc-core-field@2x

https://github.com/ably-forks/laravel-echo/blob/master/src/channel/ably/attach.ts#L28

Wasn't sure if it would be fine to check if errCallback is defined before calling, or something more elaborate like this would be necessary:

https://github.com/ably/ably-js/blob/fdd5a566eafac0a7fae9592f890361a608794487/src/common/lib/client/realtimechannel.ts#L335-L339

Merry Christmas! 🎄

Steps To Reproduce

I haven't been able to reproduce this myself, but looking at the Sentry replays, it seems that users are idling, a request is made which 403s, and then the error above occurs.

Copy link

sync-by-unito bot commented Dec 22, 2023

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-4008

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 22, 2023

@ryzr Thanks for reporting, seems we can modify check as

if (error && errCallback)

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 22, 2023

Since this is a small change, you might like to create a PR for the same 👍

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 22, 2023

@ryzr I have merged the PR. We will see if we can do the release in the near future. If you want to use the latest code on the master branch, you can include github url for the same in package.json dependency.
https://dev.to/michalbryxi/github-urls-in-package-json-5412

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 22, 2023

Seems we need to fix this properly, so I opened #31

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 22, 2023

@ryzr please do add comments there if you find anything missing

@ryzr
Copy link
Author

ryzr commented Dec 22, 2023

Thanks @sacOO7 😄

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 22, 2023

@ryzr I have merged the PR. We will see if we can do the release in the near future. If you want to use the latest code on the master branch, you can include github url for the same in package.json dependency. https://dev.to/michalbryxi/github-urls-in-package-json-5412

@ryzr do update the code as per comment and let us know if you still facing issues with sentry.

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 23, 2023

@ryzr please do star https://github.com/ably/laravel-broadcaster and this repo if your issue is addressed 👍

@ryzr
Copy link
Author

ryzr commented Dec 23, 2023

Have done - thanks again for all your help, I appreciate it! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants