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

crash when using sidepanel extension #31328

Closed
lazymonkey2 opened this issue Jun 27, 2023 · 6 comments · Fixed by brave/brave-core#19056
Closed

crash when using sidepanel extension #31328

lazymonkey2 opened this issue Jun 27, 2023 · 6 comments · Fixed by brave/brave-core#19056
Assignees
Labels
crash feature/sidebar Relating to Brave's Sidebar feature OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Win64 QA/Yes release-notes/include

Comments

@lazymonkey2
Copy link

lazymonkey2 commented Jun 27, 2023

Description

since chrome 114 google has implemented a new sidepanel api for web extensions:
https://developer.chrome.com/docs/extensions/reference/sidePanel/
I have installed this extension that uses this new api:
https://chrome.google.com/webstore/detail/bing-sidebar-for-chrome/ncjedehfkpnliaafimjhdjjeggmfmlgf
but when I try to show the brave sidebar the browser crashes!
you should fix your custom sidepanel to support this new api.

Steps to Reproduce

  1. Install bing chat sidepanel extension https://chrome.google.com/webstore/detail/bing-chat-sidebar-for-chr/ncjedehfkpnliaafimjhdjjeggmfmlgf/relate
  2. Click bing chat extension icon from toolbar's extensions dialog(shown after clicking toolbar extension button)
  3. Sidebar is opened and bing chat extension is loaded in sidebar
  4. Close sidebar by clicking sidebar toolbar button and sidebar is closed
  5. Click sidebar toolbar button

Actual result:

Crashed

Expected result:

Not crashed

Reproduces how often:

Brave version (brave://version info)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Y
  • Can you reproduce this issue with the beta channel? Y
  • Can you reproduce this issue with the nightly channel? Y

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome?

Miscellaneous Information:

Crash log

[15955:259:0627/153022.263764:FATAL:side_panel_entry_key.cc(11)] Check failed: id_ != SidePanelEntryId::kExtension (16 vs. 16)
0   libbase.dylib                       0x00000001091ff152 base::debug::CollectStackTrace(void**, unsigned long) + 18
1   libbase.dylib                       0x00000001091e2e93 base::debug::StackTrace::StackTrace() + 19
2   libbase.dylib                       0x00000001090b2d51 logging::LogMessage::~LogMessage() + 177
3   libbase.dylib                       0x00000001090b3c4e logging::LogMessage::~LogMessage() + 14
4   libbase.dylib                       0x0000000109092fa7 logging::CheckError::~CheckError() + 23
5   libbase.dylib                       0x0000000109092fc9 logging::CheckError::~CheckError() + 9
6   libchrome_dll.dylib                 0x0000000117a2a8ac SidePanelEntryKey::SidePanelEntryKey(SidePanelEntryId) + 156
7   libchrome_dll.dylib                 0x0000000117b2c50e SidePanelCoordinator::Show(absl::optional<SidePanelEntryId>, absl::optional<SidePanelOpenTrigger>) + 334
8   libchrome_dll.dylib                 0x0000000117bdb3ae SidePanelToolbarButton_ChromiumImpl::ButtonPressed() + 62
@simonhong simonhong self-assigned this Jun 27, 2023
@simonhong
Copy link
Member

@tortino2 Thanks for reporting! I'm looking now.

@simonhong simonhong added crash priority/P2 A bad problem. We might uplift this to the next planned release. feature/sidebar Relating to Brave's Sidebar feature labels Jun 27, 2023
@lazymonkey2
Copy link
Author

lazymonkey2 commented Jun 27, 2023

crash reports from brave://crashes:
64c70900-c244-490a-0000-000000000000
62c70900-c244-490a-0000-000000000000

@simonhong
Copy link
Member

@tortino2 I added STR to issue description. maybe it's same with your steps?

@lazymonkey2
Copy link
Author

yes, they seems the same steps as mine.

simonhong added a commit to brave/brave-core that referenced this issue Jun 27, 2023
fix brave/brave-browser#31328

When last entry is extension, crash could be happened because we fetches only id
from last extension entry. and then upstream tries to create SidePanelEntryKey with
only that entry id. However extension's SidePanelEntryKey should be created with another ctor
with id and extension id.
If GetLastActiveEntryKey() can give value when entry_id is null,
let upstream handle it instead of fetching id from it.
simonhong added a commit to brave/brave-core that referenced this issue Jun 27, 2023
fix brave/brave-browser#31328

When last entry is extension, crash could be happened because we fetches only id
from last extension entry. and then upstream tries to create SidePanelEntryKey with
only that entry id. However extension's SidePanelEntryKey should be created with another ctor
with id and extension id.
If GetLastActiveEntryKey() can give value when entry_id is null,
let upstream handle it instead of fetching id from it.
@brave-builds brave-builds added this to the 1.55.x - Nightly milestone Jun 27, 2023
@kjozwiak
Copy link
Member

kjozwiak commented Jul 5, 2023

The above requires 1.53.110 or higher for 1.53.x verification 👍

@MadhaviSeelam MadhaviSeelam added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Jul 5, 2023
@MadhaviSeelam
Copy link

Verification PASSED using

Brave | 1.53.110 Chromium: 115.0.5790.56 (Official Build) (64-bit)
-- | --
Revision | ebcfb87c1393f36955cfa2f6451a1767e3dc3ee5-refs/branch-heads/5790@{#1193}
OS | Windows 11 Version 22H2 (Build 22621.1848)

Reproduced the issue in 1.52.129 Chromium: 114.0.5735.198 using STR from description #31328 (comment)

Verified Brave crashed when sidebar is clicked again,

2023-07-05_09h10_59.mp4
  1. Installed 1.53.x
  2. clicked Set Brave as default browser
  3. clicked Skip >> Finish
  4. installed bing chat sidepanel extension via https://chrome.google.com/webstore
  5. enabled Sidebar via hamburger menu>>Show Sidebar >> Always
  6. clicked extension icon in the toolbar to enable bing chat extension (waited few seconds to load)
  7. clicked Show sidebar icon in the toolbar to close both Sidebar including bing chat sidepanel`
  8. clicked Show sidebar icon again

Confirmed Brave no longer crashes when sidebar is clicked to open or close.

2023-07-05_09h41_09.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash feature/sidebar Relating to Brave's Sidebar feature OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Win64 QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants