brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
18k stars 2.36k forks source link

Brave crashed when attempted to refresh Brave VPN credentials #41093

Closed MadhaviSeelam closed 2 months ago

MadhaviSeelam commented 2 months ago

Description

Brave crashed when credentials were refreshed on account.bravesoftware.com  

Crash from Monday, September 16, 2024 at 8:48:54 AM
Status: Uploaded
Uploaded Crash Report ID:   6bb71200-9ce4-970c-0000-000000000000
Upload Time:    Monday, September 16, 2024 at 8:50:16 AM

Steps to reproduce

  1. Install 1.72.12
  2. launch Brave
  3. logged into account.bravesoftware.com as an existing VPN user (refresh39132vpn627@mailinator.com)

Actual result

image

https://github.com/user-attachments/assets/930eee46-03b2-442e-b96b-337c42be4cc9

[ 00 ] std::__Cr::unique_ptr<brave_vpn::mojom::Region,std::__Cr::default_delete<brave_vpn::mojom::Region> >::get() ( unique_ptr.h:261 )
[ 01 ] mojo::StructPtr<brave_vpn::mojom::Region>::operator->() ( struct_ptr.h:85 )
[ 02 ] brave_vpn::BraveVpnService::IsCurrentRegionSelectedAutomatically(mojo::StructPtr<brave_vpn::mojom::Region> const &) ( brave_vpn_service.cc:394 )
[ 03 ] brave_vpn::BraveVpnService::OnSelectedRegionChanged(std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > const &) ( brave_vpn_service.cc:195 )
[ 04 ] brave_vpn::BraveVPNConnectionManager::NotifySelectedRegionChanged(std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > const &) ( brave_vpn_connection_manager.cc:77 )
[ 05 ] base::RepeatingCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &)>::Run(std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > const &) ( callback.h:344 )
[ 06 ] brave_vpn::BraveVPNRegionDataManager::SetSelectedRegion(std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > const &) ( brave_vpn_region_data_manager.cc:45 )
[ 07 ] brave_vpn::BraveVPNRegionDataManager::NotifyRegionDataReady() ( brave_vpn_region_data_manager.cc:190 )
[ 08 ] brave_vpn::BraveVPNRegionDataManager::OnFetchTimezones(std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > const &,bool) ( brave_vpn_region_data_manager.cc:273 )
[ 09 ] base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>::Run(std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > const &,bool) ( callback.h:157 )
[ 10 ] brave_vpn::BraveVpnAPIRequest::OnGetResponse(base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>,api_request_helper::APIRequestResult) ( brave_vpn_api_request.cc:264 )
[ 11 ] base::internal::InvokeHelper<1,base::internal::FunctorTraits<void (brave_vpn::BraveVpnAPIRequest::*&&)(base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>, api_request_helper::APIRequestResult),base::WeakPtr<brave_vpn::BraveVpnAPIRequest> &&,base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)> &&>,void,0,1>::MakeItSo((base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>,api_request_helper::APIRequestResult) &&,std::__Cr::tuple<base::WeakPtr<brave_vpn::BraveVpnAPIRequest>,base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)> > &&,api_request_helper::APIRequestResult &&) ( bind_internal.h:954 )
[ 12 ] base::internal::Invoker<base::internal::FunctorTraits<void (brave_vpn::BraveVpnAPIRequest::*&&)(base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>, api_request_helper::APIRequestResult),base::WeakPtr<brave_vpn::BraveVpnAPIRequest> &&,base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)> &&>,base::internal::BindState<1,1,0,void (brave_vpn::BraveVpnAPIRequest::*)(base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>, api_request_helper::APIRequestResult),base::WeakPtr<brave_vpn::BraveVpnAPIRequest>,base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)> >,void (api_request_helper::APIRequestResult)>::RunImpl((base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>,api_request_helper::APIRequestResult) &&,std::__Cr::tuple<base::WeakPtr<brave_vpn::BraveVpnAPIRequest>,base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)> > &&,std::__Cr::integer_sequence<unsigned long long,0,1>,api_request_helper::APIRequestResult &&) ( bind_internal.h:1067 )
[ 13 ] base::internal::Invoker<base::internal::FunctorTraits<void (brave_vpn::BraveVpnAPIRequest::*&&)(base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>, api_request_helper::APIRequestResult),base::WeakPtr<brave_vpn::BraveVpnAPIRequest> &&,base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)> &&>,base::internal::BindState<1,1,0,void (brave_vpn::BraveVpnAPIRequest::*)(base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)>, api_request_helper::APIRequestResult),base::WeakPtr<brave_vpn::BraveVpnAPIRequest>,base::OnceCallback<void (const std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > &, bool)> >,void (api_request_helper::APIRequestResult)>::RunOnce(base::internal::BindStateBase *,api_request_helper::APIRequestResult &&) ( bind_internal.h:980 )
[ 14 ] base::OnceCallback<void (api_request_helper::APIRequestResult)>::Run(api_request_helper::APIRequestResult) ( callback.h:157 )
[ 15 ] api_request_helper::APIRequestHelper::DeleteAndSendResult(std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>,base::OnceCallback<void (api_request_helper::APIRequestResult)>,api_request_helper::APIRequestResult) ( api_request_helper.cc:255 )
[ 16 ] base::internal::InvokeHelper<1,base::internal::FunctorTraits<void (api_request_helper::APIRequestHelper::*&&)(std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>, base::OnceCallback<void (api_request_helper::APIRequestResult)>, api_request_helper::APIRequestResult),base::WeakPtr<api_request_helper::APIRequestHelper> &&,std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *> &&,base::OnceCallback<void (api_request_helper::APIRequestResult)> &&>,void,0,1,2>::MakeItSo((std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>,base::OnceCallback<void (api_request_helper::APIRequestResult)>,api_request_helper::APIRequestResult) &&,std::__Cr::tuple<base::WeakPtr<api_request_helper::APIRequestHelper>,std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>,base::OnceCallback<void (api_request_helper::APIRequestResult)> > &&,api_request_helper::APIRequestResult &&) ( bind_internal.h:954 )
[ 17 ] base::internal::Invoker<base::internal::FunctorTraits<void (api_request_helper::APIRequestHelper::*&&)(std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>, base::OnceCallback<void (api_request_helper::APIRequestResult)>, api_request_helper::APIRequestResult),base::WeakPtr<api_request_helper::APIRequestHelper> &&,std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *> &&,base::OnceCallback<void (api_request_helper::APIRequestResult)> &&>,base::internal::BindState<1,1,0,void (api_request_helper::APIRequestHelper::*)(std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>, base::OnceCallback<void (api_request_helper::APIRequestResult)>, api_request_helper::APIRequestResult),base::WeakPtr<api_request_helper::APIRequestHelper>,std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>,base::OnceCallback<void (api_request_helper::APIRequestResult)> >,void (api_request_helper::APIRequestResult)>::RunImpl((std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>,base::OnceCallback<void (api_request_helper::APIRequestResult)>,api_request_helper::APIRequestResult) &&,std::__Cr::tuple<base::WeakPtr<api_request_helper::APIRequestHelper>,std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>,base::OnceCallback<void (api_request_helper::APIRequestResult)> > &&,std::__Cr::integer_sequence<unsigned long long,0,1,2>,api_request_helper::APIRequestResult &&) ( bind_internal.h:1067 )
[ 18 ] base::internal::Invoker<base::internal::FunctorTraits<void (api_request_helper::APIRequestHelper::*&&)(std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>, base::OnceCallback<void (api_request_helper::APIRequestResult)>, api_request_helper::APIRequestResult),base::WeakPtr<api_request_helper::APIRequestHelper> &&,std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *> &&,base::OnceCallback<void (api_request_helper::APIRequestResult)> &&>,base::internal::BindState<1,1,0,void (api_request_helper::APIRequestHelper::*)(std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>, base::OnceCallback<void (api_request_helper::APIRequestResult)>, api_request_helper::APIRequestResult),base::WeakPtr<api_request_helper::APIRequestHelper>,std::__Cr::__list_iterator<std::__Cr::unique_ptr<api_request_helper::APIRequestHelper::URLLoaderHandler,std::__Cr::default_delete<api_request_helper::APIRequestHelper::URLLoaderHandler> >,void *>,base::OnceCallback<void (api_request_helper::APIRequestResult)> >,void (api_request_helper::APIRequestResult)>::RunOnce(base::internal::BindStateBase *,api_request_helper::APIRequestResult &&) ( bind_internal.h:980 )
[ 19 ] base::OnceCallback<void (api_request_helper::APIRequestResult)>::Run(api_request_helper::APIRequestResult) ( callback.h:157 )
[ 20 ] api_request_helper::APIRequestHelper::URLLoaderHandler::OnParseJsonResponse(api_request_helper::APIRequestResult,base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >) ( api_request_helper.cc:511 )
[ 21 ] base::internal::Invoker<base::internal::FunctorTraits<void (api_request_helper::APIRequestHelper::URLLoaderHandler::*&&)(api_request_helper::APIRequestResult, base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >),base::WeakPtr<api_request_helper::APIRequestHelper::URLLoaderHandler> &&,api_request_helper::APIRequestResult &&>,base::internal::BindState<1,1,0,void (api_request_helper::APIRequestHelper::URLLoaderHandler::*)(api_request_helper::APIRequestResult, base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >),base::WeakPtr<api_request_helper::APIRequestHelper::URLLoaderHandler>,api_request_helper::APIRequestResult>,void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)>::RunOnce(base::internal::BindStateBase *,base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > > &&) ( bind_internal.h:980 )
[ 22 ] base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)>::Run(base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >) ( callback.h:157 )
[ 23 ] api_request_helper::`anonymous namespace'::ParseJsonUsingRust::<lambda_0>::operator()(base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)>,base::expected<base::Value,base::JSONReader::Error>) ( api_request_helper.cc:62 )
[ 24 ] base::internal::DecayedFunctorTraits<`lambda at ..\..\brave\components\api_request_helper\api_request_helper.cc:57:11',base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> &&>::Invoke(api_request_helper::`anonymous namespace'::ParseJsonUsingRust::<lambda_0> &&,base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> &&,base::expected<base::Value,base::JSONReader::Error> &&) ( bind_internal.h:656 )
[ 25 ] base::internal::InvokeHelper<0,base::internal::FunctorTraits<`lambda at ..\..\brave\components\api_request_helper\api_request_helper.cc:57:11' &&,base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> &&>,void,0>::MakeItSo(api_request_helper::`anonymous namespace'::ParseJsonUsingRust::<lambda_0> &&,std::__Cr::tuple<base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> > &&,base::expected<base::Value,base::JSONReader::Error> &&) ( bind_internal.h:930 )
[ 26 ] base::internal::Invoker<base::internal::FunctorTraits<`lambda at ..\..\brave\components\api_request_helper\api_request_helper.cc:57:11' &&,base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> &&>,base::internal::BindState<0,0,0,`lambda at ..\..\brave\components\api_request_helper\api_request_helper.cc:57:11',base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> >,void (base::expected<base::Value,base::JSONReader::Error>)>::RunImpl(api_request_helper::`anonymous namespace'::ParseJsonUsingRust::<lambda_0> &&,std::__Cr::tuple<base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> > &&,std::__Cr::integer_sequence<unsigned long long,0>,base::expected<base::Value,base::JSONReader::Error> &&) ( bind_internal.h:1067 )
[ 27 ] base::internal::Invoker<base::internal::FunctorTraits<`lambda at ..\..\brave\components\api_request_helper\api_request_helper.cc:57:11' &&,base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> &&>,base::internal::BindState<0,0,0,`lambda at ..\..\brave\components\api_request_helper\api_request_helper.cc:57:11',base::OnceCallback<void (base::expected<base::Value,std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > >)> >,void (base::expected<base::Value,base::JSONReader::Error>)>::RunOnce(base::internal::BindStateBase *,base::expected<base::Value,base::JSONReader::Error> &&) ( bind_internal.h:980 )
[ 28 ] base::OnceCallback<void (base::expected<base::Value,base::JSONReader::Error>)>::Run(base::expected<base::Value,base::JSONReader::Error>) ( callback.h:157 )
[ 29 ] base::internal::ReplyAdapter<base::expected<base::Value,base::JSONReader::Error>,base::expected<base::Value,base::JSONReader::Error> >(base::OnceCallback<void (base::expected<base::Value,base::JSONReader::Error>)>,std::__Cr::unique_ptr<base::expected<base::Value,base::JSONReader::Error>,std::__Cr::default_delete<base::expected<base::Value,base::JSONReader::Error> > > *) ( post_task_and_reply_with_result_internal.h:32 )
[ 30 ] base::internal::DecayedFunctorTraits<void (*)(base::OnceCallback<void (gfx::Image)>, std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *),base::OnceCallback<void (gfx::Image)> &&,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *>::Invoke((base::OnceCallback<void (gfx::Image)>,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *) &&,base::OnceCallback<void (gfx::Image)> &&,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > * &&) ( bind_internal.h:671 )
[ 31 ] base::internal::InvokeHelper<0,base::internal::FunctorTraits<void (*&&)(base::OnceCallback<void (gfx::Image)>, std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *),base::OnceCallback<void (gfx::Image)> &&,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *>,void,0,1>::MakeItSo((base::OnceCallback<void (gfx::Image)>,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *) &&,std::__Cr::tuple<base::OnceCallback<void (gfx::Image)>,base::internal::OwnedWrapper<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> >,std::__Cr::default_delete<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > > > > &&) ( bind_internal.h:930 )
[ 32 ] base::internal::Invoker<base::internal::FunctorTraits<void (*&&)(base::OnceCallback<void (gfx::Image)>, std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *),base::OnceCallback<void (gfx::Image)> &&,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *>,base::internal::BindState<0,1,0,void (*)(base::OnceCallback<void (gfx::Image)>, std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *),base::OnceCallback<void (gfx::Image)>,base::internal::OwnedWrapper<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> >,std::__Cr::default_delete<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > > > >,void ()>::RunImpl((base::OnceCallback<void (gfx::Image)>,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *) &&,std::__Cr::tuple<base::OnceCallback<void (gfx::Image)>,base::internal::OwnedWrapper<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> >,std::__Cr::default_delete<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > > > > &&,std::__Cr::integer_sequence<unsigned long long,0,1>) ( bind_internal.h:1067 )
[ 33 ] base::internal::Invoker<base::internal::FunctorTraits<void (*&&)(base::OnceCallback<void (gfx::Image)>, std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *),base::OnceCallback<void (gfx::Image)> &&,std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *>,base::internal::BindState<0,1,0,void (*)(base::OnceCallback<void (gfx::Image)>, std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > *),base::OnceCallback<void (gfx::Image)>,base::internal::OwnedWrapper<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> >,std::__Cr::default_delete<std::__Cr::unique_ptr<gfx::Image,std::__Cr::default_delete<gfx::Image> > > > >,void ()>::RunOnce(base::internal::BindStateBase *) ( bind_internal.h:980 )
[ 34 ] base::OnceCallback<void ()>::Run() ( callback.h:156 )
[ 35 ] base::internal::PostTaskAndReplyRelay::RunReply(base::internal::PostTaskAndReplyRelay) ( post_task_and_reply_impl.h:63 )
[ 36 ] base::internal::DecayedFunctorTraits<void (*)(base::internal::PostTaskAndReplyRelay),base::internal::PostTaskAndReplyRelay &&>::Invoke((base::internal::PostTaskAndReplyRelay) &&,base::internal::PostTaskAndReplyRelay &&) ( bind_internal.h:671 )
[ 37 ] base::internal::InvokeHelper<0,base::internal::FunctorTraits<void (*&&)(base::internal::PostTaskAndReplyRelay),base::internal::PostTaskAndReplyRelay &&>,void,0>::MakeItSo((base::internal::PostTaskAndReplyRelay) &&,std::__Cr::tuple<base::internal::PostTaskAndReplyRelay> &&) ( bind_internal.h:930 )
[ 38 ] base::internal::Invoker<base::internal::FunctorTraits<void (*&&)(base::internal::PostTaskAndReplyRelay),base::internal::PostTaskAndReplyRelay &&>,base::internal::BindState<0,1,0,void (*)(base::internal::PostTaskAndReplyRelay),base::internal::PostTaskAndReplyRelay>,void ()>::RunImpl((base::internal::PostTaskAndReplyRelay) &&,std::__Cr::tuple<base::internal::PostTaskAndReplyRelay> &&,std::__Cr::integer_sequence<unsigned long long,0>) ( bind_internal.h:1067 )
[ 39 ] base::internal::Invoker<base::internal::FunctorTraits<void (*&&)(base::internal::PostTaskAndReplyRelay),base::internal::PostTaskAndReplyRelay &&>,base::internal::BindState<0,1,0,void (*)(base::internal::PostTaskAndReplyRelay),base::internal::PostTaskAndReplyRelay>,void ()>::RunOnce(base::internal::BindStateBase *) ( bind_internal.h:980 )
[ 40 ] base::OnceCallback<void ()>::Run() ( callback.h:156 )
[ 41 ] base::TaskAnnotator::RunTaskImpl(base::PendingTask &) ( task_annotator.cc:203 )
[ 42 ] base::TaskAnnotator::RunTask(perfetto::StaticString,base::PendingTask &,base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl::<lambda_4> &&) ( task_annotator.h:90 )
[ 43 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow *) ( thread_controller_with_message_pump_impl.cc:484 )
[ 44 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ( thread_controller_with_message_pump_impl.cc:346 )
[ 45 ] base::MessagePumpForUI::DoRunLoop() ( message_pump_win.cc:259 )
[ 46 ] base::MessagePumpWin::Run(base::MessagePump::Delegate *) ( message_pump_win.cc:84 )
[ 47 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool,base::TimeDelta) ( thread_controller_with_message_pump_impl.cc:657 )
[ 48 ] base::RunLoop::Run(base::Location const &) ( run_loop.cc:136 )
[ 49 ] content::BrowserMainLoop::RunMainMessageLoop() ( browser_main_loop.cc:1101 )
[ 50 ] content::BrowserMainRunnerImpl::Run() ( browser_main_runner_impl.cc:157 )
[ 51 ] content::BrowserMain(content::MainFunctionParams) ( browser_main.cc:34 )
[ 52 ] RunBrowserProcessMain(content::MainFunctionParams,content::ContentMainDelegate *) ( content_main_runner_impl.cc:732 )
[ 53 ] content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams,bool) ( content_main_runner_impl.cc:1306 )
[ 54 ] content::ContentMainRunnerImpl::Run() ( content_main_runner_impl.cc:1158 )
[ 55 ] RunContentProcess(content::ContentMainParams,content::ContentMainRunner *) ( content_main.cc:331 )
[ 56 ] content::ContentMain(content::ContentMainParams) ( content_main.cc:344 )
[ 57 ] ChromeMain(HINSTANCE__ *,sandbox::SandboxInterfaceInfo *,__int64,__int64,__int64) ( chrome_main.cc:232 )
[ 58 ] MainDllLoader::Launch(HINSTANCE__ *,base::TimeTicks) ( main_dll_loader_win.cc:201 )
[ 59 ] wWinMain(HINSTANCE__ *,HINSTANCE__ *,wchar_t *,int) ( chrome_exe_main_win.cc:351 )
[ 60 ] invoke_main() ( exe_common.inl:118 )
[ 61 ] __scrt_common_main_seh() ( exe_common.inl:288 )
[ 62 ] BaseThreadInitThunk
[ 63 ] RtlUserThreadStart
[ 64 ] UnhandledExceptionFilter

Expected result

Brave browser should not crash

Reproduces how often

Easily reproduced

Brave version (brave://version info)

Brave | 1.71.87 Chromium: 129.0.6668.42 (Official Build) beta (64-bit)
-- | --
Revision | 5c708d5d9bcfc56422a4c7356708ff1d5cce9df5
OS | Windows 11 Version 23H2 (Build 22631.4169)

Channel information

Reproducibility

Miscellaneous information

@bsclifton @mattmcalister cc: @brave/qa-team

bsclifton commented 2 months ago

Thanks to @deeppandya for helping me troubleshoot and find the root cause!

The root cause is here: https://github.com/brave/brave-core/blob/7384eded6a3bbb3fb386d59c4bb77123e4373838/components/brave_vpn/browser/connection/brave_vpn_region_data_manager.cc#L125-L129

Basically, we are getting a mapping of timezones from Guardian. This has one set of region names. After merging https://github.com/brave/brave-core/pull/25089/, the region names are updated. For example, instead of us-west the region would be na-usa.

However, this code was never updated. It's passing the timezone region to the region code. The region parsing code does not find a match (since us-west will never match na-usa): https://github.com/brave/brave-core/blob/7384eded6a3bbb3fb386d59c4bb77123e4373838/components/brave_vpn/browser/connection/brave_vpn_region_data_helper.cc#L27-L45

nullptr is returned and this is the source of the crash

kjozwiak commented 2 months ago

The above requires 1.71.92 or higher for 1.71.x verification 👍

MadhaviSeelam commented 2 months ago

Verification PASSED using

Brave | 1.71.96 Chromium: 129.0.6668.70 (Official Build) beta (64-bit)
-- | --
Revision | 6dc1837bd07e6dacd8b6b7b5d9f27e7bb09b5eb5
OS | Windows 11 Version 23H2 (Build 22631.4169)
  1. Installed 1.71.96
  2. launched Brave
  3. logged into account.bravesoftware.com as an existing VPN subscriber (refresh39132vpn627@mailinator.com)
  4. clicked Refresh Firewall + VPN button on the subscription page
  5. waited for few seconds and confirmed credentials loaded message shown
  6. clicked VPN button in the toolbar
  7. confirmed no crash happened
  8. enabled/disabled via VPN panel, hamburger menu and taskbar VPN icon
  9. switched to different region - Switzerland
  10. opened whatismyipaddress.com
  11. VPN worked as expected
  12. confirmed correct region is shown
step 4 step 5 step 6 step 7 step 8 step 12
image image image image image image
BrendanEich commented 2 months ago

nullptr is returned and this is the source of the crash

Appreciate the region naming convention change didn't hit all the places it should have, but is there a robustness case against crashing even with the naming bug? Is the new code crashproof?

bsclifton commented 2 months ago

@BrendanEich good call- created https://github.com/brave/brave-browser/issues/41310 to address and self-assigned. Outlined two different ways we can try to improve things 😄

simonhong commented 2 months ago

@BrendanEich good call- created #41310 to address and self-assigned. Outlined two different ways we can try to improve things 😄

Added below to prevent crash from GetRegionPtrWithNameFromRegionList().

  // We should not reach here but if service(guardian) api give wrong list,
  // it could be crashed if we return null.
  // Instead, return first region in the list for safe.
  CHECK(!region_list.empty());
  return region_list[0].Clone();