estuary / marketing-site

0 stars 5 forks source link

Fix: GA cors error #216

Closed flavioriper closed 5 months ago

flavioriper commented 5 months ago

Changes

Tests / Screenshots

image

Lighthouse

image

github-actions[bot] commented 5 months ago

Visit the preview URL for this PR (updated for commit 92ab965):

https://estuary-marketing--pr216-fix-cors-errors-qr7nftnz.web.app

(expires Fri, 12 Apr 2024 17:36:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 76f6b095a0752e5d9c6c890267f9fdc3e392161e

travjenkins commented 5 months ago

One issue with Partytown and GA is this break the testing tool : https://github.com/BuilderIO/partytown/issues/72

We should probably look into that a bit to see if there are any solutions/ideas/work arounds in that issue

travjenkins commented 5 months ago

Get an error in the console when starting up the app locally

...
 ERROR #11321  API.NODE.EXECUTION

"gatsby-node.js" threw an error while running the onPreBootstrap lifecycle:

fetch failed

  420 |
  421 | export const onPreBootstrap = async () => {
> 422 |     const response = await fetch('https://google-analytics.com/analytics.js');
      |           ^
  423 |     const buffer = Buffer.from(await response.arrayBuffer());
  424 |     await writeFile(path.join(__dirname, 'static', 'analytics.js'), buffer);
  425 | };

File: gatsby-node.ts:422:11

  TypeError: fetch failed

  - undici:11730 Object.fetch
    node:internal/deps/undici/undici:11730:11

  - task_queues:95 process.response
    node:internal/process/task_queues:95:5

  - gatsby-node.ts:422 Object.x
    /home/travis/code/marketing-site/gatsby-node.ts:422:11

  - api-runner-node.js:509 runAPI
    [marketing-site]/[gatsby]/src/utils/api-runner-node.js:509:16

success onPreBootstrap - 0.247s
success createSchemaCustomization - 1.223s
...
flavioriper commented 5 months ago

One issue with Partytown and GA is this break the testing tool : BuilderIO/partytown#72

We should probably look into that a bit to see if there are any solutions/ideas/work arounds in that issue

Since our GA script is completely down we can't check if it's happening to us, so I would suggest moving on to fix the problem we have now.

what do you think?

travjenkins commented 5 months ago

One issue with Partytown and GA is this break the testing tool : BuilderIO/partytown#72 We should probably look into that a bit to see if there are any solutions/ideas/work arounds in that issue

Since our GA script is completely down we can't check if it's happening to us, so I would suggest moving on to fix the problem we have now.

what do you think?

This tool is to be used locally.... I do not think this is impacted by the prod issue.

flavioriper commented 5 months ago

One issue with Partytown and GA is this break the testing tool : BuilderIO/partytown#72 We should probably look into that a bit to see if there are any solutions/ideas/work arounds in that issue

Since our GA script is completely down we can't check if it's happening to us, so I would suggest moving on to fix the problem we have now. what do you think?

This tool is to be used locally.... I do not think this is impacted by the prod issue.

image

it's connecting here, so we probably fine

flavioriper commented 5 months ago

Moved GA to be hosted statically within the project like before since it's something that barely changes over the year.

flavioriper commented 5 months ago

The build/test deployment is completed and healthy

can we go for the merge? @travjenkins