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

Ack message timeout #8

Open
jneums opened this issue Sep 29, 2024 · 4 comments
Open

Ack message timeout #8

jneums opened this issue Sep 29, 2024 · 4 comments

Comments

@jneums
Copy link

jneums commented Sep 29, 2024

First off, thanks for the great websocket implementation!

Second, I'm getting errors consistently that close my connection with the canister. It happens when developing locally using the ICWebsocket repo as well as when running against the hosted version on AWS:

[onAckMessageTimeout] Ack message timeout. Not received ack for sequence numbers: Array(12)

@ilbertt
Copy link
Member

ilbertt commented Sep 29, 2024

Hi @jneums, could you provide a minimal example or source code?

Is the local gateway printing any warning or errors?

I've just checked that the demo is running as expected, and it's using the AWS gateway.

@jneums
Copy link
Author

jneums commented Sep 29, 2024

@ilbertt , no problem! Here is the repo as well as the version running on the IC. The version on the IC stopped connecting this morning when I went to check, but it was connecting fine last night. The demos are working fine though like you said, which is strange.

The local version connects fine still, but has the original [onAckMessageTimeout] issue.

Repo: https://github.com/jneums/ghost-engine
Demo: https://yjprz-siaaa-aaaai-qpkaq-cai.icp0.io

Here are the relevant files:

Frontend client:
https://github.com/jneums/ghost-engine/blob/main/src/ghost-engine-frontend/src/connection/index.ts

Backend client:
https://github.com/jneums/ghost-engine/blob/main/src/ghost-engine-backend/main.mo

@ilbertt
Copy link
Member

ilbertt commented Oct 4, 2024

@jneums sorry for the late reply :(

I see you switched to the polling approach instead of WebSockets. I'm really sorry I couldn't provide help in time. I'll try to investigate what's happening anyway and hopefully get back to you.

@jneums
Copy link
Author

jneums commented Oct 5, 2024

No worries! Let me know if you figure it out. I'd love to use the websockets. It feels weird polling so frequently from the browser.

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

No branches or pull requests

2 participants