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

Bugsnag must be removed for mobile footer dropdowns to work when Shopify Chat is installed on Pipeline theme #2074

Open
JustTobinShopify opened this issue Jan 24, 2024 · 6 comments
Labels
backlog We hope to fix this feature/bug in the future

Comments

@JustTobinShopify
Copy link

Describe the bug

Hey team, Tobin from Theme Support here. I was instructed by developers working with the Shopify Inbox app team to post this issue here.

Footer dropdowns for the third party theme Pipeline by Groupthought no longer work when the Shopify Chat widget is present. Removing Bugsnag as a dependency on the Shopify Inbox app seems to resolve the issue. We have received two escalated tickets with this exact issue now. I have a ticket on hold with the merchant from Store #1 (linked below) and the Groupthought developers since it's been a bit of a back and forth about whether it's the app or the theme causing the issue.

Specifically, this line of code in Bugsnag is the cause of the issue.

Theme Support has a Third Party Theme Issue Repo - here is the issue posted there as well.

Store #1 where the issue is active.
Store #2 where they have removed footer dropdowns but when they are implemented the issue occurs.

Steps to reproduce

  1. Travel to this merchant's live theme.
  2. Attempt to open the footer menu drawers.
  3. Remove BugSnag and this now functions correctly

(Issue can also be seen on this staging store.)

Environment

  • Bugsnag version: @bugsnag/js": "^7.22.3"
  • Browser version (e.g. chrome, safari): All browsers
  • Device (e.g. iphonex): Mobile devices only - can be replicated on desktop viewing mobile view.

Example code snippet

function __traceOriginalScript (fn, callbackAccessor, alsoCallOriginal = false) {

@laurieoulikesfood
Copy link

laurieoulikesfood commented Jan 24, 2024

Hi Bugsnag team,

I'm a Shopify engineer who looked into this issue. I'm here to provide more technical context. Our app (Shopify Inbox) is a script that loads on a merchant's website. Our Inbox app uses Bugsnag as a dependency. We noticed on certain websites using a specific Shopify theme, Bugsnag throws an error TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context..., which causes bugs on websites running our script (like the footer dropdowns not opening on this site on iOS browsers). When we removed Bugsnag as a dependency, these bugs disappear. We definitely want to keep using Bugsnag though so we're hoping your team can provide the fix. Thanks!

Screenshot 2024-01-24 at 12 52 25 PM

@JustTobinShopify
Copy link
Author

Any update or information on this as of yet? We are getting several reports of this now - all accounts utilizing the Pipeline theme by Groupthought.

@clr182 clr182 added the needs discussion Requires internal analysis/discussion label Feb 1, 2024
@clr182
Copy link

clr182 commented Feb 1, 2024

Hi 👋

I have raised this with our engineers. we are investigating this further and I will keep you updated once we have more information to share.

@gingerbenw
Copy link
Member

gingerbenw commented Feb 6, 2024

Hi everyone,

After some brief investigation, it appears that both our inline script content plugin and the Shopify chat widget monkey patch the addEventListener methods of many window objects, and I believe that some context with either this or arguments is being lost through the multiple layers of patching. This could also be caused by modern browsers using strict mode - but we will need to spend more time investigating to ensure we take the correct approach to resolve this.

In this meantime, you can disable the inline script checking with the trackInlineScripts configuration option, which will prevent the monkey patch from being applied.

Hope this helps!

@laurieoulikesfood
Copy link

laurieoulikesfood commented Feb 6, 2024

@gingerbenw and @clr182 turning trackinlinescripts seemed to have worked for us, thank you!!

@clr182 clr182 added backlog We hope to fix this feature/bug in the future and removed needs discussion Requires internal analysis/discussion labels Feb 8, 2024
@JustTobinShopify
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future
Projects
None yet
Development

No branches or pull requests

4 participants