bug: RYD doesnt work on new layout
Type
Cosmetic
Bug description
YouTube does A/B testing of a new layout/UI which causes RYD to break for some users.
- [x] ~~The like button displays the dislike count instead.~~ (fixed)
- [ ] The dislike button shows neither the initial text nor the dislike count.
Steps to reproduce
Cant, still shows the old layout for me
Relevant log output
Debug logs provided by Bleuzen
old layout:
08-08 17:39:05.493 31098 31250 D revanced: ReturnYouTubeDislike: onComponentCreated: ConversionContext{container=null, widthConstraint=1080, heightConstraint=0, templateLoggerFactory=ofv@3de3d2f, rootDisposableContainer=aqqu@9db5117, imagePrefetchRangeRatio=0.0, horizontalCollectionTouchInterceptor=null, horizontalCollectionSwipeProtector=null, useIncrementalMountOnChildrenInternal=true, useLegacyVisibleInternal=false, recyclerBinderConfiguration=null, pathBuilder=video_action_bar.eml|27b56b54d5dcba20|video_action_bar_unwrapper.eml|c5a1d399b660e52e|CellType|ScrollableContainerType|ContainerType|ContainerType|dislike_button.eml|966ee2cd7db5e29f|video_action_toggle_button.eml|8fd9d44a8e3c9162|video_action_button.eml|9dd3b4b44979c3af|ContainerType|TextType|, elementId=0,0,0,0,1,0,0,0,0,0,1, identifierProperty=video_action_bar.eml|27b56b54d5dcba20, loggingNodeInternal=null, parentLoggingNodeInternal=null, elementsInteractionLoggerInternal=null, globalCommandDataDecoratorsInternal=null, decoratingElementBuilder=abdd@4c4170a, debugId=null, treeDebugId=null, shouldAddDebuggerViewTags=false, elementsConfig=ElementsConfig{converterProvider=imh@ab91b26, layoutExecutor=null, logTag=Elements, perfLoggerFactory=oem@99b7d4b, elementsInteractionLogger=abfi@c7a5367, useIncrementalMount=false, userData=MainAppElementsUserData{activeStateScrollSelectionController=com.google.android.apps.youtube.app.common.ui.elements.activestate.ActiveStateScrollSelectionController@17b5324}, recyclerConfig=RecyclerConfig{initRangeSize=4, collectionRangeRatio=0.45, binderRangeRatio=0.5, recyclerViewItemPrefetch=false, layoutHandlerFactory=null, changeSetExecutor=null, layoutInfo=null, useLegacyVisible=false}, nestedScrollingEnabled=true, globalCommandDataDecorators=[abda@e291514]}, couldOverlapWithElementsConfig=false, elementDepthInTree=11, scrollStrategyListenerHolder=nzr@b0c4ac3}
new layout:
08-08 17:40:45.806 31098 31098 D revanced: ReturnYouTubeDislike: onComponentCreated: ConversionContext{container=null, widthConstraint=1080, heightConstraint=0, templateLoggerFactory=ofv@3de3d2f, rootDisposableContainer=aqqu@87715d, imagePrefetchRangeRatio=0.0, horizontalCollectionTouchInterceptor=null, horizontalCollectionSwipeProtector=null, useIncrementalMountOnChildrenInternal=true, useLegacyVisibleInternal=false, recyclerBinderConfiguration=null, pathBuilder=video_action_bar.eml|27b56b54d5dcba20|video_action_bar_unwrapper.eml|c5a1d399b660e52e|CellType|ScrollableContainerType|ContainerType|ContainerType|segmented_like_dislike_button.eml|661608c4db76804f|video_action_button_pill.eml|c01df18db7aa5d7f|ContainerType|ContainerType|ContainerType|TextType|, elementId=0,0,0,0,0,0,0,0,0,0,0,1, identifierProperty=video_action_bar.eml|27b56b54d5dcba20, loggingNodeInternal=null, parentLoggingNodeInternal=null, elementsInteractionLoggerInternal=null, globalCommandDataDecoratorsInternal=null, decoratingElementBuilder=abdd@469427f, debugId=null, treeDebugId=null, shouldAddDebuggerViewTags=false, elementsConfig=ElementsConfig{converterProvider=imh@4e324c, layoutExecutor=null, logTag=Elements, perfLoggerFactory=oem@99b7d4b, elementsInteractionLogger=abfi@766c295, useIncrementalMount=false, userData=MainAppElementsUserData{activeStateScrollSelectionController=com.google.android.apps.youtube.app.common.ui.elements.activestate.ActiveStateScrollSelectionController@17b5324}, recyclerConfig=RecyclerConfig{initRangeSize=4, collectionRangeRatio=0.45, binderRangeRatio=0.5, recyclerViewItemPrefetch=false, layoutHandlerFactory=null, changeSetExecutor=null, layoutInfo=null, useLegacyVisible=false}, nestedScrollingEnabled=true, globalCommandDataDecorators=[abda@c522738]}, couldOverlapWithElementsConfig=false, elementDepthInTree=12, scrollStrategyListenerHolder=nzr@b0c4ac3}
Screenshots or videos

(actually has 27k likes and 96 dislikes)
Solution
possibly:
- replace the litho component with a custom view that has the same icon and text
- force old layout
- add text component to litho button
Additional context
No response
@j4k0xb I don't know how to contact you privately, so I'll update you about my idea here:
Since forcing the old layout is not a feasible solution, because sooner or later Google will remove it, it might be useful to merge the like textbox with the dislike one.

As a temporal solution this is fine.
As a temporal solution this is fine.
Yeah...meanwhile a solution to inflate a textbox inside litho component will be found.
Any update on this issue?
I'm randomly seeing failures to find the dislike button. This is with latest support youtube.apk and latest integrations/patches.
It fails every fifth or so video that loads:
revanced: ReturnYouTubeDislike: could not find a dislike button in ConversionContext{container=null, widthConstraint=null, heightConstraint=null, templateLoggerFactory=aeb@2051dec, rootDisposableContainer=alem@9e3ab3, imagePrefetchRangeRatio=0.0, horizontalCollectionTouchInterceptor=null, horizontalCollectionSwipeProtector=oka@8f545b5, useIncrementalMountOnChildrenInternal=true, useLegacyVisibleInternal=false, recyclerBinderConfiguration=null, pathBuilder=library_recent_shelf.eml|1ac0273213f9053|CellType|horizontal_shelf.eml|523847291e32e15e|ContainerType|shelf_header.eml|f53257f4256e153f|shelf_header_content.eml|bd4228b49e201983|ContainerType|ContainerType|ContainerType|ContainerType|TextType|, elementId=0,0,0,0,0,0,0,0,0,1,0, identifierProperty=library_recent_shelf.eml|4381928fd3280e8, loggingNodeInternal=null, parentLoggingNodeInternal=null, elementsInteractionLoggerInternal=null, globalCommandDataDecoratorsInternal=null, decoratingElementBuilder=acet@1e83921, debugId=null, treeDebugId=null, shouldAddDebuggerViewTags=false, elementsConfig=ElementsConfig{converterProvider=igl@538bd32a, layoutExecutor=null, logTag=Elements, perfLoggerFactory=abe@53205cd, elementsInteractionLogger=bgdy@421563, useIncrementalMount=true, userData=null, recyclerConfig=RecyclerConfig{initRangeSize=4, collectionRangeRatio=0.45, binderRangeRatio=0.5, recyclerViewItemPrefetch=false, layoutHandlerFactory=null, changeSetExecutor=null, layoutInfo=null, useLegacyVisible=false, cleanupOnDetach=false}, nestedScrollingEnabled=true, globalCommandDataDecorators=[gedae@38eb23a], clearComponentOnDetach=false}, couldOverlapWithElementsConfig=false, elementDepthInTree=11, scrollStrategyListenerHolder=ooz@153ad211, materializationResult=null}
Visually the layout looks the same as when it does work correctly, which shows up as:
ConversionContext{container=null, widthConstraint=1080, heightConstraint=0, templateLoggerFactory=owd@2064dec, rootDisposableContainer=aslm@5c4d347, imagePrefetchRangeRatio=0.0, horizontalCollectionTouchInterceptor=null, horizontalCollectionSwipeProtector=null, useIncrementalMountOnChildrenInternal=true, useLegacyVisibleInternal=false, recyclerBinderConfiguration=null, pathBuilder=video_action_bar.eml|9853ad930ab2|CellType|ScrollableContainerType|ContainerType|ContainerType|segmented_like_dislike_button.eml|b356a892ab|video_action_button_pill.eml|9853ad930ab2|ContainerType|ContainerType|ContainerType|TextType|, elementId=0,0,0,0,0,0,0,0,0,0,1, identifierProperty=video_action_bar.eml|9853ad930ab2, loggingNodeInternal=null, parentLoggingNodeInternal=java.lang.ref.WeakReference@243caeb, elementsInteractionLoggerInternal=null, globalCommandDataDecoratorsInternal=null, decoratingElementBuilder=acet@a4321567, debugId=null, treeDebugId=null, shouldAddDebuggerViewTags=false, elementsConfig=ElementsConfig{converterProvider=abe@541abed, layoutExecutor=null, logTag=Elements, perfLoggerFactory=dba@152daea, elementsInteractionLogger=abe@541abed, useIncrementalMount=false, userData=null, recyclerConfig=RecyclerConfig{initRangeSize=4, collectionRangeRatio=0.45, binderRangeRatio=0.5, recyclerViewItemPrefetch=false, layoutHandlerFactory=null, changeSetExecutor=null, layoutInfo=null, useLegacyVisible=false, cleanupOnDetach=false}, nestedScrollingEnabled=true, globalCommandDataDecorators=[aeb@4216ade], clearComponentOnDetach=false}, couldOverlapWithElementsConfig=false, elementDepthInTree=11, scrollStrategyListenerHolder=aeb@38153ab, materializationResult=null}
It fails every fifth or so video that loads:
https://github.com/revanced/revanced-integrations/blob/bca96cc8b49db956a5b69ca425e626b45d80dbf2/app/src/main/java/app/revanced/integrations/returnyoutubedislike/ReturnYouTubeDislike.java#L158-L164
This is run for every created component so the debug log is not a fail
In your first example the pathBuilder starts with library_recent_shelf.eml (random other component) but we're only filtering the ones with video_action_bar.eml (which contain segmented_like_dislike_button.eml or dislike_button.eml later)
This specific log can be removed, it's not particularly necessary .