habitlab / habitlab

Build better habits online! Tell HabitLab your goals, and it will determine the appropriate interventions via experimentation.
https://habitlab.github.io
GNU General Public License v3.0
368 stars 56 forks source link

[User Feedback] Hi, I've been experiencing a problem on youtube where the video will only play … #787

Open habitlab-feedback opened 3 years ago

habitlab-feedback commented 3 years ago

A user submitted the following via HabitLab's built-in Feedback form:

Hi, I've been experiencing a problem on youtube where the video will only play for a fraction of a second and then pause again. I need to disable habitlab to fix this.

background_url: 'chrome-extension://obghclocpdgcekcognpkblghkedcpdgd/popup.html'
browser: >-
  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,
  like Gecko) Chrome/87.0.4280.88 Safari/537.36
language: en-US
languages:
  - en-US
  - en
url: 'https://www.youtube.com/'
loaded_interventions: []
enabled_interventions:
  - amazon/block_after_interval_per_visit
  - amazon/close_tab_timer
  - amazon/hide_recommendations
  - amazon/make_user_wait
  - amazon/prompt_reason
  - amazon/scroll_blocker
  - amazon/show_timer_banner
  - amazon/show_user_info_interstitial
  - buzzfeed/block_after_interval_per_visit
  - buzzfeed/close_tab_timer
  - buzzfeed/make_user_wait
  - buzzfeed/prompt_reason
  - buzzfeed/scroll_blocker
  - buzzfeed/show_timer_banner
  - buzzfeed/show_user_info_interstitial
  - calm/feed_injection_positive_goal_widget
  - calm/suggest_positive_site_interstitial
  - duolingo/facebook_feed_lesson_injection
  - duolingo/facebook_replace_ads_with_lesson
  - duolingo/iqiyi_sidebar_lesson
  - facebook/block_after_interval_per_visit
  - facebook/close_tab_timer
  - facebook/feed_injection_timer
  - facebook/make_user_wait
  - facebook/prompt_reason
  - facebook/remove_clickbait
  - facebook/remove_comments
  - facebook/remove_news_feed
  - facebook/rich_notifications
  - facebook/scroll_blocker
  - facebook/show_timer_banner
  - facebook/show_user_info_interstitial
  - generic/block_after_interval_per_visit
  - generic/close_tab_timer
  - generic/make_user_wait
  - generic/scroll_blocker
  - generic/show_timer_banner
  - generic/show_user_info_interstitial
  - generic_positive/feed_injection_positive_goal_widget
  - gmail/block_after_interval_per_visit
  - gmail/close_tab_timer
  - gmail/make_user_wait
  - gmail/prompt_reason
  - gmail/scroll_blocker
  - gmail/show_timer_banner
  - gmail/show_user_info_interstitial
  - instagram/block_after_interval_per_visit
  - iqiyi/prompt_before_watch
  - iqiyi/remove_sidebar_links
  - iqiyi/show_timer_banner
  - netflix/infinite_alarm
  - netflix/link_articles
  - netflix/prompt_before_watch
  - netflix/show_timer_banner
  - netflix/stop_autoplay
  - nytimes/feed_injection_positive_goal_widget
  - nytimes/suggest_positive_site_interstitial
  - reddit/block_after_interval_per_visit
  - reddit/close_tab_timer
  - reddit/make_user_wait
  - reddit/scroll_blocker
  - reddit/show_user_info_interstitial
  - ted/feed_injection_positive_goal_widget
  - ted/suggest_positive_site_interstitial
  - twitter/block_after_interval_per_visit
  - twitter/close_tab_timer
  - twitter/make_user_wait
  - twitter/prompt_reason
  - twitter/remove_twitter_feed
  - twitter/scroll_blocker
  - twitter/show_timer_banner
  - twitter/show_user_info_interstitial
  - youku/prompt_before_watch
  - youku/remove_sidebar_links
  - youku/show_timer_banner
  - youtube/block_after_interval_per_visit
  - youtube/prompt_before_watch
  - youtube/remove_comment_section
  - youtube/remove_recommended
  - youtube/remove_sidebar_links
  - generated_www.instagram.com/block_after_interval_per_visit
  - generated_www.instagram.com/close_tab_timer
  - generated_www.instagram.com/make_user_wait
  - generated_www.instagram.com/scroll_blocker
  - generated_www.instagram.com/show_timer_banner
  - generated_www.instagram.com/show_user_info_interstitial
  - generated_www.linkedin.com/block_after_interval_per_visit
  - generated_www.linkedin.com/close_tab_timer
  - generated_www.linkedin.com/scroll_blocker
  - generated_imgur.com/block_after_interval_per_visit
  - generated_imgur.com/close_tab_timer
  - generated_imgur.com/make_user_wait
  - generated_imgur.com/scroll_blocker
  - generated_imgur.com/show_timer_banner
  - generated_imgur.com/show_user_info_interstitial
  - generated_www.shockwave.com/block_after_interval_per_visit
  - generated_www.shockwave.com/close_tab_timer
  - generated_www.shockwave.com/make_user_wait
  - generated_www.shockwave.com/scroll_blocker
  - generated_www.shockwave.com/show_timer_banner
  - generated_www.shockwave.com/show_user_info_interstitial
  - generated_play.hbogo.com/block_after_interval_per_visit
  - generated_play.hbogo.com/close_tab_timer
  - generated_play.hbogo.com/make_user_wait
  - generated_play.hbogo.com/scroll_blocker
  - generated_play.hbogo.com/show_timer_banner
  - generated_play.hbogo.com/show_user_info_interstitial
  - generated_www.rei.com/block_after_interval_per_visit
  - generated_www.rei.com/close_tab_timer
  - generated_www.rei.com/make_user_wait
  - generated_www.rei.com/scroll_blocker
  - generated_www.rei.com/show_timer_banner
  - generated_www.rei.com/show_user_info_interstitial
  - generated_www.ebay.com/block_after_interval_per_visit
  - generated_www.ebay.com/close_tab_timer
  - generated_www.ebay.com/make_user_wait
  - generated_www.ebay.com/scroll_blocker
  - generated_www.ebay.com/show_timer_banner
  - generated_www.ebay.com/show_user_info_interstitial
  - generated_smile.amazon.com/block_after_interval_per_visit
  - generated_smile.amazon.com/close_tab_timer
  - generated_smile.amazon.com/make_user_wait
  - generated_smile.amazon.com/prompt_reason
  - generated_smile.amazon.com/scroll_blocker
  - generated_smile.amazon.com/show_timer_banner
  - generated_smile.amazon.com/show_user_info_interstitial
enabled_goals:
  - facebook/spend_less_time
  - youtube/spend_less_time
  - custom/spend_less_time_www.instagram.com
  - custom/spend_less_time_imgur.com
  - custom/spend_less_time_www.shockwave.com
  - custom/spend_less_time_play.hbogo.com
  - reddit/spend_less_time
  - twitter/spend_less_time
  - custom/spend_less_time_www.rei.com
  - custom/spend_less_time_www.ebay.com
  - custom/spend_less_time_smile.amazon.com
  - amazon/spend_less_time
devmode: false
version: 1.0.276
chrome_runtime_id: obghclocpdgcekcognpkblghkedcpdgd
BryanWall commented 3 years ago

I am having this issue also on Chrome 87 on Mac. It seems that several of the nudge scripts are broken on Chrome 87, especially those that pop up information on the page. The extension is mostly useless right now.

monsieurbaguette commented 3 years ago

I looked at the error that it was spitting out in the Chrome developer console; it seems to be an issue with them using a deprecated function (createShadowRoot). See https://developer.mozilla.org/en-US/docs/Web/API/Element/createShadowRoot for reference. The error: Uncaught (in promise) TypeError: (intermediate value)(intermediate value).createShadowRoot is not a function at create_shadow_div (:58:304306) at wrap_in_shadow (:58:304561) at b (:58:287423) at :58:289314

monsieurbaguette commented 3 years ago

I looked at the error that it was spitting out in the Chrome developer console; it seems to be an issue with them using a deprecated function (createShadowRoot). See https://developer.mozilla.org/en-US/docs/Web/API/Element/createShadowRoot for reference. The error: Uncaught (in promise) TypeError: (intermediate value)(intermediate value).createShadowRoot is not a function at create_shadow_div (:58:304306) at wrap_in_shadow (:58:304561) at b (:58:287423) at :58:289314

Also, just for extra clarification, the nudge causing this problem is the Think Twice nudge, although others seem to cause the same errors. I might open a separate issue (and possibly a PR if I manage to fix the problem) specifically about using the deprecated functions. createShadowRoot has been replaced by another function, that I presume is similar enough to just replace the functions within the source without getting too involved, but I'll have to test by doing so myself.