Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.57k stars 2.91k forks source link

Cleanup GTM errors #52922

Open arosiclair opened 3 days ago

arosiclair commented 3 days ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): N/A Logs: N/A Expensify/Expensify Issue URL: N/A Issue reported by: @arosiclair Slack conversation (hyperlinked to channel name): https://expensify.slack.com/archives/C05F77PJ91V/p1732209099852979?thread_ts=1729526299.202909&cid=C05F77PJ91V

Action Performed:

  1. Sign into https://new.expensify.com/
  2. View logs and network requests

Expected Result:

No errors related to thirdPartyScripts or GTM

Actual Result:

Following errors get logged

Refused to execute script from 'https://new.expensify.com/r/thirdPartyScripts.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
CSP error for analytics.google.com

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

image

View all open jobs on GitHub

melvin-bot[bot] commented 3 days ago

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

arosiclair commented 3 days ago

The path for thirdPartyScripts.js resolved incorrectly if you loaded NewDot on a report page like r/123456 (resolved to https://new.expensify.com/r/thirdPartyScripts.js). We're fixing that in the PR.

The CSP issue is for the Google Tag Manager Preview Mode so won't be reproducible outside of that. I'll update our CSP to allow it.

arosiclair commented 3 days ago

Not done yet