Can't Log Into YouTube

Description of the issue:

YouTube log-in fails with this error message:

"Couldn’t sign you in
This browser or app may not be secure. [Learn more]

Try using a different browser. If you’re already using a supported browser, you can try again to sign in."

How can this issue be reproduced?

  1. Go to YouTube home page.
  2. Click on “Sign In” button.
  3. Enter Gmail email address.
  4. Click “Next”.

Expected result:

Website prompts for account password.

Brave Version( check About Brave):

1.40.107 Chromium: 103.0.5060.53 (Official Build)

Additional Information:

Worked flawlessly until I changed my email password, which made the persistent cookies stale and prompted me to log in again. Works fine on three other browsers.

@br90

Ref.

Latest Brave Browser version 1.41.99 (Chromium: 103.0.5060.134) (July 20, 2022):

https://github.com/brave/brave-browser/releases/tag/v1.41.99

Note/Reminder: Google’s One Google Account, means that you are Signed In for all:

One_Google_Account_for_Everything

In a Brave Browser > New Window, go to: brave://settings/clearBrowserData

For tab Basic:

  • Set: Time range:All time
  • Enable: Browsing history
  • Disable/Enable: Cookies and other site data (Enable - Signs you out of most sites)
  • Enable: Cached images and files

Click on the ‘Clear data’ button.

(The ‘Clear data’ button also saves the selections.)

Recommended GLOBAL SHIELDS settings:

In a Brave Browser > New Window, go to: brave://settings/shields

  • Disable: Auto-redirect AMP pages (AMP - Google’s Accelerated Mobile Page)
  • Disable: Prevent sites from fingerprinting me based on my language preferences
  • Trackers & ads blocking: Aggressive
  • Enable: Upgrade connections to HTTPS (HTTPS EVERYWHERE toggle switch)
  • Enable: Block scripts
  • Block fingerprinting (aka Fingerprinting blocking): Strict, may break sites
  • Block cookies (aka Cookie blocking): Only cross-site

Next, go to: brave://flags

  • Disable: Enable De-AMP - requires Relaunching Brave Browser

In a Brave Browser > New Window, go to: brave://settings/security

IF you did not Enable: HTTPS EVERYWHERE in the GLOBAL SHIELDS settings, above, then you may want to . . .

  • Enable: Always use secure connections (HTTPS ONLY toggle switch)

Recommended:

  • Disable: Use secure DNS

In a Brave Browser > New Window, go to: brave://settings/cookies

  • Enable: Block third-party cookies
  • Disable: Clear cookies and site data when you close all windows

Locate on that settings page: Sites that can always use cookies

Click the Add button

Enter accounts.google.com:443 as the site . . . but Do Not Enable

  • Current Private session only
  • Including third-party cookies on this site

Click the Add button

Repeat those steps for:

  • [*.]google.com:443
  • https://[*.]firebaseapp.com:443
  • https://[*.]google.com:443
  • docs.google.com:443
  • www.google.com:443
  • www.youtube.com:443
  • youtube.com:443

Next, go to: brave://settings/content/javascript

Scroll down that javascript settings page to Allowed to use javascript

Click the Add button

Enter accounts.google.com:443 as the site . . . but Do Not Enable:

  • Current Private session only

Click the Add button

Repeat those steps for:

  • [*.]google.com:443
  • accounts.youtube.com:443
  • apps.google.com:443
  • docs.google.com:443
  • meet.google.com:443
  • play.google.com:443
  • workspace.google.com:443
  • www.google.com:443
  • www.gstatic.com:443
  • www.youtube.com:443

Recommended in order to reduce influence by websites:

In a Brave Browser - New Window, go to: brave://settings/content

Scroll down to Additional permissions . . . and set:

  • Protocol handlers: Don't allow sites to handle protocols
  • File editing: Don't allow sites to edit files or folders on your device
  • Clipboard: Don't allow sites to see text or images on your clipboard
  • Window placement: Don't allow sites use info about your screens to open and place windows

Scroll down to Content . . . and set:

  • Pop-ups and redirects: Don't allow sites to send pop-ups or use redirects

In a Brave Browser > New [Private if you wish] Window, go to: ‘https:www.youtube.com’

Using the site-specific Shields (Lion icon) panel, set:

  • Shields: UP for this site
  • Trackers & ads blocked (Aggressive)
  • Cross-site cookies blocked
  • Fingerprinting blocked (Strict)

Try to Log In to YouTube. If not successful, then return to the site-specific Shields (Lion icon) panel, and set:

  • Trackers & ads blocked: Standard

Thanks for the write-up. I followed those steps but still get redirected to the error page. I’ve tried nuking the profile and the entire Brave directory and starting over, but still can’t log in. What steps can I take to troubleshoot further?

Can you login into google.com? Ensure you’re not blocking cookies in shields

I cannot. Even with shields down I cannot log into accounts.google.com. I get redirected to the error page after entering my email address.

Private window mode? Failing that, a new Brave profile

Tried using a new private window, and tried creating a new profile from the profile manager. Both results are the same.

@br90

Clearing DNS cache

Option A

In a Brave Browser > New Window, go to brave://net-internals/#dns and click on ‘Clear host cache’

Next, go to: brave://net-internals/#sockets and click on both of the following (in succession):

  • Close idle sockets
  • Flush socket pools

Exit / Quit Brave Browser

Exit / Quit everything else and Restart your computer.

Try the Log In at YouTube.

Option B

How to flush DNS cache in Windows OS: ‘https://www.wikihow.com/Flush-DNS

How to flush DNS cache in Mac OS: In a Terminal.app window, enter at the prompt:

  • dscacheutil -flushcache

Notes re what are:

DNS cache:

Socket pool:

‘With pooling, instead of closing a connection after it is used, we can keep it idle while it waits to handle another request. This saves the resources required to create a new connection.’

Exit / Quit everything. Wait a moment. Start up Brave Browser. Use only 1 Brave Browser window. No extra tabs nor background activity.

Go to the YouTube Log In window: ‘https://accounts.google.com/ServiceLogin

Leaving that Brave Browser window, open, as it is . . .

Restart your computer.

When the computer is ready, start up Brave Browser. Go to the Log In window and try again.

If that does not work, read:

https://support.google.com/mail/thread/25692724?hl=en

Flushed DNS cache using Option A but no dice. Looked at the replies in the google thread and already directly or indirectly tried everything except creating a new google account and linking the old one to it. But since I can log into YouTube using other browsers, that can’t be the problem. Everything else from disabling User Agent Spoofer (removed it) and the rest were already tried, including reinstalling Brave. There’s got to be a way to fix this.

Any other suggestions for debugging this error? Why does google treat Brave like it’s not secure but Chromium works fine?

Seems like messing with the command line flags fixed it. Can’t imagine how google is able to determine which flags are used, but far be it from me to underestimate their spying prowess.

Closing thread.