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

bug: product ads homepage. #818

Closed
3 tasks done
gut1414 opened this issue Jun 3, 2023 · 80 comments · Fixed by ReVanced/revanced-patches-template#2421
Closed
3 tasks done

bug: product ads homepage. #818

gut1414 opened this issue Jun 3, 2023 · 80 comments · Fixed by ReVanced/revanced-patches-template#2421
Labels
Bug report Something isn't working

Comments

@gut1414
Copy link

gut1414 commented Jun 3, 2023

Type

Error while patching

Bug description

I seeing ads for product on YouTube homepage.

Steps to reproduce

I use latest updated youtube revanced..

Relevant log output

I didn't found a way to give you a log.

Screenshots or videos

No response

Solution

No response

Additional context

No response

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
@gut1414 gut1414 added the Bug report Something isn't working label Jun 3, 2023
@oSumAtrIX
Copy link
Member

image
Report back

@oSumAtrIX oSumAtrIX added the Waiting on author Further information is requested label Jun 3, 2023
@ILoveOpenSourceApplications
Copy link
Contributor

I'm also having this issue. Seems to be region specific. And just like the last time following these given instructions to capture the logcat isn't working out for me. And I forgot how I did it the last time. My system is only having the platform tools and nothing else. And grep isn't being recognised inside cmd.

@LisoUseInAIKyrios
Copy link
Contributor

@ILoveOpenSourceApplications
On windows use findstr instead of grep

@ILoveOpenSourceApplications
Copy link
Contributor

Does the command change? Do I have to use adb shell and then logcat | findstr AdsFilter | findstr Unblocked? Also what happens if I use adb logcat | findstr app.revanced.android.youtube instead?

@LisoUseInAIKyrios
Copy link
Contributor

Replace grep with findstr and everything else should be the same.

If you want all ReVanced logs then use:
adb logcat | findstr "revanced" > log.txt
(found here )

@ILoveOpenSourceApplications
Copy link
Contributor

Replace grep with findstr and everything else should be the same.

'logcat' is not recognized as an internal or external command, operable program or batch file. this is the message I get when running the given command as it is.

@LisoUseInAIKyrios
Copy link
Contributor

Did you run adb logcat?

Need to install adb if you have not yet.

@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jun 8, 2023

adb logcat gives a long list from which I can seem to identify which is the one related to the issue. Though expandable_product_grid Seems to be related to it. But adding this to the custom filter doesn't remove everything.

@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jun 9, 2023

adb logcat | findstr AdsFilter | findstr Unblocked is not showing any output within cmd. Does that mean another command should be used inorder to save it as a text file?

@LisoUseInAIKyrios
Copy link
Contributor

Do you have debugging enabled under
Settings -> ReVanced -> Misc -> Debugging -> Debug logging?

If it's turned off then nothing will show up in the logs.

@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jun 9, 2023

Yes it is turned on.
Edit: Log stack traces is the only option which is turned off

@LisoUseInAIKyrios
Copy link
Contributor

Try just adb logcat | findstr AdsFilter and see what you get.

To save the output to a file use
adb logcat | findstr AdsFilter > log.txt

@ILoveOpenSourceApplications
Copy link
Contributor

Is post_base_wrapper a known YouTube element ID?

@oSumAtrIX
Copy link
Member

It is not known to us, why?

@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jun 9, 2023

I'm trying to find the component which is causing this issue, but I only found some of them and couldn't find for everything. These are the ones I found: offer_box,product_offers,expandable_product_grid,expandable_list_inner

But still there are something things for which I can't identify the component name.

@ILoveOpenSourceApplications
Copy link
Contributor

Try just adb logcat | findstr AdsFilter and see what you get.

To save the output to a file use adb logcat | findstr AdsFilter > log.txt

This worked out for me. Though still going through the log to find which component caused the issue is still difficult. Also is it still Unblocked or was it changed to Unfiltered?

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Jun 9, 2023

You can use adb logcat -c to clear the logs of the device.

It's useful to clear the logs, reproduce the issue on the device, then logcat and save logs to a file. Then you have a short log file with only the entries that matter.

@LisoUseInAIKyrios
Copy link
Contributor

I'm away from my laptop, but yes it appears it's now called "Unfiltered"

@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jun 10, 2023

Caught the components.

  1. expandable_metadata
  2. expandable_list_inner

Hiding these will remove the ads for products. 1 does this, and 2 removes the product ads from the description.

These ads are hidden when filtering using the above components, but these are some of their subcomponents. I am still posting here since I don't want to capture a logcat anytime soon.
3) styled_product_carousel
4) offer_box
5) product_offers
6) expandable_product_grid
7) shopping_flagging.

Please make any necessary changes with this information.

@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jun 10, 2023

Also, the command should be updated for all users, one for Android, one for Windows & one even for Mac, cause why not.

Windows command: adb logcat | findstr AdsFilter | findstr Unfiltered > log.txt

@oSumAtrIX
Copy link
Member

2 removes product from the description.

What do you mean by that?

sub components

The child components do not matter. Once the parent component is filtered, child components will not be added and instead an EmptyComponent will be used, that effectively hides the ad.

@oSumAtrIX
Copy link
Member

Have you confirmed the filter strings above don't cause any false positives? Use the app and check if it triggers anywhere, when the ad is not displayed.

@LisoUseInAIKyrios
Copy link
Contributor

What if expandable_metadata or expandable_list_inner are later used for some other purpose that should not be hidden?

If the sub components hide the product ads, why not use those to be safer? The naming for each of those components appears to be specific to product advertising.

@oSumAtrIX
Copy link
Member

I also assume this, but I also assume that if we filter "too late" at some child component, we can't hide the outer parent, and that might leave some residue such as padding, requires testing

@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jun 11, 2023

I'll provide the list here of what all is hidden by which components.

  1. inline_expander can be used instead of expandable_metadata. It removes the below box entirely.
    Screenshot_20230611-115118~2

  2. styled_product_carousel hides the product images.
    Screenshot_20230611-120309~2

  3. offer_box hides the box which provides the offer price of the product.
    Before:
    Screenshot_20230611-115125~3
    After:
    Screenshot_20230611-120709~2

  4. product_offers hides the compare prices drop down and it's contents.
    Before:
    Screenshot_20230611-120709~2
    Screenshot_20230611-120605~3
    After:
    Screenshot_20230609-230603~2

  5. expandable_product_grid removes a long list of product ads which upon clicking takes user back to offer_box.
    Before:
    Screenshot_20230611-121835~2
    Screenshot_20230611-115209~2
    After:
    Screenshot_20230611-123043~2

  6. shopping_flagging removes the report listing option from offer_box
    Before:
    Screenshot_20230611-115125~3
    After:
    Screenshot_20230611-123727~3

  7. expandable_list_inner hides product ads from the description.
    Before:
    Screenshot_20230611-125646~2
    After:
    Screenshot_20230611-130317~2

@LisoUseInAIKyrios
Copy link
Contributor

What happens if you only hide items 2-7? Does it look ok (with no extra padding or anything that looks weird)?

@ILoveOpenSourceApplications
Copy link
Contributor

I didn't copy and paste the entire log, just the part where the same component is being mentioned as filtered and unfiltered.

@oSumAtrIX
Copy link
Member

image

Please usecodeblocks.

@ILoveOpenSourceApplications
Copy link
Contributor

07-02 21:45:35.837 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: cell_divider.eml|cbdd9c74ef2c193): cell_divider.eml|cbdd9c74ef2c193|CellType|
07-02 21:45:35.837 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: cell_divider.eml|cbdd9c74ef2c193): cell_divider.eml|cbdd9c74ef2c193|CellType|

07-02 22:01:46.018 23273 7376 D revanced: LithoFilterPatch: Unfiltered (ID: cell_divider.eml|cbdd9c74ef2c193): cell_divider.eml|cbdd9c74ef2c193|CellType|
07-02 22:01:46.018 23273 7376 D revanced: LithoFilterPatch: Filtered (ID: cell_divider.eml|cbdd9c74ef2c193): cell_divider.eml|cbdd9c74ef2c193|CellType|

Yes, Hide Gray Separator is on.

07-02 21:45:35.819 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: null): expandable_list.eml|5f1b983e288bdd5a|expandable_list_inner.eml|d7cdda763cce72e6|CellType|ContainerType|ContainerType|product_link_item.eml|448417c243cf4498|ContainerType|ContainerType|product_image.eml|38741c470283edaa|ContainerType|ContainerType|
07-02 21:45:35.819 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: null): expandable_list.eml|5f1b983e288bdd5a|expandable_list_inner.eml|d7cdda763cce72e6|CellType|ContainerType|ContainerType|product_link_item.eml|448417c243cf4498|ContainerType|ContainerType|product_image.eml|38741c470283edaa|ContainerType|ContainerType|

Why was this not added within the ad filter?

07-02 21:45:34.887 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: products_in_video.eml|46339d899c0093e6): products_in_video.eml|46339d899c0093e6|ContainerType|
07-02 21:45:34.175 23273 7377 D revanced: LithoFilterPatch: Unfiltered (ID: null): offer_box_root.eml|a108848113b934da|CellType|offer_box.eml|c6ebe834d41a3ad5|ContainerType|ContainerType|ContainerType|TextType|
07-02 21:45:34.183 23273 7376 D revanced: LithoFilterPatch: Unfiltered (ID: product_details_unit.eml|669cf48a406254e1): product_details_unit.eml|669cf48a406254e1|product_details_unit.eml|669cf48a406254e1|CellType|

Or even though it is added it's still getting through?

@oSumAtrIX
Copy link
Member

Please use codeblocks.

Please use codeblocks

@ILoveOpenSourceApplications
Copy link
Contributor

Is it a separate software or code that I need to use?

@oSumAtrIX
Copy link
Member

No, codeblocks

Like
This

@ILoveOpenSourceApplications
Copy link
Contributor

07-02 22:01:46.018 23273 7376 D revanced: LithoFilterPatch: Unfiltered (ID: cell_divider.eml|cbdd9c74ef2c193): cell_divider.eml|cbdd9c74ef2c193|CellType|
07-02 22:01:46.018 23273 7376 D revanced: LithoFilterPatch: Filtered (ID: cell_divider.eml|cbdd9c74ef2c193): cell_divider.eml|cbdd9c74ef2c193|CellType|
07-02 21:45:35.819 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: null): expandable_list.eml|5f1b983e288bdd5a|expandable_list_inner.eml|d7cdda763cce72e6|CellType|ContainerType|ContainerType|product_link_item.eml|448417c243cf4498|ContainerType|ContainerType|product_image.eml|38741c470283edaa|ContainerType|ContainerType|
07-02 21:45:35.819 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: null): expandable_list.eml|5f1b983e288bdd5a|expandable_list_inner.eml|d7cdda763cce72e6|CellType|ContainerType|ContainerType|product_link_item.eml|448417c243cf4498|ContainerType|ContainerType|product_image.eml|38741c470283edaa|ContainerType|ContainerType|
07-02 21:45:34.887 23273 23273 D revanced: LithoFilterPatch: Unfiltered (ID: products_in_video.eml|46339d899c0093e6): products_in_video.eml|46339d899c0093e6|ContainerType|
07-02 21:45:34.175 23273 7377 D revanced: LithoFilterPatch: Unfiltered (ID: null): offer_box_root.eml|a108848113b934da|CellType|offer_box.eml|c6ebe834d41a3ad5|ContainerType|ContainerType|ContainerType|TextType|
07-02 21:45:34.183 23273 7376 D revanced: LithoFilterPatch: Unfiltered (ID: product_details_unit.eml|669cf48a406254e1): product_details_unit.eml|669cf48a406254e1|product_details_unit.eml|669cf48a406254e1|CellType|
07-02 22:09:31.527 23273  7376 D revanced: LithoFilterPatch: Unfiltered (ID: null): offer_box_root.eml|a108848113b934da|CellType|offer_box.eml|c6ebe834d41a3ad5|ContainerType|ContainerType|ContainerType|ContainerType|ContainerType|ContainerType|
07-02 22:09:31.527 23273  7377 D revanced: LithoFilterPatch: Unfiltered (ID: null): product_offers_root.eml|1ecf652f2a88d581|CellType|product_offers.eml|47e0f5dc28ada639|ContainerType|ContainerType|ContainerType|ImageType|

@ILoveOpenSourceApplications
Copy link
Contributor

07-02 22:09:37.111 23273  7377 D revanced: LithoFilterPatch: Unfiltered (ID: null): related_video_with_context.eml|1a205c0e26a397a0|CellType|active_view_display_container.eml|6f7403a6245fcf5c|ContainerType|related_video_with_context_inner.eml|d27a948eb95cb1c0|ContainerType|expandable_metadata.eml|2b91a52e39469622|inline_expansion.eml|2b0292cabd32bd7b|ContainerType|inline_expander.eml|1e8593184dc2e505|ContainerType|ContainerType|ContainerType|styled_product_carousel.eml|d000f2ab6a7f2434|CellType|horizontal_shelf.eml|7714f450376ddfd5|ContainerType|CollectionType|styled_product_carousel_item.eml|b6f66b32211ec7c0|CellType|ContainerType|ContainerType|ImageType|

@ILoveOpenSourceApplications
Copy link
Contributor

So...what's going on here?

@oSumAtrIX oSumAtrIX pinned this issue Jul 2, 2023
@ILoveOpenSourceApplications
Copy link
Contributor

ILoveOpenSourceApplications commented Jul 2, 2023

07-02 23:01:05.847 16887 16887 D revanced: LithoFilterPatch: Unfiltered (ID: null): related_video_with_context.eml|18205c0e260397a0|CellType|active_view_display_container.eml|6f7403a6245fcf5c|ContainerType|related_video_with_context_inner.eml|d27a548eb95cb1c0|ContainerType|slimline_survey_wrapper.eml|1a8ae89b422a44a4|ContainerType|slimline_survey.eml|7cece179f10e692|ContainerType|ContainerType|smiley_button.eml|335fed2a4566b068|ImageType|

While at it, I was able to capture that survey component which popped up randomly below some videos as well. slimline_survey_wrapper is the component.

@oSumAtrIX
Copy link
Member

Survey's are blocked but there is a blacklist filter that prevents it from working.

@ILoveOpenSourceApplications
Copy link
Contributor

Oh...so even if I add this component under custom filter you're saying that I may still see this survey?

@oSumAtrIX
Copy link
Member

Custom filter bypass them

@ILoveOpenSourceApplications
Copy link
Contributor

So it'll work then

@LisoUseInAIKyrios LisoUseInAIKyrios unpinned this issue Jul 3, 2023
@ILoveOpenSourceApplications
Copy link
Contributor

Any idea why the hidden components are still showing up when capturing log?

@oSumAtrIX oSumAtrIX reopened this Jul 13, 2023
@oSumAtrIX
Copy link
Member

oSumAtrIX commented Jul 13, 2023

@ILoveOpenSourceApplications is this still an issue?

Hidden components show up with "Filtered" tag if hidden.

@ILoveOpenSourceApplications
Copy link
Contributor

@ILoveOpenSourceApplications is this still an issue?

Yes

Hidden components show up with "Filtered" tag if hidden.

But some elements are not which can be seen in this comment.

@oSumAtrIX
Copy link
Member

If it says unfiltered, then it wasn't filtered

@oSumAtrIX oSumAtrIX pinned this issue Jul 13, 2023
@oSumAtrIX oSumAtrIX unpinned this issue Aug 11, 2023
@oSumAtrIX
Copy link
Member

Is this still a problem?

@oSumAtrIX oSumAtrIX added the Waiting on author Further information is requested label Oct 6, 2023
@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-patches-template Dec 14, 2023
@oSumAtrIX oSumAtrIX transferred this issue from another repository Dec 14, 2023
@oSumAtrIX oSumAtrIX closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
Slenderman00 pushed a commit to Slenderman00/revanced-patches-grindr that referenced this issue Jan 31, 2024
## [2.83.2](ReVanced/revanced-patches@v2.83.1...v2.83.2) (2022-10-19)

### Bug Fixes

* **youtube/video-ads:** add back initial method to block ads ([ReVanced#818](ReVanced/revanced-patches#818)) ([8b02acd](ReVanced/revanced-patches@996fcb0))
@LisoUseInAIKyrios LisoUseInAIKyrios removed the Waiting on author Further information is requested label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants