Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdVault export problem #2503

Open
2 of 3 tasks
TirOFlanc opened this issue Jan 12, 2024 · 21 comments
Open
2 of 3 tasks

AdVault export problem #2503

TirOFlanc opened this issue Jan 12, 2024 · 21 comments

Comments

@TirOFlanc
Copy link

TirOFlanc commented Jan 12, 2024

I tried to reproduce the issue when...

  • AdNauseam is the only extension
  • AdNauseam uses default lists and settings
  • Using a new, unmodified browser profile

Description

When I click on the "Export" button in the "AdVault" window, nothing happens.

I would like to know if there is a way to export the AdVault manually?

URL(s) where the issue occurs.

No response

Screenshot(s)

No response

Steps to Reproduce

No response

Configuration

I'm running AdNauseam version 3.18.0, Brave 1.47.186, Windows 7 x64.

@dhowe
Copy link
Owner

dhowe commented Jan 13, 2024

There is no dialog/confirm after the ads are exported -- my guess (pls confirm) is that you have many json files in your downloads folder now...

@mneunomne
Copy link
Collaborator

I tested it using Brave and Adnauseam v3.18.0 as you mentioned. Could not reproduce the issue. Some possible issues might be occuring:

  • too many ads are being selected? (need to test)
  • Windows OS specific problem

@TirOFlanc
Copy link
Author

There is no dialog/confirm after the ads are exported -- my guess (pls confirm) is that you have many json files in your downloads folder now...

I really liked this explanation. I was already imagining the mind-boggling number of json files as I desperately clicked on "Export", but unfortunately there were no files anywhere.


I tested it using Brave and Adnauseam v3.18.0 as you mentioned. Could not reproduce the issue. Some possible issues might be occuring:

  • too many ads are being selected? (need to test)
  • Windows OS specific problem

I do have a lot of ads, but I've tested the export by setting the selection to an empty ad period and it doesn't work any more.

image


Thank you for taking the time to think about this.
If you ever know of another way to retrieve this json, I plan to abandon Windows 7 very soon to go to Windows 11, but I'd like not to leave empty-handed.

image

@mneunomne
Copy link
Collaborator

@TirOFlanc is there any errors in the console?

All the ads will be exported regardless of the selected area actually, so maybe thats indeed the problem. 33k ads its indeed a lot.

@TirOFlanc
Copy link
Author

TirOFlanc commented Jan 15, 2024

Nothing at all in the console when I click on "Export".

When I click on "Delete dead ads" I get this:
image

@TirOFlanc
Copy link
Author

This is when I click on "Export" (I don't know if there's an answer there).

image

@mneunomne
Copy link
Collaborator

Can you try the following:

Paste this on the console of the vault, see what happens:

vAPI.messaging.send('dashboard', {
  what: 'backupUserData',
}).then((data) => {
  console.log("done", data)  
}).catch((err) => {
  console.error("error", err)  
});

@TirOFlanc
Copy link
Author

I'm not sure I know how to read and understand what that means, but I have a feeling it's reaching the timeout?

image

I'll try your code and report back to you, thanks.

@TirOFlanc
Copy link
Author

Here's the result (right-click "Save As")

dkoaabhijcomjinndlgbmfnmnjnmdeeb-1705329448117.log

@mneunomne
Copy link
Collaborator

Then try this, see if you can download the file, it seems that the data was indeed being shown there in the console:

vAPI.messaging.send('dashboard', {
        what: 'backupUserData',
    }).then((data) => {
    console.log("done", data)

    var jsonData = JSON.stringify(data.userData, null, '  ')
    let filename = "adnauseam-download-test";
    const url = URL.createObjectURL(new Blob([jsonData], { type: "text/plain" }));

    vAPI.download({
      'url': url,
      'filename': filename
    });
}).catch((err) => {
  console.error("error", err)  
});

@TirOFlanc
Copy link
Author

TirOFlanc commented Jan 15, 2024

Yes, this time I get the registration window.

image

Does this file correspond to my ad collection that I'll be able to import into my new installation? (Or is it just an intermediate result for the moment?).

@mneunomne
Copy link
Collaborator

Ah good! yes. But I just named it wrongly. change it to:

AdNauseam_AdsNauseam_15.10.202416.16.16.json

Check if the file contains a json file with the list of ads. Maybe you can try to test it in another browser profile, or different browser, to see if the import will work or not.

@TirOFlanc
Copy link
Author

Ok well, I'll test the import before overwriting everything just to be sure.

If there's a problem, I'll get back to you. Otherwise, consider the problem solved.

Were you able to figure out what was blocking the export?

@mneunomne
Copy link
Collaborator

No, but need to check what is happening. If you don't mind sharing your exported ads file so I could potentially reproduce this, but I understand if you don't want to for privacy reasons. Send me to alberto.harres at gmail.com if you have no problem with that.

@TirOFlanc
Copy link
Author

I haven't tested the import yet, but if you compare it with an old backup, you'll see that it also exports the extension settings.

image

@TirOFlanc
Copy link
Author

What should I change in the code above to export only the ads?

@TirOFlanc
Copy link
Author

TirOFlanc commented Feb 4, 2024

Hi, there,

It's me again. I wanted to redo a backup today as previously stated but I couldn't.

Other problems occurred. Here are some screenshots showing them:

advault1
advault2
advault3

The ads no longer display at all and the code you gave me no longer gives any results.
I'll email you the file I created last time.
Thank you.

@TirOFlanc
Copy link
Author

Hi there,

Yesterday I imported my Brave profile (%AppData%\local\BraveSoftware...) into a freshly downloaded Brave portable (v1.47.186) (latest version supporting Windows 7), on a Windows 7 laptop too, with AdNauseam v3.18 then v3.20.

I encountered the same problem, namely that the ads don't display in the Vault as seen in the message just above.

I tried again, this time importing the file you'd managed to get me to generate via your JS code (which I emailed you), same problem.

I tried with an old backup of my AdVault that I had saved from October 10, 2023 and the export works without a hitch.

image

Thank you.

@mneunomne
Copy link
Collaborator

hello @TirOFlanc, I'm trying to fix the data that you have sent me by email, I'll ket you know when I manage to fix it. It seems that there was some issue with the control characters that is not making possible to re-import. I'm trying to clean the file so you can re-import once again.

@mneunomne
Copy link
Collaborator

@TirOFlanc I managed to fix the exported JSON file. I will send you back the corrected file by email right away.

@TirOFlanc
Copy link
Author

Hi there,

Thanks for the reply.

I tried importing into a new brave installation but it didn't work.

Capture1
Capture2

Would it be possible to ensure that, when the AdVault is exported, unauthorized characters (those not in a predefined list, for example) are simply deleted to avoid any problems of this kind?

Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants