Skip to content

Dialog syncRequests doesn't handle open errors #581

@frolic

Description

@frolic

Check existing issues

Describe the bug

If a popup can't open (e.g. blocked by browser due to it not being user activated), we throw an error:

if (!popup) throw new Error('Failed to open popup')

This propagates up to syncRequests, which doesn't handle this error, leaving an unhandled promise promise rejection, which causes the request to hang:

if (!popup || popup.closed) this.open()

Link to Minimal Reproducible Example

No response

Steps To Reproduce

No response

Porto Version

0.0.51

Viem Version

2.30.6

Wagmi Version

2.15.5

TypeScript Version

5.4.2

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions