gatsbyjs / gatsby

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

Not Receiving Form Submissions via Netlify Forms #12040

Closed deeheber closed 5 years ago

deeheber commented 5 years ago

Summary

Hey there disclaimer that I'm new to using Gatsby, but I'm having some troubles with getting my form to submit properly using Netlify forms. Unsure if this is a Gatsby or Netlify related problem.

Steps to reproduce:

  1. Go to https://deeheber.netlify.com/contact
  2. Fill out and submit the form
  3. No submission is received in my Netlify backend

Any additional input you can provide would be very helpful and appreciated. Did a quick scan of open issues and wasn't able to locate anything that looked related.

Thanks for your work on this open source project...aside from this issue using Gatsby has been great thus far!

Relevant information

Environment (if relevant)

  System:
    OS: macOS 10.14.3
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
    npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
  Languages:
    Python: 2.7.15 - /usr/local/bin/python
  Browsers:
    Chrome: 72.0.3626.109
    Firefox: 63.0.3
    Safari: 12.0.3
  npmPackages:
    gatsby: ^2.1.17 => 2.1.17 
    gatsby-image: ^2.0.29 => 2.0.29 
    gatsby-plugin-feed: ^2.0.13 => 2.0.13 
    gatsby-plugin-google-analytics: ^2.0.14 => 2.0.14 
    gatsby-plugin-manifest: ^2.0.19 => 2.0.19 
    gatsby-plugin-offline: ^2.0.24 => 2.0.24 
    gatsby-plugin-react-helmet: ^3.0.6 => 3.0.6 
    gatsby-plugin-sharp: ^2.0.22 => 2.0.22 
    gatsby-plugin-typography: ^2.2.7 => 2.2.7 
    gatsby-remark-copy-linked-files: ^2.0.9 => 2.0.9 
    gatsby-remark-images: ^2.0.6 => 2.0.6 
    gatsby-remark-prismjs: ^3.2.4 => 3.2.4 
    gatsby-remark-responsive-iframe: ^2.0.9 => 2.0.9 
    gatsby-remark-smartypants: ^2.0.8 => 2.0.8 
    gatsby-source-filesystem: ^2.0.22 => 2.0.22 
    gatsby-transformer-remark: ^2.2.6 => 2.2.6 
    gatsby-transformer-sharp: ^2.1.14 => 2.1.14 
jonniebigodes commented 5 years ago

@deeheber a quick glance at your code repository i saw that you have gatsby-plugin-offline installed and activated in your gatsby-config.js, so with that i would like to you to do the following:

  1. Stop Gatsby
  2. disable the plugin by commenting out the entry in your gatsby-config.js file.
  3. To be sure, issue gatsby clean, so that the .cache and public folders are purged.
  4. Issue gatsby develop and send something through the form.
  5. Confirm that is working and provide feedback.

This because at first glance, it looks like the service worker might be the culprit.

deeheber commented 5 years ago

Hey @jonniebigodes thanks for the reply!

I tried those things out and am still experiencing the same issue. Noticing it flashes a 404 page real quick and then redirects to the /success page when hitting submit if that's helpful?

Looked at my form submissions and did get one at 10:49AM PT from a Dustin at Gatsby...unsure how he successfully submitted that. I have my netlify setup to auto deploy when I push to master, so what's in master is what's up on the live netlify site.

DSchau commented 5 years ago

@deeheber I didn't do anything special--just filled out the form!

I did disable the service worker, but that seems like a sorta unlikely culprit.

Happy to debug this further, but at first glance--this seems like a Netlify issue rather than a Gatsby issue.

I may recommend checking out some of these resources:

deeheber commented 5 years ago

Sounds good @DSchau. I sent an email to Netlify asking for input from them.

jaysella commented 5 years ago

@deeheber Did you hear anything back from Netlify? I'm experiencing the same issue.

deeheber commented 5 years ago

@j-651 They said they thought it was the service worker (the gatsby-plugin-offline). I just gave up bc I'd like a reliable form anyway. Good it know it wasn't just me having the issue...thought I'm sorry you're also experiencing it.

valdezDev commented 5 years ago

I would love for someone to help me figure this out. I am having the same exact problem as deeheber. I've tried just about every little thing I could find after endless googling...

jonniebigodes commented 5 years ago

@valdezDev i picked up on your comment and i was able to connect Gatsby and netlify forms.

Here are the steps i took

export default () => ( <form name="contact" method="post" action="/success" data-netlify="true" data-netlify-honeypot="bot-field"