Skip to content

AbortController error with walletconnect lib after zone.js 0.14.3 update #54142

Closed

Description

@imaksp

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)

Angular CLI: 17.1.1
Node: 18.18.2
Package Manager: yarn 1.22.19
OS: darwin arm64

Angular: 17.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1701.1
@angular-devkit/build-angular   17.1.1
@angular-devkit/core            17.1.1
@angular-devkit/schematics      17.1.1
@schematics/angular             17.1.1
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.3

Anything else?

For now solved by downgrading zone.js to 0.14.2.
This line from latest zone.js is throwing error:

taskData.options.signal = undefined;

Activity

  1. 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
  2. added this to the needsTriage milestone on Jan 29, 2024
  3. JiaLiPassion commented on Jan 29, 2024

    @JiaLiPassion
    Contributor

    @imaksp , could you provide a reproduce repo? thanks.

  4. JoostK commented on Jan 29, 2024

    @JoostK
    Member

    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.

  5. imaksp commented on Jan 29, 2024

    @imaksp
    ContributorAuthor

    Hi @JiaLiPassion here is the minimum reproduction repo:
    https://github.com/imaksp/wc-zone-js-issue

    Steps:

    • clone, and run yarn && yarn dev
    • Click on Connect Wallet button
    • See the error in console

    If you change zone.js version to 0.14.2 it will open QR modal like this without any errors.

    connect-qr
  6. JiaLiPassion commented on Jan 29, 2024

    @JiaLiPassion
    Contributor

    @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.

  7. attilacsanyi commented on Apr 29, 2024

    @attilacsanyi

    Unfortunately with [email protected] the issue still present.

    @JiaLiPassion did you found a fix without downgrading to[email protected]? Thank you so much.

  8. added
    regressionIndicates than the issue relates to something that worked in a previous version
    on May 17, 2024
  9. added a commit that references this issue on May 19, 2024
    6679674
  10. added a commit that references this issue on May 22, 2024
    a27600c
  11. added a commit that references this issue on May 22, 2024
    85c1719
  12. angular-automatic-lock-bot commented on Jun 22, 2024

    @angular-automatic-lock-bot

    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.

  13. locked and limited conversation to collaborators on Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: zonesIssues related to zone.jsregressionIndicates than the issue relates to something that worked in a previous version

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions