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

Login feature for browser #91

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Login feature for browser #91

wants to merge 10 commits into from

Conversation

MasterK0927
Copy link
Collaborator

@MasterK0927 MasterK0927 commented Jan 3, 2025

Resolves #90

TODOs for POC:

  • Interrupt the browser from spawning upon startup.
  • Create the login screen UI as a full-screen modal view that blocks the entire browser interface.
  • Render a login view on main thread startup.
  • Set up form fields (username, password, login button) on the login screen.
  • Implement callbacks for binding the login button and browser startup launch together (need to review).
  • Successful login destroys the widget.
  • Successful login triggers the browser start process again

@MasterK0927 MasterK0927 marked this pull request as draft January 3, 2025 19:59
@MasterK0927
Copy link
Collaborator Author

MasterK0927 commented Jan 4, 2025

Redundant now

Bugs:

  • Browser crashes while success callback is received by the ::Launch method.

Additional Comments:

  1. It seems that the issue is with the profile instance.
    Likely, the Profile instance being accessed is either:
    - nullptr being dereferenced.
    - dangling pointer or invalid memory being used.
    Please find the log attached below for the same
[116276:116276:0107/174339.848952:INFO:login_screen_view.cc(72)] Login successful!
[0107/174339.911479:ERROR:elf_dynamic_array_reader.h(64)] tag not found
Received signal 11 SEGV_MAPERR 0000000000c1
#0 0x78e5099753f2 base::debug::CollectStackTrace()
#1 0x78e50995236a base::debug::StackTrace::StackTrace()
#2 0x78e509974d81 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x78e4f1a42520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x4251f)
#4 0x5ebe30908e14 Profile::IsOffTheRecord()
#5 0x5ebe33960d90 StartupBrowserCreatorImpl::DetermineURLsAndLaunch()
#6 0x5ebe339608a7 StartupBrowserCreatorImpl::Launch()
#7 0x5ebe30029ec0 base::OnceCallback<>::Run()
#8 0x5ebe30f8110d base::internal::Invoker<>::RunOnce()
#9 0x78e5097f6820 base::OnceCallback<>::Run()
#10 0x78e5098aa2dd base::TaskAnnotator::RunTaskImpl()
#11 0x78e5098e6a1f base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#12 0x78e5098e5e94 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#13 0x78e5098e7465 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#14 0x78e5099996d9 base::MessagePumpGlib::Run()
#15 0x78e5098e7daf base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#16 0x78e50987a1ab base::RunLoop::Run()
#17 0x78e501753977 content::BrowserMainLoop::RunMainMessageLoop()
#18 0x78e501756015 content::BrowserMainRunnerImpl::Run()
#19 0x78e50174f846 content::BrowserMain()
#20 0x78e50279e0db content::RunBrowserProcessMain()
#21 0x78e5027a0b08 content::ContentMainRunnerImpl::RunBrowser()
#22 0x78e5027a022c content::ContentMainRunnerImpl::Run()
#23 0x78e50279ca87 content::RunContentProcess()
#24 0x78e50279ccd2 content::ContentMain()
#25 0x5ebe3001b4e0 ChromeMain
#26 0x78e4f1a29d90 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#27 0x78e4f1a29e40 __libc_start_main
#28 0x5ebe3001b10a _start
  r8: 0000000000000000  r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000
 r12: 0000000000000001 r13: 00007fff7a1115e0 r14: 0000000000000011 r15: fffffffc00000000
  di: 0000000000000011  si: 00007fff7a111578  bp: 00007fff7a1115d0  bx: 00007fff7a111560
  dx: 0000000000000000  ax: 0000000000000000  cx: 000078e509b80000  sp: 00007fff7a1115d0
  ip: 00005ebe30908e14 efl: 0000000000010287 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 00000000000000c1
[end of stack trace]
null
null

@MasterK0927
Copy link
Collaborator Author

As far as I had researched about the Problem we were facing and the startup process of Brave, we need to maintain the lifecycle of components in parallel with the main messageloop that handles the lifecycle for the brave startup process.

@MasterK0927
Copy link
Collaborator Author

MasterK0927 commented Jan 9, 2025

As far as I had researched about the Problem we were facing and the startup process of Brave, we need to maintain the lifecycle of components in parallel with the main messageloop that handles the lifecycle for the brave startup process.

Eventually I was thinking in the correct direction, this has solved the issue, I will create an internal documentation for this approach.

@MasterK0927 MasterK0927 marked this pull request as ready for review January 9, 2025 14:23
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.

Login feature
1 participant