-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
AbortController error with walletconnect lib after zone.js 0.14.3 update #54142
Comments
@imaksp , could you provide a reproduce repo? thanks. |
This will happen when passing an I think zone.js can prepare a separate options object instead of mutating the original object, or a wrapper using |
Hi @JiaLiPassion here is the minimum reproduction repo: Steps:
If you change zone.js version to 0.14.2 it will open QR modal like this without any errors. |
Unfortunately with @JiaLiPassion did you found a fix without downgrading to |
Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined`. This caused errors in libraries such as WalletConnect, which pass an AbortController instance directly to `addEventListener` because it has a `signal` property. The controller's `signal` property is a getter (which means it's readonly) and cannot be mutated. Therefore, with this commit, we change the approach from mutation to re-assignment. Closes angular#54142
Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes angular#54142
Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes angular#54142
Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes angular#54142
Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes angular#54142
Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes angular#54142
…55796) Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes #54142 PR Close #55796
Which @angular/* package(s) are the source of the bug?
zone.js
Is this a regression?
Yes
Description
After zone.js update to 0.14.3, walletconnect integration is breaking in our app. earlier it was opening QR code modal without any error.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
For now solved by downgrading zone.js to 0.14.2.
This line from latest zone.js is throwing error:
angular/packages/zone.js/lib/common/events.ts
Line 480 in c213a4e
The text was updated successfully, but these errors were encountered: