Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBrave Ad notifications on desktop should timeout consistently across platforms #8546
Comments
|
Confirmed behaviour on Windows (at least) seems to be correct - ads time out after 2 mins as expected. Tested Nightly on activated Windows install, and no notifications are shown, getting error |
@masparrow Our testing only showed this working as expected on debug builds, can you please confirm |
|
@tmancey Apologies - missed the key word there - it should read 'Confirmed behaviour on Windows debug (at least)...' Regarding Nightly not showing notifications at all (on Brave iMac Windows VM and my own Windows Dev PC) I have been through the thread you supplied (https://bravesoftware.slack.com/archives/C43LW5U2H/p1577987813048600?thread_ts=1577912851.045600) and followed steps regarding Outlook, but with respect to Brave. Reinstalling Nightly does not fix the issue on my own Windows PC, and checking through the registry and policy settings, everything seems in order as the Microsoft Outlook support thread sets out. Still investigating. |
|
@masparrow For what we can tell, this is a bug with Windows, please reply to the chat thread to see if others found a solution and did not post |
|
After debugging this issue we have found that ad notifications are working as expected using debug and release builds for all channels (nightly, beta and release) on the following platforms: macOS: 2 minutes |
|
@kjozwiak @LaurenWags If QA could test to confirm they are seeing the same results, that would be great. Thanks |
|
I can confirm I'm seeing 2 minute timeout for ads on macOS Mojave. cc @GeetaSarvadnya @btlechowski to confirm on Windows/Linux. |
Same results on |
|
@LaurenWags @kjozwiak Would be great to get confirmation on Windows and Linux too. Thanks |
Brave Ad notifications should timeout consistently across desktop platforms. So we need to change Windows and Linux to timeout after 2 minutes.
Currently:
macOS: 2 minutes
Windows: ∞
Linux: ∞
When an ad notification is ready to be shown we call
AdsServiceImpl::ShowNotificationwhich shows a native OS notification and then start a timer to force close the notification after 120 seconds (see IMPORTANT notes concerning non code-signed binaries).The callstack is as follows:
AdsServiceImpl::ShowNotificationAdsServiceImpl::NotificationTimedOut(after 120 seconds)AdsServiceImpl::CloseNotificationdisplay_service_->Close(NotificationHandler::Type::BRAVE_ADS, uuid);(fails to close the notification on Windows and Linux)...
notification_platform_bridge_<platform>.ccReplace
<platform>withwin,linux,macos, i.e.notification_platform_bridge_win.ccIMPORTANT
Confirm the ad notification is a native OS notification and if not, let me know so I can help enable native notifications within the browser (as for various reasons Chromium notifications can be shown).
Changes to
src/chromefiles should be via patches, reach out if you need assistance. However, to find the cause of the issue, changes can be made locally.Builds which have not been code-signed may timeout sooner, i.e. notifications on macOS timeout after 5 seconds on builds which have not been code-signed, so for sanity testing the fix I would set the time-out to 1 second.