Skip to content

Browser Extensions Cause "Cannot redefine property: Shopify" Error #3575

@frankl1nrg

Description

@frankl1nrg

What is the location of your example repository?

https://github.com/Shopify/hydrogen/tree/main/templates/skeleton

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2026.1.0

What version of Remix are you using?

7.12.0

Steps to Reproduce

  1. Install Urban VPN browser extension (note that this is only one example, there could be more extensions)
  2. Visit any Hydrogen store (e.g., https://skeleton.hydrogen.shop/)
  3. Open browser developer console
  4. Observe TypeError: Cannot redefine property: Shopify error
  5. Notice the app crashes/becomes unusable (The Remix/RR error boundary kicks in)

Expected Behavior

  1. Framework resilience: Hydrogen apps should not crash regardless of which browser extensions users have installed
  2. Defensive coding: The logic in ShopifyCustomerPrivacy.tsx:344 should check if window.Shopify is already defined and handle both configurable and non-configurable scenarios gracefully
  3. Consistent experience: Hydrogen should provide the same level of stability as Shopify Theme stores when dealing with third-party scripts
  4. Graceful degradation: If an extension conflicts with Hydrogen's property definitions, the app should continue functioning with appropriate fallback behavior
  5. User-first approach: End users shouldn't need to disable legitimate browser extensions to use Hydrogen stores

Actual Behavior

App becomes completely unusable with TypeError: Cannot redefine property: Shopify when browser extensions define the property as non-configurable.

Relevant resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions