Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: exit app instance when main package throws error on load #42029

Closed
wants to merge 29 commits into from

Conversation

Mrnikifabio
Copy link

Description of Change

This PR should fix #40606. Please let me know if any test is needed. I really didn't find anything related to default_app:main.ts in spec.

Checklist

Release Notes

Notes: Fixed an issue where if an error occurred while loading the main package an error message was not displayed and the app was not exited with an error code.

Copy link

welcome bot commented May 3, 2024

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 3, 2024
@codebytere
Copy link
Member

@Mrnikifabio could you rebase this?

@Mrnikifabio
Copy link
Author

I had to force push because I initially did a merge in place of rebase. I think this is what you wanted.
Let me know if anything else is needed 👍

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label May 10, 2024
Mrnikifabio and others added 23 commits May 14, 2024 10:41
…#42042)

* Keep GitHub Actions up to date with GitHub's Dependabot

Fixes software supply chain safety warnings like at the bottom right of
https://github.com/electron/electron/actions/runs/8619491231

* [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot)
* [Configuration options for the dependabot.yml file - package-ecosystem](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem)

* Apply suggestion from code review

* chore: fully remove groups

---------

Co-authored-by: David Sanders <[email protected]>
…ctron#42075)

Bumps [actions-cool/issues-helper](https://github.com/actions-cool/issues-helper) from 3.3.3 to 3.6.0.
- [Release notes](https://github.com/actions-cool/issues-helper/releases)
- [Changelog](https://github.com/actions-cool/issues-helper/blob/main/CHANGELOG.md)
- [Commits](actions-cool/issues-helper@2753289...a610082)

---
updated-dependencies:
- dependency-name: actions-cool/issues-helper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…n#42073)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.0 to 3.25.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@e8893c5...d39d31e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: use //ui/shell_dialogs on Linux

* fix: add proper filtering

* fix: add support for missing dialog features to //shell_dialogs

* fix: parent_window could be null

* chore: cleanup patch

* fix: use a OnceCallback in the sync implementation

* chore: remove stray debuglog

* Apply suggestions from code review

Co-authored-by: Charles Kerr <[email protected]>

* refactor: use settings struct

* fix: show hidden file property checking

* chore: changes from review

* fix: multi selection for dialogs

---------

Co-authored-by: Charles Kerr <[email protected]>
* perf: avoid redundant map lookup in SimpleURLLoaderWrapper::GetURLLoaderFactoryForURL()

* perf: avoid redundant map lookup in InspectableWebContents::LoadNetworkResource()

* refactor: remove unused ProtocolRegistry::IsProtocolRegistered()

refactor: remove unused ProtocolRegistry::IsProtocolIntercepted()

* refactor: remove unused ProtocolRegistry::handlers()

* refactor: rename ProtocolRegistry::FindIntercepted()

refactor: rename ProtocolRegistry::FindRegistered()

similar semantics to base::Value::Find*()

* chore: follow Google C++ brace style

chore: use same variable names as in main
Bumps [mikefarah/yq](https://github.com/mikefarah/yq) from 4.40.7 to 4.43.1.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](mikefarah/yq@bb66c9c...c35ec75)

---
updated-dependencies:
- dependency-name: mikefarah/yq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: bump chromium in DEPS to 125.0.6421.0

* chore: bump chromium in DEPS to 125.0.6422.0

* Add ENABLE_BASE_TRACING flags for compatibility with enable_base_tracing = false on Windows

https://chromium-review.googlesource.com/c/chromium/src/+/5434658

* chore: update patches

* fixup: Add ENABLE_BASE_TRACING flags for compatibility with enable_base_tracing = false on Windows

* chore: bump chromium in DEPS to 126.0.6423.0

* chore: update patches

* 5426599: Next generation control of unsafe-buffers-usage plugin

https://chromium-review.googlesource.com/c/chromium/src/+/5426599

* chore: bump chromium in DEPS to 126.0.6425.0

* chore: update patches

* Roll clang+rust llvmorg-19-init-7229-g315c88c5-2 : llvmorg-19-init-8091-gab037c4f-1 / ceab6128fa48a616bfd3e3adf4bc80133b8ee223-1 : ab71ee7a9214c2793108a41efb065aa77aeb7326-1

https://chromium-review.googlesource.com/c/chromium/src/+/5444328
Also see https://issues.chromium.org/issues/332931387

* 5445074: [Views AX] Move AXEventNotificationDetails to ui/accessibility/

https://chromium-review.googlesource.com/c/chromium/src/+/5445074
Also
5455993: [Views AX] Rename AXEventNotificationDetails to AXUpdatesAndEvents | https://chromium-review.googlesource.com/c/chromium/src/+/5455993

* Pass IsolationInfo to ContentBrowserClient::WillCreateURLLoaderFactory()

https://chromium-review.googlesource.com/c/chromium/src/+/5405301

* chore: bump chromium in DEPS to 126.0.6427.0

* chore: update patches

* chore: remove no longer needed patch

perfetto is now turned on so this patch is no longer needed.

* chore: bump chromium in DEPS to 126.0.6429.0

* chore: bump chromium in DEPS to 126.0.6431.0

* chore: bump chromium in DEPS to 126.0.6433.0

* 5466654: Do not create a console if logging to a handle

https://chromium-review.googlesource.com/c/chromium/src/+/5466654

* chore: fixup patch indices

* Address Linux NonClientFrameView Changes

- https://chromium-review.googlesource.com/c/chromium/src/+/5180720
- https://chromium-review.googlesource.com/c/chromium/src/+/5367794

* chore: bump chromium in DEPS to 126.0.6435.0

* chore: bump chromium in DEPS to 126.0.6437.0

* chore: update patches

* chore: bump chromium in DEPS to 126.0.6439.0

* chore: bump chromium in DEPS to 126.0.6441.0

* 5477689: components/crash/content/tools: Format with yapf | https://chromium-review.googlesource.com/c/chromium/src/+/5477689

* 5485006: Remove enable_print_content_analysis GN flag | https://chromium-review.googlesource.com/c/chromium/src/+/5485006

* chore: update chromium patches

* chore: bump chromium in DEPS to 126.0.6443.0

* 5465608: Convert DCHECKs near RenderWidgetHost, DelegatedFrameHost to CHECK | https://chromium-review.googlesource.com/c/chromium/src/+/5465608

* 5492605: Migrate TODOs referencing old crbug IDs to the new issue tracker IDs | https://chromium-review.googlesource.com/c/chromium/src/+/5492605

* chore: update patches

* chore: bump chromium in DEPS to 126.0.6445.0

* chore: update patches

* 5468588: Fullscreen: Encapsulate ExclusiveAccessBubble params in a struct | https://chromium-review.googlesource.com/c/chromium/src/+/5468588

* fixup! 5485006: Remove enable_print_content_analysis GN flag | https://chromium-review.googlesource.com/c/chromium/src/+/5485006

* 5461340: `size_t` in `mojo::DataPipe[Consumer|Producer]Handle`: /components. | https://chromium-review.googlesource.com/c/chromium/src/+/5461340

* 5480213: Add an EvictIds struct to FrameEvictorClient | https://chromium-review.googlesource.com/c/chromium/src/+/5480213

* 4341506: [api] Deprecate Isolate::IdleNotificationDeadline | https://chromium-review.googlesource.com/c/v8/v8/+/4341506

* 5300826: [v8-tasks] Add source location to v8::TaskRunner, step 4/4. | https://chromium-review.googlesource.com/c/v8/v8/+/5300826

* partially revert is_newly_created to allow for browser initiated about:blank loads

* add dep on app_launch_prefetch

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5420149

* install sysroots from electron not from chrome

We should add a new var upstream for `download_sysroots` so that we can skip downloading chromes at all.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5462469

* refactor: make UpdateFrameHints an override

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5473548

* fix ppapi

* refactor: update namespace for pwm switches

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5444617

* 5459367: WebSQL: Restrict WebSQL service creation to Android only | https://chromium-review.googlesource.com/c/chromium/src/+/5459367

* 5455853: Revert "[Clipboard] Don't add meta charset tag for async write() method on Mac." | https://chromium-review.googlesource.com/c/chromium/src/+/5455853

* fixup! refactor: update namespace for pwm switches
edd9e26
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5444617

* 5147611: [heap] Add checks for ensuring position info slow path is not used in heap snapshot | https://chromium-review.googlesource.com/c/v8/v8/+/5147611

* fixup! 5412666: [heap] Also avoid heap allocation for allocation tracked functions | https://chromium-review.googlesource.com/c/v8/v8/+/5412666

* chore: add websql removal to breaking-changes.md

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: VerteDinde <[email protected]>
Co-authored-by: Keeley Hammond <[email protected]>
Co-authored-by: Samuel Attard <[email protected]>
* docs: improve protocol.handle file examples

* chore: fix lint
ckerr and others added 6 commits May 14, 2024 10:41
* perf: avoid temporary strings in Converter<net::HttpRequestHeaders>::FromV8()

* perf: take strings instead of copying them in ToResponseHead()

* refactor: prefer base::Value::Take*() where appropriate

As per the base::Value docs: "prefer over `std::move(value.Get...())`
so clang-tidy can warn about potential use-after-move mistakes."
* chore: bump node in DEPS to v20.13.0

* crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL

nodejs/node#52217

* test: skip test for dynamically linked OpenSSL

nodejs/node#52542

* lib, url: add a `windows` option to path parsing

nodejs/node#52509

* src: use dedicated routine to compile function for builtin CJS loader

nodejs/node#52016

* test: mark test as flaky

nodejs/node#52671

* build,tools: add test-ubsan ci

nodejs/node#46297

* src: preload function for Environment

nodejs/node#51539

* chore: fixup patch indices

* deps: update c-ares to 1.28.1

nodejs/node#52285

* chore: handle updated filenames

- nodejs/node#51999
- nodejs/node#51927

* chore: bump node in DEPS to v20.13.1

* events: extract addAbortListener for safe internal use

nodejs/node#52081

* module: print location of unsettled top-level await in entry points

nodejs/node#51999

* fs: add stacktrace to fs/promises

nodejs/node#49849

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
* spec: add tests for electron fuses

* spec: fix tests for windows

* spec: handle weird crash codes on win32

* spec: disable fuse tests on arm64 windows
Co-authored-by: electron-appveyor-updater[bot] <161660339+electron-appveyor-updater[bot]@users.noreply.github.com>
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a deeper look into why this was initially added and unfortunately I don't think we'll be able to move this forward.

Exiting when the main package throws an error on load makes the error uncatchable from app code. That would then make it inconsistent with packaged app behavior - as of now, if the app bundle sets up an uncaught error handler and then did something that threw an error they could catch their own issue. This change would remove that ability which would be a blocking issue for a nontrivial number of apps.

@codebytere codebytere closed this May 17, 2024
@Mrnikifabio Mrnikifabio deleted the feat/exit-app branch May 17, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Exit App instance when main package throws error on load