Skip to content

Unable to call native addon's async function from iframe #14035

Closed

Description

@winrono
  • Electron Version: 2.0.7
  • Operating System (Platform and Version): Windows 10
  • Last known working Electron version:

Expected Behavior

I expect native addon's async functions to work in iframes

Actual behavior
If to call native addon's async function from iframe DevTools will be disconnected, app will not respond until reload

To Reproduce
I created repository with minimalistic setup https://github.com/winrono/electron_async_issue (check readme.md for instructions how to run easily). It basically use example https://github.com/nodejs/nan/tree/master/examples/async_pi_estimate for simplicity. Please note that if to comment runAsync(); in app.html (iframe) and uncomment the same statement in index.html electron app will be able to print async function's result without any problems. Apart from that any syncronous code could be called from iframe without any issues.

Screenshots
Here is what happening if to call runAsync function from iframe:
image

From index.html:
image

Activity

  1. welcome commented on Aug 12, 2018

    @welcome

    👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

    To help make it easier for us to investigate your issue, please follow the contributing guidelines.

  2. winrono commented on Sep 3, 2018

    @winrono
    Author

    is there any progress on this item?

  3. added 2 commits that reference this issue on Jan 17, 2019
    f5a166d
    aadee6c
  4. added 2 commits that reference this issue on Jan 27, 2019
    f883aa0
    0890b0c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions