Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

error in terminal when selecting File > Share without any open windows #13928

Closed
LaurenWags opened this issue Apr 24, 2018 · 2 comments
Closed

Comments

@LaurenWags
Copy link
Member

LaurenWags commented Apr 24, 2018

Test plan

See #13933

Description

Selecting 'File > Share' from the menu bar when there aren't any open windows throws an error in the terminal but does not seem to affect the application (app doesn't hang, crash, etc).

Steps to Reproduce

  1. Launch Brave from the terminal.
  2. Close any open windows, but ensure Brave is still running.
  3. Select File > Share

Actual result:
Error in terminal:

An uncaught exception occurred in the main process Uncaught Exception:
TypeError: Cannot read property 'get' of undefined
    at simpleShareActiveTab (/Applications/Brave.app/Contents/Resources/app.asar/app/browser/share.js:33:52)
    at shareReducer (/Applications/Brave.app/Contents/Resources/app.asar/app/browser/reducers/shareReducer.js:23:15)
    at reducers.reduce (/Applications/Brave.app/Contents/Resources/app.asar/js/stores/appStore.js:191:24)
    at Array.reduce (<anonymous>)
    at applyReducers (/Applications/Brave.app/Contents/Resources/app.asar/js/stores/appStore.js:189:68)
    at handleAppAction (/Applications/Brave.app/Contents/Resources/app.asar/js/stores/appStore.js:253:16)
    at callbacks.forEach (/Applications/Brave.app/Contents/Resources/app.asar/js/dispatcher/appDispatcher.js:107:7)
    at Array.forEach (<anonymous>)
    at AppDispatcher.dispatchToOwnRegisteredCallbacks (/Applications/Brave.app/Contents/Resources/app.asar/js/dispatcher/appDispatcher.js:106:20)
    at AppDispatcher.dispatchInternal (/Applications/Brave.app/Contents/Resources/app.asar/js/dispatcher/appDispatcher.js:132:10)

Expected result:
No error in terminal.

Reproduces how often:
easily

Brave Version

about:brave info:
Brave | 0.22.667
V8 | 6.6.346.24
rev | 0433b26
Muon | 5.2.6
OS Release | 16.7.0
Update Channel | Release
OS Architecture | x64
OS Platform | macOS
Node.js | 7.9.0
Brave Sync | v1.4.2
libchromiumcontent | 66.0.3359.117

Reproducible on current live release:
yes, reproduces on 0.22.22

Additional Information

Found by @kjozwiak

@LaurenWags
Copy link
Member Author

Checked on macOS 10.12.6 using

  • 0.22.702 e4a853d
  • muon 6.0.7
  • libchromiumcontent 66.0.3359.139

@kjozwiak could you give this one a look on your machine too since it's macOS only?

@kjozwiak
Copy link
Member

kjozwiak commented May 4, 2018

@LaurenWags looks like it's working on my end as well 👍 Ensured that the menu items under Share are being disabled when there's no windows opened but the Brave process is still running. Also made sure that each menu was re-enabled and worked once there was a window opened.

Checked on macOS 10.13.3 using the following build:

  • 0.22.702 e4a853d
  • muon: 6.0.7
  • libchromiumcontent: 66.0.3359.139

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants