gatsby: [Firefox] Unhandled promise rejection TypeError: "this.loadPageDataJson(...).then(...).finally is not a function
Description
When I run in localhost works ok with all the browsers including Firefox but when it goes to production the Firefox v68.0.1 looks misaligned caused (I guess) for this .finally function.
Steps I tried
I tried to use "gatsby-plugin-compile-es6-packages": "^2.1.0" to compile es6 features like they are using in #2177 but without luck.
Also I tried:
exports.modifyWebpackConfig = ({ config, stage }) => {
switch (stage) {
case "build-javascript":
const app = config._config.entry.app;
config._config.entry.app = [require.resolve("./polyfills"), app];
break;
default:
break;
}
return config;
};
Expected result
What should happen?
Works ok with Chrome (v75.0.3770.142).

Actual result
Returns a console error which for what I found it’s something that .finally() function is quite new and maybe is not fully supported yet.
Unhandled promise rejection TypeError:
"this.loadPageDataJson(...).then(...).finally is not a function"
How it looks like in Firefox (v68.0.1)

Also I’m using "antd": "^3.12.3" package to handle the UI and in this CSS class if you change flex-direction: column to row it looks ok but the error still persists.
.ant-layout {
display: flex;
flex: auto;
flex-direction: column;
min-height: 0;
background: #f0f2f5;
Environment
System:
OS: macOS 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 76.0.3809.87
Firefox: 68.0.1
Safari: 12.1.1
npmPackages:
gatsby: ^2.0.76 => 2.13.45
gatsby-image: ^2.0.20 => 2.2.7
gatsby-mdx: 0.6.3 => 0.6.3
gatsby-plugin-antd: ^2.0.2 => 2.0.2
gatsby-plugin-compile-es6-packages: ^2.1.0 => 2.1.0
gatsby-plugin-google-analytics: ^2.0.9 => 2.1.6
gatsby-plugin-less: ^2.0.8 => 2.1.2
gatsby-plugin-manifest: ^2.0.9 => 2.2.4
gatsby-plugin-offline: ^2.0.16 => 2.2.4
gatsby-plugin-react-helmet: ^3.0.2 => 3.1.2
gatsby-plugin-react-svg: ^2.1.1 => 2.1.1
gatsby-plugin-sass: (internal URL) => 2.0.11
gatsby-plugin-sharp: ^2.0.18 => 2.2.9
gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4
gatsby-remark-autolink-headers: ^2.0.14 => 2.1.3
gatsby-remark-copy-linked-files: ^2.0.8 => 2.1.4
gatsby-remark-images: ^3.0.1 => 3.1.7
gatsby-source-filesystem: ^2.0.25 => 2.1.7
gatsby-source-git: ^1.0.1 => 1.0.1
gatsby-source-graphql: ^2.0.8 => 2.1.3
gatsby-transformer-remark: ^2.2.4 => 2.6.10
gatsby-transformer-sharp: ^2.1.8 => 2.2.5
npmGlobalPackages:
gatsby-cli: 2.7.9
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 17 (12 by maintainers)
Gatsby@2.13.68 has fixed the firefox(finally) bug. Thank you @peter-mouland
thank guys, i can confirm the break was in 2.12.1. 2.12.0 works for me also.
Here is a fix. https://github.com/gatsbyjs/gatsby/pull/16734/files
I’ve not used
async/awaitas that would change the behaviour of the function, instead i’ve opted to dupe the finally code in a then and catch. This mean there is no change in code behaviour.FYI, I reverted back to
"gatsby": "2.12.0"in mypackage.jsondependencies and it resolved my issuesWe’re experiencing this on Canvas 1839 as well if you care to see it happen, @sidharthachatterjee (source maps are on).
What @Chalarangelo asked would work for me too for now, if there is some workaround until they implement this.