WaldiPL / webpageScanner

Extension for Firefox
GNU General Public License v2.0
27 stars 3 forks source link

No more button "afficher les pages modifiées" #43

Closed rebuto closed 4 years ago

rebuto commented 4 years ago

I hear the sound that means pages have been scanned but the button to access them has disappeared.

When I do scan now, pages I want to scan become blue in the list but when I click on them, I get a white page.

Could you help me please. This add-on is very useful for me.

WaldiPL commented 4 years ago
  1. Create a backup copy of the database.
  2. Open a scanned page.
  3. Open console (ctrl + shift + k)
  4. Copy visible messages and errors (or take a screenshot) and paste here.
rebuto commented 4 years ago

Thanks for your time WaldiPL Unfortunately the backup button doesn't work :(

Here is the message : image

Here is the line in cause I presume : image

WaldiPL commented 4 years ago

Only this one message was in the console? Open "Options", open the console and take a screenshot.

rebuto commented 4 years ago

After clicking here : image This message appear : image When I click on "debugger eval code:1:53" come on this : image does this mean the problem happens at th 41st character ? the e variable ? I can't find the option button I've got a Firefox french version.

WaldiPL commented 4 years ago

I meant "extension options". Available by clicking the gear icon in the sidebar.

Are you using version 1.9.5? The problem appeared after the update? Have you used a debugger or console before the error occurred?

rebuto commented 4 years ago

I'm using 1.9.5 : image

Here are my parameters : image image Does this answer what you asked ?

I didn't used a debugger or console before the error occurred

WaldiPL commented 4 years ago

I don't know if I understand your problem correctly.

I hear the sound that means pages have been scanned but the button to access them has disappeared.

If you mean this button, it is not visible if the pages are opened automatically ("Ouvrir automatiquement").

When I do scan now, pages I want to scan become blue in the list but when I click on them, I get a white page. When you open a page, only the scanner interface is visible? As below. Does changing the page view change anything?

Unfortunately the backup button doesn't work :(

  1. Open options ("Gestion")
  2. Open the console and clear it
  3. Try to create a backup.
  4. Take a console screenshot.

rebuto commented 4 years ago

I've unchecked the box "Ouvri automatiquement and made another scan and got this : image

When I try to get a backup, I've got the same message in the console : image

WaldiPL commented 4 years ago

Could you open the debugger and take a screenshot.

rebuto commented 4 years ago

yep image

WaldiPL commented 4 years ago
  1. Copy the script from the debugger and run it in the console. (is something new?)
  2. Close the tab in the debugger.
  3. Click the selected icon.

Check if something has changed. Try disabling other extensions.

rebuto commented 4 years ago

1 : image

no differences I disabled my other extensions and restarted firefox and tryed again. But still the same problem :( Thanks again for your help

WaldiPL commented 4 years ago

What browser version are you using?

rebuto commented 4 years ago

72.0.2 image

WaldiPL commented 4 years ago
  1. Open about:config
  2. Search for "devtools.debugger"
  3. Restore defaults for each option changed. (changed options are in bold)

rebuto commented 4 years ago

done. I still get this error but I don't know how to get logs : image

Last message for me for today. It's time to go to bed ;) I'll answer you as I wake up. Thanks again !

WaldiPL commented 4 years ago

Try to create a backup by pasting this script into the console.

  browser.storage.local.get().then(result => {
    let a = document.createElement("a");
    document.body.appendChild(a);
    let json = JSON.stringify(result),
      blob = new Blob([json], {
        type: "octet/stream"
      }),
      url = window.URL.createObjectURL(blob),
      d = new Date(),
      date = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`;
    a.href = url;
    a.download = `Web Pages Scanner - ${date}.json`;
    a.style.display = "none";
    a.click();
    window.URL.revokeObjectURL(url);
  });
rebuto commented 4 years ago

image

WaldiPL commented 4 years ago

Run the following code in the console (each line separately) await browser.storage.local.get("sites"); await browser.storage.local.get("settings"); await browser.storage.local.get("changes"); await browser.storage.local.get("sort");

Try to install the older version of the extension. Web Pages Scanner 1.9.4

rebuto commented 4 years ago

image

After installing 1.9.4 I get the number on the icon : image but I can't open modified pages and I still get error when I try to backup.

WaldiPL commented 4 years ago

Is the error displayed after the execution of the script await browser.storage.local.get("changes"); is the same as before?

Can you delete a page, or add a new one?

rebuto commented 4 years ago

Yes, it's the same error. When I add a page, I get this window image But the page doesn't appear in the list. I can't delete a page.

WaldiPL commented 4 years ago

Go to about:devtools-toolbox?type=extension&id=webpageScanner%40waldemar.b Select the "Storage" tab and then "Extension Storage" There should be four keys in the table: changes, settings, sites, sort. Is the key "changes" is visible? Open the browser console (ctrl+shift+J) and take a screenshot.

Do you have any backups?

rebuto commented 4 years ago

There is nothing in the storage tab :+1: image

WaldiPL commented 4 years ago
  1. Open the "storage" tab (as above)
  2. Open the browser console (ctrl+shift+J) and take a screenshot.
rebuto commented 4 years ago

hop : image

WaldiPL commented 4 years ago

Have you used other versions of Firefox? Have you edited any files in a folder C:\Users\[user_name]\AppData\Roaming\Mozilla\Firefox\Profiles\[profile_name]\storage\default

rebuto commented 4 years ago

Other versions yes. I upgrade as soon as there is a new version I haven't edited any file in the default folder.

WaldiPL commented 4 years ago

I think one of a files containing a database is broken. These files are created by Firefox, and the extension does not impact this. Damaged is a part containing html code of scanned pages. Recovery of this data may be impossible.

If you paste the code below into the console (on the "Web Pages Scanner" option page) you will create a backup containing the list of pages (everything that is visible in the sidebar (pages and their settings).

    browser.storage.local.get(["sites","sort","settings"]).then(result=>{
        let a=document.createElement("a");
        document.body.appendChild(a);
        result.changes=[];
        for(let i=0;i<result.sites.length;i++){
            result.changes.push({"oldHtml":"","html":""});
        }
        let json=JSON.stringify(result),
            blob=new Blob([json],{type:"octet/stream"}),
            url=window.URL.createObjectURL(blob),
            d=new Date(),
            date=`${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`;
        a.href=url;
        a.download=`Web Pages Scanner - ${date}.json`;
        a.style.display="none";
        a.click();
        window.URL.revokeObjectURL(url);
    });

To remove the old database, you must uninstall and then reinstall the extension. Then you can restore the pages from the backup.

The backup created using the above script does not contain the content of the pages. So you need to scan all the pages again.

rebuto commented 4 years ago

I've reinstalled and restored the backup. It seems OK. Thank you WaldiPL !