No way to access connection rejection promise when auto retry after disconnect in provider
Description When Provider tries re-connecting after a disconnection, if there is an error connecting and max tries are reached, no programatic way to tell this is finished and take additional action.
The rejection promise is not being handled or sent outside of the provider in anyway.
Steps to reproduce the bug Steps to reproduce the behavior:
- Be using HP Provider
- Go offline (Turn WIFI off)
- Come back online (Turn WIFI on)
- HP Provider tries to re-connect
- After max amount rejection promise is swallowed and user not able to determine retry is over
Expected behavior There is some how access to promise rejection of connect so user knows when retries are over and can take additional action
Screenshot, video, or GIF This is the code where connect is called and rejection promise not handled: https://github.com/ueberdosis/hocuspocus/blob/476898bfb892227ea9fbd18433e01e9717b9d549/packages/provider/src/HocuspocusProvider.ts#L616
Environment?
- operating system: Mac
- browser: Chrome
- mobile/desktop: Desktop
- hocuspocus version: Provider 1.0.0
Hello,
I was wondering if this issue has been resolved or if there are any updates regarding it. If not, are there any workarounds available?
Thank you for your time and help!
Hello,
I was wondering if this issue has been resolved or if there are any updates regarding it. If not, are there any workarounds available?
Thank you for your time and help!
I stucked this issue in iOS15/iOS16.
TL;DR:
setInterval or setTimeout was unreliable in iOS15/iOS16 webkit, i use requestAnimationFrame which wrapper by
@essentials/request-interval or @essentials/request-timeout' to replace it.
you can refer this issue for more detail: https://github.com/ueberdosis/hocuspocus/issues/661#issuecomment-1659529653