You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AbortController error with walletconnect lib after zone.js 0.14.3 update #54142
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
core.mjs:11806 ERROR TypeError: Cannot set property signal of [object AbortController] which has only a getter
at zone.js:1957:38
at ae.addKeyboardEvents (index.js:1:67056)
at ae.onOpenModalEvent (index.js:1:66362)
at index.js:1:65722
at index.js:1:7509
at vanilla.mjs:242:11
at _ZoneDelegate.invoke (zone.js:368:26)
at Object.onInvoke (core.mjs:14778:33)
at _ZoneDelegate.invoke (zone.js:367:52)
at _Zone.run (zone.js:129:43)
Please provide the environment you discovered this bug in (run ng version)
changed the title [-]AbortController error with walletconnect lib with zone.js 0.14.3[/-][+]AbortController error with walletconnect lib after zone.js 0.14.3 update[/+]on Jan 29, 2024
This will happen when passing an AbortController as options for addEventListener. That's a bit odd but should work, considering that it does have the signal field (but it's readonly)
I think zone.js can prepare a separate options object instead of mutating the original object, or a wrapper using Object.create(options) or similar.
@imaksp
The reason is the walletconnect lib pass the AbortController directly to the addEventListener function, and the AbortController.signal is readonly, just like @JoostK said, I will create a new Options to fix this issue.
Activity
[-]AbortController error with walletconnect lib with zone.js 0.14.3[/-][+]AbortController error with walletconnect lib after zone.js 0.14.3 update[/+]JiaLiPassion commentedon Jan 29, 2024
@imaksp , could you provide a reproduce repo? thanks.
JoostK commentedon Jan 29, 2024
This will happen when passing an
AbortControlleras options foraddEventListener. That's a bit odd but should work, considering that it does have thesignalfield (but it's readonly)I think zone.js can prepare a separate options object instead of mutating the original object, or a wrapper using
Object.create(options)or similar.imaksp commentedon Jan 29, 2024
Hi @JiaLiPassion here is the minimum reproduction repo:
https://github.com/imaksp/wc-zone-js-issue
Steps:
If you change zone.js version to 0.14.2 it will open QR modal like this without any errors.
JiaLiPassion commentedon Jan 29, 2024
@imaksp
The reason is the walletconnect lib pass the
AbortControllerdirectly to theaddEventListenerfunction, and theAbortController.signalis readonly, just like @JoostK said, I will create a new Options to fix this issue.attilacsanyi commentedon Apr 29, 2024
Unfortunately with
[email protected]the issue still present.@JiaLiPassion did you found a fix without downgrading to
[email protected]? Thank you so much.fix(zone.js): do not mutate event listener options (may be readonly)
fix(zone.js): do not mutate event listener options (may be readonly) (#…
fix(zone.js): do not mutate event listener options (may be readonly) (a…
angular-automatic-lock-bot commentedon Jun 22, 2024
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.