Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Can't import passwords from chrome or edge to firefox. Help?

  • 7 trả lời
  • 1 gặp vấn đề này
  • 240 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

Tried every solution but import works only for bookmarks, cookies, history and not the passwords. When i try to import, it says successful but nothing happens. Tested in both the browsers in their closed state. Earlier also i faced the same problem (i think a year back) which forced me to reject firefox. Please help if u know any solution. Thanks in advance.

Đính kèm ảnh chụp màn hình

Giải pháp được chọn

I hadn't tested it recently, but is looks that there needs to be a origin key value pair in Firefox 73 (haven't tested when this got changed).

This works for me as a test:

Here is updated code that adds the origin key when not found that works for me with an older logins.json.

var logins;
if (logins = prompt("Logins JSON: [{},{}]","?")){
try {
logins = JSON.parse(logins);
for(i=o;lg=logins[i];i++){
if(!lg.origin){lg.origin=lg.hostname}
}
try { /*[60+]*/
 ChromeUtils.import("resource://gre/modules/LoginHelper.jsm");
 LoginHelper.maybeImportLogins(logins);
} catch(e) { /*[42-59]*/
 Cu.import("resource://gre/modules/LoginHelper.jsm");
 for (i in logins) LoginHelper.maybeImportLogin(logins[i]);
}
} catch(e){ console.log(e); }
}
Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (7)

more options

You can possibly try these steps:

You need to have the JSON in this key:value format as a [{},{}] array: [{"username":"x","password":"x","hostname":"https://"}]


EDIT: see the JavaScript further down for updated code.

Code for the command line in the Browser Console to import logins in JSON format: You need to enable the command line.

(code deleted)

Được chỉnh sửa bởi cor-el vào

more options

Hello Yashveer Dabas,

You may already have tried this, but just in case the above doesn't do the trick :

When you go to the 3-bar menu => Logins and Passwords (or type in the address bar about:logins and press Enter), don't click on "Sign in to Sync", but click on the three little dots next to that button instead. There you will see "Import Passwords" .....

more options

cor-el said

You can possibly try these steps: You need to have the JSON in this key:value format as a [{},{}] array: [{"username":"x","password":"x","hostname":"https://"}]

Code for the command line in the Browser Console to import logins in JSON format: You need to enable the command line.

if (logins = prompt("Logins JSON: [{},{}]","?")){
try {
logins = JSON.parse(logins);
try { /*[60+]*/
 ChromeUtils.import("resource://gre/modules/LoginHelper.jsm");
 LoginHelper.maybeImportLogins(logins);
} catch(e) { /*[42-59]*/
 Cu.import("resource://gre/modules/LoginHelper.jsm");
 for (i in newSG) LoginHelper.maybeImportLogin(logins[i]);
}
} catch(e){ console.log(e); }
}

thanks i'll try and update... btw what's causing the issue? thanks

Được chỉnh sửa bởi Yashveer Dabas vào

more options

McCoy said

Hello Yashveer Dabas, You may already have tried this, but just in case the above doesn't do the trick : When you go to the 3-bar menu => Logins and Passwords (or type in the address bar about:logins and press Enter), don't click on "Sign in to Sync", but click on the three little dots next to that button instead. There you will see "Import Passwords" .....

thanks but still it doesn't work....

more options

Quote: btw what's causing the issue?

What issue are you talking about ?

The attached screenshot doesn't seem to be working, so maybe give it another try.

more options

cor-el said

Quote: btw what's causing the issue? What issue are you talking about ? The attached screenshot doesn't seem to be working, so maybe give it another try.

man this stuff is high level for someone who's a doctor..

btw i was able to enable browser console and ran that code which prompted a dialogue labelled Logins JSON: [{},{}] asking something . Screenshot attached.

didn't know what to do pressed ok , nothing happened.

more options

Giải pháp được chọn

I hadn't tested it recently, but is looks that there needs to be a origin key value pair in Firefox 73 (haven't tested when this got changed).

This works for me as a test:

Here is updated code that adds the origin key when not found that works for me with an older logins.json.

var logins;
if (logins = prompt("Logins JSON: [{},{}]","?")){
try {
logins = JSON.parse(logins);
for(i=o;lg=logins[i];i++){
if(!lg.origin){lg.origin=lg.hostname}
}
try { /*[60+]*/
 ChromeUtils.import("resource://gre/modules/LoginHelper.jsm");
 LoginHelper.maybeImportLogins(logins);
} catch(e) { /*[42-59]*/
 Cu.import("resource://gre/modules/LoginHelper.jsm");
 for (i in logins) LoginHelper.maybeImportLogin(logins[i]);
}
} catch(e){ console.log(e); }
}

Được chỉnh sửa bởi cor-el vào