Where can I see the log when adding json-prune? · uBlockOrigin/uBlock-issues · Discussion #3096 (original) (raw)

uBlock Origin 1.55.1b21

Where can I see the log when adding json-prune?

Example: 3dnews.ru##+js(json-prune)

You must be logged in to vote

I will restore the ability in next dev build, I removed it and forgot to put it back with the new way.

View full answer

You must be logged in to vote

12 replies

@gorhill

I will restore the ability in next dev build, I removed it and forgot to put it back with the new way.

@gorhill

The JSON output can be often large, and the logger might not be optimal when trying to analyze these. I was trying to figure how I could make this easier but then I realized there is already a way to make this easier:

Now you can freely go through all output, select, copy/paste, etc.

@MasterKia

the logger might not be optimal when trying to analyze these but then I realized there is already a way to make this easier:

The console is still way better, I can't wrap my head around reading and analyzing these logs in the logger.
I might consider using an older uBO version just for having logs in the console.

@Yuki2718

I think leaving from console is good, as we no more need to care about anti-devtools at least for this. It's just the current logger is not ideal.

@Yuki2718

How about making the logger to have two tabs, the one is the old logger and the other is for these?

Slightly off-topic, don't feel like opening another discussion for something minor.

@gorhill this is supposed to be 'setScriptletLogLevelToOne', no? To match the receiver? Not sure what it breaks though.

You must be logged in to vote

1 reply

@gorhill

Thanks for spotting this, a typo indeed. This prevented from turning off verbose mode in the logger.

@gorhill Sorry, do you know how to see the logs of setTimeout and setInterval in dev build?

You must be logged in to vote

17 replies

@gorhill

In fx & latest dev

You mean you compared latest Firefox dev build with stable Firefox built?

@gorhill

Ok I see a difference between Firefox stable and dev build. I will investigate when I can.

@ghajini

@gorhill

recent ubo dev is breaking

We shouldn't say "breaking" just because the behavior is different. The site appears to be trapping calls to console.log, and since the new dev build doesn't use console.log for the involved scriptlets, it's possible this is what is causing the different behavior.

image

@ghajini

the message about antiadb is hidden when used logging scriptlet no-fetch-if , i think can be fixed

In version 1.55.1b25 I observe unusual behavior when adding: ##+js(no-xhr-if). In addition to outputting the log in the log, the scriptlet begins to intercept calls.

Example: https://anidubonline.com/anime/full/11635-sozdannyj-v-bezdne-tv-2-made-in-abyss-retsujitsu-no-ougonkyou-01-iz-12.html

Add: anidubonline.com##+js(no-xhr-if), select an episode and press play.

You must be logged in to vote

1 reply

@gorhill

@gorhill
example.com##+js(aeld, _, , log, 3) - will it be implemented in upcoming releases?

You must be logged in to vote

14 replies

@Yuki2718

Hmmm, japscan.lol##+js(nowoif, , , log) doesn't log on 1.55 too, nevetheless the rule works.

@gorhill

Do not use log anymore in any scriptlet, this was useful only when outputing to console. Now if logger is opened, it will output whatever there is to output. If japscan.lol##+js(nowoif) doesn't work, then I need to fix it -- I just need feedback about what trace information you want to see in logger. So I will add arguments information for nowoif. Also, if verbose mode in enabled, it will also output not-prevented calls to window.open.

@Yuki2718

Okay, japscan.lol##+js(nowoif) logs this

logs

I want to know what window.open arguments, in particular url, it prevented. But the situation is the same for 1.55.0 or AG, maybe some problem on Chrome or the site.

@gorhill

II modified the scriptlet to return more information -- in next dev build.

From now on I won't be able to do anything today and in the coming days, so hopefully the next devbuild will be good enough.

@dimisa-RUAdList

Yes, in version 1.55.1b27 in Google Chrome 109 the problem (aeld) is solved.

@gorhill Sorry, do you know how to log aost?

You must be logged in to vote

2 replies

@ghajini

@stephenhawk8054

Thanks. Confirm it works.

I just discovered an issue with the sending of log information to the logger. The issue can be triggered when adding the filter arstechnica.com##+js(json-prune) and visiting https://arstechnica.com/science/2024/03/redwoods-are-growing-almost-as-fast-in-the-uk-as-their-californian-cousins/ (could be any page probably).

Sometimes there are so many logged entries sent to the logger, that this line will become true, which will cause all the injected scriptlets to essentially abort because the communication channel is closed for all content scripts. I found the issue when trying to launch the DOM inspector, which was failing. So for now I will raise the limit to 1000 while trying to figure out if a better fix exists.

You must be logged in to vote

0 replies