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

Navigation issues in production. #2399

Closed
piotrfonte opened this issue Oct 9, 2017 · 3 comments
Closed

Navigation issues in production. #2399

piotrfonte opened this issue Oct 9, 2017 · 3 comments

Comments

@piotrfonte
Copy link
Contributor

piotrfonte commented Oct 9, 2017

I’m getting a bunch of errors when navigating between some of the pages:

Uncaught TypeError: Cannot read property 'call' of undefined
    at t (bootstrap 4aa7d893c2dbfbe3289e:52)
    at index.json?9cdc:9
    at loader.js:93
    at loader.js:78
    at index.json?9cdc:9
    at l (patch.js:19)
    at patch.js:40
    at window.webpackJsonp (bootstrap 4aa7d893c2dbfbe3289e:20)
    at path---index-a0e39f21c11f6a62c5ab.js:1
t @ bootstrap 4aa7d893c2dbfbe3289e:52
(anonymous) @ index.json?9cdc:9
(anonymous) @ loader.js:93
(anonymous) @ loader.js:78
(anonymous) @ index.json?9cdc:9
l @ patch.js:19
(anonymous) @ patch.js:40
window.webpackJsonp @ bootstrap 4aa7d893c2dbfbe3289e:20
(anonymous) @ path---index-a0e39f21c11f6a62c5ab.js:1
bootstrap 4aa7d893c2dbfbe3289e:52 Uncaught TypeError: Cannot read property 'call' of undefined
    at t (bootstrap 4aa7d893c2dbfbe3289e:52)
    at index.js?ec90:9
    at loader.js:93
    at loader.js:78
    at index.js?ec90:9
    at l (patch.js:19)
    at patch.js:40
    at window.webpackJsonp (bootstrap 4aa7d893c2dbfbe3289e:20)
    at component---src-pages-index-js-13429c7c915d0bbd76a3.js:1
t @ bootstrap 4aa7d893c2dbfbe3289e:52
(anonymous) @ index.js?ec90:9
(anonymous) @ loader.js:93
(anonymous) @ loader.js:78
(anonymous) @ index.js?ec90:9
l @ patch.js:19
(anonymous) @ patch.js:40
window.webpackJsonp @ bootstrap 4aa7d893c2dbfbe3289e:20
(anonymous) @ component---src-pages-index-js-13429c7c915d0bbd76a3.js:1
reactProdInvariant.js:29 Uncaught Error: Minified React error #130; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=130&args[]=object&args[]=%20Check%20the%20render%20method%20of%20%60o%60. for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at n (reactProdInvariant.js:29)
    at p.i [as _instantiateReactComponent] (instantiateReactComponent.js:72)
    at p._updateRenderedComponent (ReactCompositeComponent.js:758)
    at p._performComponentUpdate (ReactCompositeComponent.js:721)
    at p.updateComponent (ReactCompositeComponent.js:642)
    at p.receiveComponent (ReactCompositeComponent.js:544)
    at Object.receiveComponent (ReactReconciler.js:122)
    at p._updateRenderedComponent (ReactCompositeComponent.js:751)
    at p._performComponentUpdate (ReactCompositeComponent.js:721)
    at p.updateComponent (ReactCompositeComponent.js:642)

Steps to reproduce:

  1. visit http://piotrf.pl
  2. scroll down to where you see 3 logos (trint, al jazeera…)
  3. click on Al Jazeera Read case study link

Expected behaviour: navigate to http://piotrf.pl/made/palestine-remix and display related content

Actual behaviour: url is being updated, but content is not being presented, above console.log errors are returned. Refreshing the page then does show the proper content.

Note how it’s all OK when accessing s3 bucket directly: http://v2.piotrf.pl.s3-website.eu-central-1.amazonaws.com/ It’s also fine when running gatsby serve locally.

Could this be gatsby or should I take it with S3?

Gatsby versions from my package.json:

    "gatsby": "^1.9.55",
    "gatsby-cli": "^1.1.7",
    "gatsby-link": "^1.6.20",
    "gatsby-plugin-google-analytics": "^1.0.8",
    "gatsby-plugin-react-helmet": "^1.0.6",
    "gatsby-plugin-sharp": "^1.6.9",
    "gatsby-plugin-styled-components": "^1.0.5",
    "gatsby-remark-copy-linked-files": "^1.5.7",
    "gatsby-remark-images": "^1.5.15",
    "gatsby-source-filesystem": "^1.5.2",
    "gatsby-transformer-remark": "^1.7.15",
    "gatsby-transformer-sharp": "^1.6.10",
@piotrfonte
Copy link
Contributor Author

Unsure if that’s related but navigating from 404 pages is broken too.

@piotrfonte
Copy link
Contributor Author

piotrfonte commented Oct 9, 2017

I’m having other issues when deploying to Netlify: http://piotrf.pl/ (problematic) vs. http://v2piotrfpl.netlify.com/ (all seems to work). It’s the same environment, but the former under custom domain and breaks for some reason.


commons-0f75cfa13cb750fe146d.js:1 Uncaught SyntaxError: Unexpected token <
app-99d68831bd56ef745db4.js:1 Uncaught SyntaxError: Unexpected token <
path---index-a0e39f21c11f6a62c5ab.js:1 Uncaught ReferenceError: webpackJsonp is not defined
    at path---index-a0e39f21c11f6a62c5ab.js:1
(anonymous) @ path---index-a0e39f21c11f6a62c5ab.js:1
component---src-pages-index-js-13429c7c915d0bbd76a3.js:1 Uncaught ReferenceError: webpackJsonp is not defined
    at component---src-pages-index-js-13429c7c915d0bbd76a3.js:1
(anonymous) @ component---src-pages-index-js-13429c7c915d0bbd76a3.js:1
component---src-layouts-index-js-aebe2ffc17f23909b24c.js:1 Uncaught SyntaxError: Unexpected token <

This is awkward and I don’t really know how to deal with it just yet. Any help appreciated.

@piotrfonte
Copy link
Contributor Author

I found this hint in another issue, seems like making following amends to package.json has now solved my problems. I’ll do more tests and re-open this issue should things go south again.

    "patch": "sed -i -e 's/if(c\\.initial) return;/if(!c||c.initial) return;/g' ./node_modules/extract-text-webpack-plugin/index.js",
    "build": "npm run patch && gatsby build",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant