Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Google blocks login from nativefier app, unless setting userAgent to non-Chrome browser #831

@thehunmonkgroup

Description

@thehunmonkgroup

EDIT from maintainer @ronjouch see comments below, the workaround as of March 2020 is to lie about the userAgent, for example passing --user-agent "Mozilla/5.0 (Windows NT 10.0; rv:74.0) Gecko/20100101 Firefox/74.0" . It would be cool to do that automatically on opening / navigating to an accounts.google.com page, PR welcome.


Description

I've created a nativefier app for https://contacts.google.com, and it installs just fine, but Google seems to be blocking the initial login with this message:

You're using a browser that Google doesn't recognize or that's set up in a way we don't support.
To keep your Google Account secure, sign in on another browser or change your browser's settings.

My older nativefier apps pointed to Google services are still loading OK, I'm guessing because the login is already saved and Google isn't blocking things at that stage.

I'll note that I also tried another desktop app generator (https://github.com/quanglam2807/webcatalog), and the same issue is occurring, so perhaps there's some deeper fix needed at the Electron level or something?

Steps to reproduce issue

  1. Create the app with the command below
  2. Try to log into Google
  3. Get the message listed above

Details

  • Are you nativefying a public website? Yes
  • Feature request? Have you looked at nativefier --help to see if an existing option could fit your needs? Yes
  • Full nativefier command used to build your app: nativefier --electron-version 6.0.2 --name "Google Contacts" --icon "/home/hunmonk/Pictures/icons/google-contacts.png" --internal-urls "contacts.google.*?" --single-instance "https://contacts.google.com"
  • Version of Nativefier (run nativefier --version): v7.6.12
  • Version of node.js (run node --version): v10.15.2
  • OS: Ubuntu 19.04
  • Error message / stack trace (if any): None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions