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

Uncaught TypeError: Cannot read property 'getElementsByTagName' of null #22920

Closed
saadaouad opened this issue Apr 8, 2020 · 11 comments
Closed
Labels
status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting.

Comments

@saadaouad
Copy link

Description

When I click on Gatsby link it gives me this error:

Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
    at navigation.js:173

PS: this happened with many recent versions

Environment

yarn run v1.12.3
warning ../package.json: No license field
$ /Users/saadaouad/fugoki-ui/node_modules/.bin/gatsby info --clipboard

  System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.14.2 - /var/folders/3h/cv940x756d1gjwjgz65ndr7r0000gn/T/yarn--1586348672321-0.2690320762715743/node
    Yarn: 1.12.3 - /var/folders/3h/cv940x756d1gjwjgz65ndr7r0000gn/T/yarn--1586348672321-0.2690320762715743/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 80.0.3987.163
    Firefox: 74.0
    Safari: 13.1
  npmPackages:
    gatsby: 2.18.25 => 2.10.5
    gatsby-image: ^2.3.2 => 2.3.1
    gatsby-plugin-accessibilityjs: ^1.0.3 => 1.0.3
    gatsby-plugin-canonical-urls: ^2.2.1 => 2.2.1
    gatsby-plugin-load-script: ^1.0.6 => 1.0.6
    gatsby-plugin-manifest: ^2.3.3 => 2.3.3
    gatsby-plugin-netlify: ^2.2.1 => 2.2.1
    gatsby-plugin-offline: ^3.1.2 => 3.1.2
    gatsby-plugin-react-helmet: ^3.2.1 => 3.2.1
    gatsby-plugin-robots-txt: ^1.5.0 => 1.5.0
    gatsby-plugin-sass: ^2.2.1 => 2.2.1
    gatsby-plugin-sitemap: ^2.3.1 => 2.3.1
    gatsby-plugin-webpack-bundle-analyzer: ^1.0.5 => 1.0.5
    gatsby-source-filesystem: ^2.2.2 => 2.2.2
    gatsby-source-graphql: ^2.3.2 => 2.3.0
    gatsby-transformer-json: ^2.3.1 => 2.3.1

✨  Done in 3.39s.
@saadaouad saadaouad added the type: bug An issue or pull request relating to a bug in Gatsby label Apr 8, 2020
@LekoArts
Copy link
Contributor

LekoArts commented Apr 9, 2020

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 💜

@LekoArts LekoArts added status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. and removed type: bug An issue or pull request relating to a bug in Gatsby labels Apr 9, 2020
@saadaouad
Copy link
Author

Hi @LekoArts,
I think this changes will resolve the problem

@github-actions
Copy link

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! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label May 11, 2020
@saadaouad
Copy link
Author

@LekoArts I'm facing with another issue now,

Sometimes I get a blank page when I click on any link without any error message and when I refresh the page I can get my content (I'm not sure if this is due to the cache or not).

Here is a record for that

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label May 12, 2020
@wardpeet
Copy link
Contributor

Hey @saadaouad ,

I'm going to close this issue as it's not a Gatsby issue. Please reach out on https://gatsby.dev/discord or open a new issue with additional information.

We're marking this issue as answered and closing it for now but please feel free to reopen this and comment if you would like to continue this discussion. We hope we managed to help and thank you for using Gatsby! 💜

@wardpeet wardpeet removed the status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. label May 13, 2020
@saadaouad
Copy link
Author

I'm going to close this issue as it's not a Gatsby issue.

@wardpeet this is a Gatsby issue and it's related to Gatsby navigation.
This happened when I upgrade Gatsby to the recent versions.

@saadaouad
Copy link
Author

@wardpeet first it was giving me Uncaught TypeError: Cannot read property 'getElementsByTagName' of null error, and once this has been fixed on #23196 I'm getting right now a blank page https://recordit.co/8RMBYzPo2N without any error on the console.

@dehamzah
Copy link
Contributor

hi @saadaouad i see the record is the production build. did it work in development?
and are you using client side navigation there?
can you provide minimal example in https://codesandbox.io/ so that we can debug it. the video recording is not too helpful if we cannot see the actual code and error message.

@saadaouad
Copy link
Author

Hi @dehamzah, yes it's a production build, it works well in development env and we are using client side navigation.
I think this is more related to the cache since when I refresh the page using production env it works well.

@wardpeet wardpeet added status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. labels May 14, 2020
@wardpeet
Copy link
Contributor

I'll re-open but without a proper reproduction we won't be able to tackle this.

@wardpeet wardpeet reopened this May 14, 2020
@danabrit
Copy link
Contributor

Closed due to no reproduction.
@saadaouad - In order to have us investigate further, please follow the doc on how to create a minimal reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting.
Projects
None yet
Development

No branches or pull requests

5 participants