gatsbyjs / gatsby

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

StaticQuery not be fetched for Github Projects Integration in Gatsby-Portfolio-Dev #21669

Closed tcbutler320 closed 4 years ago

tcbutler320 commented 4 years ago

Description

Gatsby fails to start development server with error "Error: The result of this StaticQuery could not be fetched". This error is related to the Github project views integration in the starter theme, gatsby-portfolio-dev starter theme.

Steps to reproduce

This error is currently being experienced on the dev branch of my current website repo

Steps:

Expected result

Yarn should successfully complete a gatsby build and server the site on my local machine. The github integration will show the top github projects on my github repo in the website. An example of how this operates normally can be seen on the master branch of the same repo, which is currently hosted by netify.

Actual result

The full error output is listed below.

Error: The result of this StaticQuery could not be fetched.

This is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues
useStaticQuery
/Users/tylerbutler/Documents/projects/programming/Github/gatsby-portfolio-dev/.cache/gatsby-browser-entry.js:63

  60 | if (context[query] && context[query].data) {
  61 |   return context[query].data
  62 | } else {
> 63 |   throw new Error(
  64 |     `The result of this StaticQuery could not be fetched.\n\n` +
  65 |       `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +
  66 |       `please open an issue in https://github.com/gatsbyjs/gatsby/issues`

Projects
src/components/landing/Projects/index.jsx:8

   5 | import forkIcon from 'assets/icons/fork.svg';
   6 | import { Wrapper, Grid, Item, Content, Stats } from './styles';
   7 | 
>  8 | export const Projects = () => {
   9 |   const {
  10 |     github: {
  11 |       viewer: {

./.cache/app.js/</</</<
/Users/tylerbutler/Documents/projects/programming/Github/gatsby-portfolio-dev/.cache/app.js:67

  64 | const preferDefault = m => (m && m.default) || m
  65 | let Root = preferDefault(require(`./root`))
  66 | domReady(() => {
> 67 |   renderer(<Root />, rootElement, () => {
  68 |     apiRunner(`onInitialClientRender`)
  69 |   })
  70 | })

setTimeout handler*./node_modules/@mikaelkristiansson/domready/ready.js/</<
node_modules/@mikaelkristiansson/domready/ready.js:37
./.cache/app.js/</</<
/Users/tylerbutler/Documents/projects/programming/Github/gatsby-portfolio-dev/.cache/app.js:66

  63 | ]).then(() => {
  64 |   const preferDefault = m => (m && m.default) || m
  65 |   let Root = preferDefault(require(`./root`))
> 66 |   domReady(() => {
  67 |     renderer(<Root />, rootElement, () => {
  68 |       apiRunner(`onInitialClientRender`)
  69 |     })

This screen is visible only in development. It will not appear if the app crashes in production. Open your browser’s developer console to further inspect this error.

Environment

System: OS: macOS 10.15.3 CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.0 - /usr/local/bin/node Yarn: 1.22.0 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Firefox: 73.0.1 Safari: 13.0.5 npmPackages: gatsby: ^2.17.7 => 2.19.18 gatsby-image: ^2.2.30 => 2.2.41 gatsby-plugin-canonical-urls: ^2.0.8 => 2.1.20 gatsby-plugin-favicon: ^3.1.6 => 3.1.6 gatsby-plugin-google-analytics: ^2.0.8 => 2.1.35 gatsby-plugin-manifest: ^2.2.6 => 2.2.41 gatsby-plugin-nprogress: ^2.0.7 => 2.1.19 gatsby-plugin-offline: ^3.0.14 => 3.0.35 gatsby-plugin-react-helmet: ^3.0.2 => 3.1.22 gatsby-plugin-sharp: ^2.2.13 => 2.4.5 gatsby-plugin-sitemap: ^2.0.3 => 2.2.27 gatsby-plugin-styled-components: ^3.0.4 => 3.1.19 gatsby-source-filesystem: ^2.1.35 => 2.1.48 gatsby-source-graphql: ^2.1.21 => 2.1.33 gatsby-transformer-sharp: ^2.2.7 => 2.3.14 npmGlobalPackages: gatsby-cli: 2.8.29

tcbutler320 commented 4 years ago

My apologies, I've fixed the issue. The github token which was being used in the .env file for this project was revoked. The steps to resolve were...