Closed Bug 1523179 Opened 5 years ago Closed 4 years ago

Support Chrome Beta import on Windows

Categories

(Firefox :: Migration, enhancement, P3)

54 Branch
Unspecified
Windows
enhancement

Tracking

()

VERIFIED FIXED
Firefox 74
Tracking Status
firefox74 --- verified

People

(Reporter: FredMcD, Assigned: MattN)

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0

Steps to reproduce:

https://support.mozilla.org/en-US/questions/1247876#answer-1191690
Trouble migrating from Chrome to Firefox

Actual results:

A user reports unable to import data from Chrome browser.

Expected results:

https://support.mozilla.org/en-US/questions/1247876#answer-1191622
User statement;
Problem resolved.
Turns out Chrome beta isn't supported, had to install the original Chrome and then it recognized it.

Component: Untriaged → Migration

Thanks. If someone on Chrome Beta can provide their OS and the path to their profile folder then this can be an easy fix. We currently only handle Chrome Beta on Linux:
https://dxr.mozilla.org/mozilla-central/rev/c2593a3058afdfeaac5c990e18794ee8257afe99/browser/components/migration/ChromeProfileMigrator.js#479,481,491

Flags: needinfo?(FredMcD)
Flags: needinfo?(FredMcD)

On windows 10, chrome://version says

Profile Path C:\Users\sfoster\AppData\Local\Google\Chrome Beta\User Data\Default

Looks we need to include Windows in the supported platforms: https://dxr.mozilla.org/mozilla-central/rev/c2593a3058afdfeaac5c990e18794ee8257afe99/browser/components/migration/ChromeProfileMigrator.js#479,481,491

Please install Chrome Beta on Windows to test.

Mentor: MattN+bmo
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: good-first-bug
OS: Unspecified → Windows
Priority: -- → P3
Whiteboard: [lang=js]

Hi Matthew I would like to work on it, can you help me how to solve it, I build the firefox on my laptop already.

Thanks

Flags: needinfo?(MattN+bmo)

Hello, make sure you're running Windows, install Chrome Beta, and then adjust at the code from comment 5. If you're succesful, run Firefox with --migration and make sure you see Chrome Beta as an option on the first page of the wizard.

Flags: needinfo?(MattN+bmo)

Hi, I would like to take this forward.
Can this be assigned to me..???

Assignee: nobody → shivams2799
Status: NEW → ASSIGNED
Assignee: shivams2799 → nobody
Status: ASSIGNED → NEW

Hi, there has been no activity on this bug for a couple of months.

Please can this be assigned to me?

You can work on it… when you submit your review request on Phabricator then I'll assign it to you.

I have Chrome Beta installed. I've made changes to the following files (patch attached). I am still not able to see Chrome Beta as an option in the first page of the wizard even after a complete rebuild.

I modified the code and was able to hide Chrome or Edge as an available option though.

Did I miss any thing? Any idea where the code to detect available browsers are?

Flags: needinfo?(MattN+bmo)

I haven't tested the patch but since you're touching components.conf, make sure you are using a non-artifact build (see ./mach bootstrap for more info)

Flags: needinfo?(MattN+bmo)
Assignee: nobody → prem.kumar.krishnan
Status: NEW → ASSIGNED
Attachment #9070392 - Flags: feedback?(MattN+bmo)

(In reply to Matthew N. [:MattN] (PM me if requests are blocking you) from comment #12)

I haven't tested the patch but since you're touching components.conf, make sure you are using a non-artifact build (see ./mach bootstrap for more info)

Yes. It was a non-artifact build.

Flags: needinfo?(MattN+bmo)
Comment on attachment 9070392 [details] [diff] [review]
Patch to enable Chrome-Beta import in Windows

Sorry, I've been quite busy the last week… maybe Sam will have a chance to look at this.

Do you see any errors in the Browser Console when you test migration from within Firefox?
Flags: needinfo?(MattN+bmo)
Attachment #9070392 - Flags: feedback?(sfoster)

Apologies for the delay, I've had to re-setup my windows box. Testing and reviewing this is next up on my list.

Comment on attachment 9070392 [details] [diff] [review]
Patch to enable Chrome-Beta import in Windows

I've built (non-artifact) with this patch and still not seeing the Chrome beta option in the import dialog on Windows. And there is a an exception in the console from MigrationUtils.jsm which also suggests that the component registration isn't working out:

```
[Exception... "ComponentManager::CreateInstance returned failure code:"  nsresult: "0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)"  location: "JS frame :: resource:///modules/MigrationUtils.jsm :: MU_getMigrator :: line 718"  data: no] MigrationUtils.jsm:718:29
    MU_getMigrator resource:///modules/MigrationUtils.jsm:718
    onImportSourcePageShow chrome://browser/content/migration/migration.js:117
    init chrome://browser/content/migration/migration.js:67
    onload chrome://browser/content/migration/migration.xul:1
    MU_showMigrationWizard resource:///modules/MigrationUtils.jsm:892
    PO_importFromBrowser chrome://browser/content/places/places.js:409
    oncommand chrome://browser/content/places/places.xul:1
```
I wondered if it was the extra spaces in 'constructor': '  ChromeBetaMigrator' but apparently not. I'll leave myself need-info'd to look into this further.
Flags: needinfo?(sfoster)
Flags: needinfo?(sfoster)
Attachment #9070392 - Flags: feedback?(sfoster)
Flags: needinfo?(sfoster)

(In reply to Sam Foster [:sfoster] (he/him) from comment #16)

I wondered if it was the extra spaces in 'constructor': '
ChromeBetaMigrator' but apparently not. I'll leave myself need-info'd to
look into this further.

I'm now not sure if my confirmation of this was any good. Have you tried removing these 2 spaces in the constructor value to see if that solves the problem?

Flags: needinfo?(sfoster) → needinfo?(prem.kumar.krishnan)
Comment on attachment 9070392 [details] [diff] [review]
Patch to enable Chrome-Beta import in Windows

Review of attachment 9070392 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/migration/ChromeProfileMigrator.jsm
@@ +474,5 @@
> + * Chrome Beta - Windows and Linux
> + */
> +
> +if (AppConstants.platform != "macosx") {
> +  function ChromeBetaMigrator() {

I think the issue is just that this function needs to be defined at the top-level of the file, not inside the `if`. Can you put the `if` only around the `EXPORTED_SYMBOLS.push()` line and try again?
Attachment #9070392 - Flags: feedback?(MattN+bmo) → feedback+

The other patch on this bug can build on top of mine or vice-versa.

Attachment #9120087 - Flags: data-review?(tdsmith)
Assignee: prem.kumar.krishnan → MattN+bmo
Mentor: MattN+bmo
Type: defect → enhancement
Summary: Chrome import works, Chrome beta import does not work → Support Chrome Beta import on Windows
Comment on attachment 9120087 [details]
Data Collection Renewal

Renewal review:

1) Is the provided Data Collection Review complete, correct, and data-review+ by a Data Steward?

Yes, legacy-style! It's a category 2, opt-out, all-channel collection.

2) Is the data collection covered by the existing Firefox Privacy Notice?

Yes.
Attachment #9120087 - Flags: data-review?(tdsmith) → data-review+

Depends on D58202

Attachment #9070392 - Attachment is obsolete: true
Flags: needinfo?(prem.kumar.krishnan)
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/autoland/rev/b329e8beb91f
Fix Linux Chrome Beta and Chrome Dev migrator support and telemetry. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/e6cf7f793500
Support Chrome Beta import on Windows. r=MattN
  • I manually tested that Chrome Beta and Dev now work properly on Linux.
  • I also tested Chrome Beta works on Windows
Flags: qe-verify+
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74

I could verify the import of passwords, history and bookmarks, and I could not observe any data that was not imported properly, BUT I do not know how to properly check whether the cookies were properly imported. Can you tell me how?

Tests were done on Windows 10 with Chrome Canary and Nightly v74.0a1 from 2020-01-31.

Flags: needinfo?(MattN+bmo)

(In reply to Bodea Daniel [:danibodea] from comment #27)

I could verify the import of passwords, history and bookmarks, and I could not observe any data that was not imported properly, BUT I do not know how to properly check whether the cookies were properly imported. Can you tell me how?

You would have to use the Storage tab in the Web Developer Tools while visiting a site that had cookies in Chrome. Choose Cookies in the sidebar. You would want to inspect the Cookies in the Chrome Developer Tools before import. Note that we don't import encrypted/secure cookies though.

Flags: needinfo?(MattN+bmo)

With the help provided in the previous comment, I can confirm that SOME cookies are being imported, but few of them. I have attempted to understand exactly which should properly be imported (those that aren't encrypted or secure). I can't determine which ones should be imported and aren't.

This being said, I will assume this issue was fixed correctly. Thank you!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: