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

Hi @francisconeves97 how do I get pass the CORS issue from the function googleFormsToJson. Cant seem to obtain the json needed #30

Open
thesneakerhead opened this issue Feb 3, 2023 · 4 comments

Comments

@thesneakerhead
Copy link

No description provided.

@francisconeves97
Copy link
Owner

francisconeves97 commented Feb 3, 2023

Hey @thesneakerhead! The CORS issue arises from your browser blocking cross domain requests, and since you are requesting google's domain from your domain, an exception will be raised by the browser.

To mitigate this issue I think you have two options:

@thesneakerhead
Copy link
Author

Hi I'm receiving the below error from trying the first option

throw new Error("Invalid form. Couldn't find fbzx field.");
      ^

Hi I'm receiving the below error

Error: Invalid form. Couldn't find fbzx field.
at extractFormData (C:\Users\jacob\OneDrive\Desktop\YuxiIsaacRSVPFrontend\rsvp-frontend\node_modules\react-google-forms-hooks\dist\index.js:469:11)
at _temp3 (C:\Users\jacob\OneDrive\Desktop\YuxiIsaacRSVPFrontend\rsvp-frontend\node_modules\react-google-forms-hooks\dist\index.js:661:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async run (C:\Users\jacob\OneDrive\Desktop\YuxiIsaacRSVPFrontend\rsvp-frontend\src\scripts\getGoogleForm.js:13:18)

@mikemajara
Copy link
Contributor

Hey @thesneakerhead it's hard to give guidance on short sentences lacking references. Please add links to your code, add code snippets and share an example that we can reproduce either in CodeSandbox, or in a git repo of yours that can be cloned.

Bear in mind that showing effort and research in your questions and answers will yield better help in this or any other forum.

With that being said, the CORS issue is well documented as a common error, and there are plenty of answers you can help yourself with. You'll find some suggest that you use plugins or workarounds that allow CORS requests – I advise against that. I advise you try to understand the problem, and do it the right way.

@jere-co
Copy link

jere-co commented Apr 21, 2023

Hi I'm receiving the below error from trying the first option

throw new Error("Invalid form. Couldn't find fbzx field.");
      ^

Hi I'm receiving the below error

Error: Invalid form. Couldn't find fbzx field. at extractFormData (C:\Users\jacob\OneDrive\Desktop\YuxiIsaacRSVPFrontend\rsvp-frontend\node_modules\react-google-forms-hooks\dist\index.js:469:11) at _temp3 (C:\Users\jacob\OneDrive\Desktop\YuxiIsaacRSVPFrontend\rsvp-frontend\node_modules\react-google-forms-hooks\dist\index.js:661:22) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async run (C:\Users\jacob\OneDrive\Desktop\YuxiIsaacRSVPFrontend\rsvp-frontend\src\scripts\getGoogleForm.js:13:18)

On Google Forms, make sure under Settings / Responses / REQUIRES SIGN IN the Restrict to users in <organization> and its trusted organizations is unchecked.

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

4 participants