[Firefox] Unhandled promise rejection TypeError: "this.loadPageDataJson(...).then(...).finally is not a function
See original GitHub issueDescription
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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:17 (12 by maintainers)
Top Results From Across the Web
Only on Firefox: finally is not a function | promise ...
I just tested my website on Firefox 64.x and saw the error: Unhandled promise rejection TypeError: "ic.all(...).then(...).catch(...).finally ...
Read more >Firefox Promise - getting finally is not a function? : r/javascript
I'm getting this error on the page: `Unhandled promise rejection TypeError: "t.finally is not a function"`
Read more >Window: unhandledrejection event - Web APIs | MDN
The unhandledrejection event is sent to the global scope of a script when a JavaScript Promise that has no rejection handler is rejected; ......
Read more >Firefox won't start - find solutions
This article explains what to do if the Firefox window does not open or you get an error message when you try to...
Read more >PromiseRejectionEvent() - Web APIs - MDN Web Docs
There are two types of PromiseRejectionEvent : unhandledrejection is sent by the JavaScript runtime when a promise is rejected but the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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/await
as 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.