connect
connect copied to clipboard
Missing event for `doOpenAuth` failure
I'm using react-connect
but seems applicable to connect
also.
When calling doOpenAuth
in an incognito window, the auth window doesn't open and my app gets stuck in "loading" state.
It would be really helpful if there was a way to detect a failure so I can communicate that in the UI.
Video here: https://twitter.com/jjenzz/status/1485244796470009858?s=20
I agree, this would be helpful. Are you getting any feedback in the console as to why it is failing?
Looks like something to do with the connect-ui
package:
I'm using https://remix.run which uses esbuild if that helps at all.
This issue is caused by esbuild
not supporting dynamic imports via plugins. When Connect
fails to find a wallet (e.g. in incognito if wallet plugin is not enabled in incognito mode), it attempts to open the modal:
and fails due to
esbuild
lack of dynamic imports support.
Thanks for looking into that, I assumed something like that would be the case as I have had other issues with esbuild up to this point.
The ticket is about providing an onFailure
event of some kind though because there is no way for my app to know something like this happened currently (e.g. connection drops and dynamic import fails).
Thanks for looking into that, I assumed something like that would be the case as I have had other issues with esbuild up to this point.
The ticket is about providing an
onFailure
event of some kind though because there is no way for my app to know something like this happened currently (e.g. connection drops and dynamic import fails).
@jjenzz have you tried wrapping your component with error boundary?
I tried wrapping doOpenAuth()
in a try {} catch(e) {}
before which didn't catch it and have just tried an ErrorBoundary
without success also.
I'll review this issue with @sabbyanandan, @saralab and @janniks soon. 🙏