Skip to content

Hard crash when using webRequest handlers in 1.8.1 #10766

Closed

Description

@Thomas101
  • Electron version: 1.8.1. Not present 1.7.x
  • Operating system: macOS 10.12.6

This may be related to #10651, the final error looks similar but the reproduction method is completely different

Expected behavior

Electron should not crash after adding a webRequest handler such as...

mainWindow.webContents.session.webRequest.onCompleted((evt) => console.log('complete', evt.url))

Actual behavior

On certain urls (https://mail.google.com as an example), adding an onCompleted, onBeforeRequest, etc handler, and then reloading or navigating away from the page causes a hard crash producing an EXC_BAD_ACCESS error

Full crash log

How to reproduce

  1. Install quick-start
git clone https://github.com/wavebox/electron-quick-start.git
cd electron-quick-start
git checkout 1_8_1_crash
npm install
npm start
  1. Login to a google account
  2. Reload with cmd+R

Removing the onCompleted handler in main.js stops the crash

Activity

  1. qazbnm456 commented on Oct 12, 2017

    @qazbnm456
    Contributor

    Hi @Thomas101 , fyi, this problem has been addressed and resolved in #10676, and I believe this situation will be remediated when the next version of electron comes out.

    By the way, I think the root cause is not the same as #10651 actually.

  2. Thomas101 commented on Oct 12, 2017

    @Thomas101
    ContributorAuthor

    @qazbnm456 thanks for the update! If it's fixed, I'll close this off and look forward to 1.8.2 :)

  3. qazbnm456 commented on Oct 20, 2017

    @qazbnm456
    Contributor

    @Thomas101 FYI, the version 1.8.2-beta.1 just released. You may try it and see if it works well. 😄

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions