-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Handling websocket disconnects #31
Conversation
@Adesin-fr Thanks, will review/merge today! |
@Adesin-fr Okay, I browsed the code changes a bit (not extensively yet, will do that later) - do I understand correctly that, whenever the connection (socket) gets closed, it will automatically attempt to reopen (reconnect) itself? Would that mean that a connection could never be closed, even if we wanted to, or am I misunderstanding that? |
If you call the close() method of the broadcast driver, it will be gracefully closed. |
@Adesin-fr Great, thank you ... I'm going to review/test and then merge this one today or tomorrow :) |
Maybe remove the |
That's what I was thinking also. Perhaps add a "debug" option that would allow to enable logging ?? |
Just removed logs, Only kept 2 logs that are triggered when :
|
@Adesin-fr I think it looks good, but the |
Yeah debug sounds good |
It seems this commit does the trick. At least on tests. PS : Making a last commit to update the readme also... Edit: I confirm the debug option works : when not set, nothing is output to the console, and when set to true, logs happens ;) |
@Adesin-fr Thanks, nice one ... will review and then merge (if all looks fine) ! |
Hi, Will you merge this soon ? |
@Adesin-fr Okay let me merge it tonight and then test it with our app, and I'll let you know ... |
Nice ;) |
@Adesin-fr Yes you're right, let me update the version ... However, what I did is, I've created a new release (0.5.1) and clicked "publish", but publishing to npmjs fails - the Github Action logs says: Run This is my 3rd attempt and previously I got a different "yarn" error, but now it just keeps saying "not found" ... Before this last error I'm seeing a ton of warnings, but I don't know if that's the cause of the above or just "warnings": npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1731603326585-0.19912559614290437/node but npm is using /opt/hostedtoolcache/node/12.22.12/x64/bin/node itself axios (imported by js-src/Websocket.ts) and so on ... At some point I just deleted the Also in the Github Actions list I keep seeing "Merge branch 'Adesin-fr-master'" - that's a merge commit for the PR that I pushed an hour ago, but Github just insists on re-running that ... ? Ah I see what it does - before the "publish" action it's always running the build/test action on the latest git commit within that "tag" - I guess that makes sense ... Bit of a mess though and I'm in "trial and error" mode right now - who has got the brilliant idea to "make this work" ? ;-) |
@Adesin-fr Okay yet another attempt - same result: "error Couldn't publish package: "https://registry.npmjs.org/laravel-echo-api-gateway: Not found" and that's all, no other clues or info as to what the problem is ... I tried to google it but coming up empty! I'm completely stuck, unless someone has a brilliant idea ... the only thing is that the preceding "test" action also fails (the jest run fails) - could it be that the "publish" action fails BECAUSE the "test" action (i.e. the Jest run) also fails? I'll try (but not today, tomorrow):
But I'm pretty much stuck right now, no idea what the problem is. |
@Adesin-fr Wait lol, the error was staring me in the face: "(!) Unresolved dependencies "Unresolved dependencies ... axios" - I guess this is what it's tripping over - this line maybe:
Should that actually be there ... let me try to remove that :) |
@Adesin-fr "Fixed" a number of things, deleted tag/release, created new one, "Unresolved dependencies ... axios" is gone now - however, stil getting this error in Github's "publish" action: "error Couldn't publish package: "registry.npmjs.org/laravel-echo-api-gateway: Not found" I'm getting a bit desperate now, running out of ideas ... will have a fresh look tomorrow. |
@Adesin-fr Discussing with the other contributor on the other PR thread, maybe he has a clue ... there are still 2 things I could try, long shot but I'm out of ideas at the moment :) Those two things are:
The second one sounds a bit drastic but it shouldn't be a big deal swapping P.S. by the way: the "test" action that precedes the "publish" action also has failures - the Jest run fails, as well as another job - but I don't believe that that should directly influence the "publish" action ... |
@georgeboot Are you able to help? I've now come to the conclusion that I'm probably unable to resolve this myself ... So, what I'm trying to do is publish a new release, this one: https://github.com/georgeboot/laravel-echo-api-gateway/releases/tag/0.5.1 but the Github "publish" action keeps failing at "yarn publish" ( https://github.com/georgeboot/laravel-echo-api-gateway/actions/runs/11869630146/job/33080163251 So it's unable to publish to I was then able to google that, and found some pointers - this one: and this one: These make me believe that the most likely cause is there might be something wrong with the NPM token in our "Github secrets" - I mean this (npm/cli#1637 (comment)): Are you able to check that? I don't think I have access to our "Github secrets" ... there might be yet other causes/reasons, but all of them seem related to auth/permission errors (the |
I think it should be fixed now. https://www.npmjs.com/package/laravel-echo-api-gateway The token was not expired but it was a legacy style token. Replaced it now with a fine grained one, that seemed to do the job. |
@georgeboot Thanks, that's brilliant - and I think the "publish" is done now (I guess you did it?) - because I tried to re-trigger the job and then I got Yes that seems to be the case: All good then! |
This PR adds code for frontend to #2 handle connections issues : disconnections, not being able to connect, automatically reconnect...
It also adds Bref 2.0 as a supported version (NB: in Bref 2.0, serverless.yml syntax changed a bit. See documentation...)