-
Notifications
You must be signed in to change notification settings - Fork 441
Description
Possible Bug
Hi, I came across an issue while deploying the Gatsby default starter with netlify-cli. I posted an issue on their repo, just in case. But it seems that it has to do with how netlify-cli is working.
ERROR: polling-xhr.js:268 Mixed Content: The page at 'https://gatsby-site-name.netlify.live/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://gatsby-site-name-3e8071.netlify.live:61317/socket.io/?EIO=3&transport=polling&t=NCzNlEQ'. This request has been blocked; the content must be served over HTTPS.
Opened issue on Gatsby's GitHub:
gatsbyjs/gatsby#25695
(A user there suggested that it might be due to the sockets making requests that are not secure?)
BUG REPORT INFORMATION
Steps to reproduce:
- in terminal, run: gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default
- remove .git folder
- re-init git and push it to gitHub
- netlify init
- go through the options to link the site to netlify
- build command: gatsby build
- deploy folder: public
Sometimes:
- Run "netlify dev --live"
- Copy paste the url that is generated in the terminal to the browser.
- Open the console, and see the Mixed Content Type Errors.
Other times:
- Add install the SaSS dependencies and add the plugin to the array of plugins in the gatsby-config.
- Run "git push origin master" to trigger automatic deploy to netlify.
- Allow time for site to build. There are no errors in the build log.
(There was a message about a config file being missing, so they use defaults) - Go to link of deployed site. See a 404 error in the window.
- See the logs of the Mixed Content erros in the consol.
- Expected result
- No errors, and content is reliably rendered.
Expected result:
No errors, and content is reliably rendered.
Actual result:
Sometimes there are errors, and sometimes not; and I'm not sure why.
Environment
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.16.1 - /usr/local/bin/node
npm: 6.14.4 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 83.0.4103.116
Safari: 13.1
npmPackages:
gatsby: ^2.23.12 => 2.23.12
gatsby-image: ^2.4.9 => 2.4.9
gatsby-plugin-manifest: ^2.4.14 => 2.4.14
gatsby-plugin-offline: ^3.2.13 => 3.2.13
gatsby-plugin-react-helmet: ^3.3.6 => 3.3.6
gatsby-plugin-sass: ^2.3.12 => 2.3.12
gatsby-plugin-sharp: ^2.6.14 => 2.6.14
gatsby-source-filesystem: ^2.3.14 => 2.3.14
gatsby-transformer-sharp: ^2.5.7 => 2.5.7
npmGlobalPackages:
gatsby-cli: 2.12.44
netlify version --verbose
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Binaries:
Node: 12.16.1 - /usr/local/bin/node
npm: 6.14.4 - /usr/local/bin/npm
Browsers:
Chrome: 83.0.4103.116
Safari: 13.1
npmGlobalPackages:
netlify-cli: 2.51.0
netlify-cli/2.51.0 darwin-x64 node-v12.16.1