gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.28k stars 10.31k forks source link

(www): Uncaught ReferenceError: firebase is not defined #24992

Closed abhishekjakhar closed 4 years ago

abhishekjakhar commented 4 years ago

Description

There is error in console of Gatsby website telling Uncaught ReferenceError: firebase is not defined

Steps to reproduce

  1. Open the https://www.gatsbyjs.org/
  2. Open the console
  3. You will see the error telling Uncaught ReferenceError: firebase is not defined

Screenshot

firebase-is-not-defined

Expected result

There should not be any error in the console

Actual result

There is error in console telling Uncaught ReferenceError: firebase is not defined

Environment

  System:
    OS: macOS 10.15.4
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.19.0 - ~/.nvm/versions/node/v10.19.0/bin/node
    Yarn: 1.21.0 - ~/.nvm/versions/node/v10.19.0/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v10.19.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 83.0.4103.97
    Safari: 13.1
  npmPackages:
    gatsby: ^2.22.15 => 2.22.12 
    gatsby-alias-imports: ^1.0.4 => 1.0.4 
    gatsby-core-utils: ^1.3.3 => 1.3.3 
    gatsby-design-tokens: ^2.0.6 => 2.0.6 
    gatsby-image: ^2.4.5 => 2.4.5 
    gatsby-plugin-canonical-urls: ^2.3.2 => 2.3.2 
    gatsby-plugin-catch-links: ^2.3.3 => 2.3.3 
    gatsby-plugin-emotion: ^4.3.2 => 4.3.2 
    gatsby-plugin-feed: ^2.5.3 => 2.5.3 
    gatsby-plugin-google-analytics: ^2.3.2 => 2.3.2 
    gatsby-plugin-google-tagmanager: ^2.3.3 => 2.3.3 
    gatsby-plugin-guess-js: ^1.3.3 => 1.3.3 
    gatsby-plugin-layout: ^1.3.2 => 1.3.2 
    gatsby-plugin-mailchimp: ^2.2.3 => 2.2.3 
    gatsby-plugin-manifest: ^2.4.9 => 2.4.9 
    gatsby-plugin-mdx: 1.2.13 => 1.2.8 
    gatsby-plugin-netlify: ^2.3.3 => 2.3.3 
    gatsby-plugin-netlify-cache: ^0.1.0 => 0.1.0 
    gatsby-plugin-nprogress: ^2.3.2 => 2.3.2 
    gatsby-plugin-offline: ^3.2.7 => 3.2.7 
    gatsby-plugin-react-helmet: ^3.3.2 => 3.3.2 
    gatsby-plugin-sharp: ^2.6.9 => 2.6.9 
    gatsby-plugin-sitemap: ^2.4.3 => 2.4.3 
    gatsby-plugin-theme-ui: ^0.3.0 => 0.3.0 
    gatsby-plugin-twitter: ^2.3.2 => 2.3.2 
    gatsby-plugin-typography: ^2.5.2 => 2.5.2 
    gatsby-remark-autolink-headers: ^2.3.3 => 2.3.3 
    gatsby-remark-code-titles: ^1.1.0 => 1.1.0 
    gatsby-remark-copy-linked-files: ^2.3.3 => 2.3.3 
    gatsby-remark-embedder: ^1.16.0 => 1.16.0 
    gatsby-remark-graphviz: ^1.3.2 => 1.3.2 
    gatsby-remark-http-to-https: ^1.0.2 => 1.0.2 
    gatsby-remark-images: ^3.3.8 => 3.3.8 
    gatsby-remark-normalize-paths: ^1.0.0 => 1.0.0 
    gatsby-remark-prismjs: ^3.5.2 => 3.5.2 
    gatsby-remark-responsive-iframe: ^2.4.3 => 2.4.3 
    gatsby-remark-smartypants: ^2.3.2 => 2.3.2 
    gatsby-source-airtable: ^2.1.1 => 2.1.1 
    gatsby-source-filesystem: ^2.3.8 => 2.3.8 
    gatsby-source-git: ^1.0.2 => 1.0.2 
    gatsby-source-npm-package-search: ^2.3.4 => 2.3.4 
    gatsby-transformer-csv: ^2.3.2 => 2.3.2 
    gatsby-transformer-documentationjs: ^4.3.2 => 4.3.2 
    gatsby-transformer-gitinfo: ^1.1.0 => 1.1.0 
    gatsby-transformer-remark: ^2.8.13 => 2.8.13 
    gatsby-transformer-screenshot: ^2.3.7 => 2.3.7 
    gatsby-transformer-sharp: ^2.5.3 => 2.5.3 
    gatsby-transformer-yaml: ^2.4.2 => 2.4.2 
  npmGlobalPackages:
    gatsby-cli: 2.12.45
lannonbr commented 4 years ago

Looks like this is due to a site previously being dependend on no longer exists.

gatsbyjs.org has a internal plugin called gatsby-plugin-perf-metrics and inside it, the gatsby-ssr.js file is loading in a script from earlymonitoring.firebaseapp.com which is no longer online (source for gatsby-ssr file here: https://github.com/gatsbyjs/gatsby/blob/master/www/plugins/gatsby-plugin-perf-metrics/gatsby-ssr.js).

abhishekjakhar commented 4 years ago

So, we don't require this script anymore?

lannonbr commented 4 years ago

No the script is still trying to be loaded in, but given the site is offline, it is breaking this script tag. I'm not sure if this site was maintained by Gatsby or not so I am going to have to wait for someone from the core team to respond on this topic.

wardpeet commented 4 years ago

We should remove the plugin and instead monitor web-vitals through google analytics. I don't think we need anything more than that.

abhishekjakhar commented 4 years ago

@wardpeet Can I take up this PR?

gillkyle commented 4 years ago

Hey @abhishekjakhar, based off of @wardpeet's recommendations feel free to submit a PR removing gatsby-plugin-perf-metrics. To continue capturing that information we'd ideally like to add something into the official Google Analytics plugin, but for now it'd probably be good enough to add a plugin like gatsby-plugin-web-vitals in your PR as well πŸ™‚

github-actions[bot] commented 4 years ago

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

pvdz commented 4 years ago

Thanks for reporting this :) I've removed the plugin from the site so the error should disappear as soon as a new build is pushed, which should happen automatically