Skip to content

webFrame.executeJavaScript(InIsolatedWorld) APIs swallow errors #12160

Closed

Description

@bughit
  • Electron version: recent master (dfa1dc4)
  • Operating system: win7 sp1 x64

Expected behavior

Errors should not be swallowed. Currently these APIs return undefined (#12159). Depending on how that's addressed:

  • If they return the result (which is ideal since the execution is synchronous), they should throw on error.
  • If they return a promise, it should be rejected on error
  • the callback they take should deliver the error

Actual behavior

The error is dumped to the console, the API's return undefined, don't throw and the callback receives undefined result.

How to reproduce

Call them with JS that should fail (e.g. 'non_existent_identifier')

Activity

  1. sofianguy commented on Jan 7, 2019

    @sofianguy
    Contributor

    Thank you for taking the time to report this issue and helping to make Electron better.

    The version of Electron you reported this on has been superseded by newer releases.

    If you're still experiencing this issue in Electron v2.0.x or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

    I'm setting the blocked/need-info label for the above reasons.

    Thanks in advance! Your help is appreciated.

  2. added
    blocked/need-info ❌
    on Jan 7, 2019
  3. sofianguy commented on Jan 15, 2019

    @sofianguy
    Contributor

    Thank you for your issue!

    We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked/need-info ❌bug 🪲platform/windowsversion/1.8.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions