Comments (14)
Update: Did some additional testing and found that the error above only occurs when the credentials are placed in a .env file. How can this be fixed? My initial input is exactly what appears in your documentation, but it again produces the "split" error.
It also looks like "basic auth" will create a 401 error. Eliminating it from the config and leaning wholly on the v2 credentials gives access when the v2 credentials are passed directly from the config and not .env.
from gatsby-source-gravityforms.
Hey,
Nice one for letting me know!
Are you able to provide:
- The line the error is on
- The full error message
- The version of GSG you are using
- Your config setup
And if none of that helps, would you be happy giving me access to your build to run on my machine?
At a first glance I am guessing your URL is set up differently to mine. Is your baseUrl containing http/https.
e.g.
{
resolve: "gatsby-source-gravityforms",
options: {
// Base URL needs to include protocol (http/https)
baseUrl: "https://gatsbytestsite.com",
// Gravity Forms API
api: {
key: "",
secret: "",
},
},
}
Cheers,
Rob
from gatsby-source-gravityforms.
Hey Rob,
It looks like the “split” error occurs at [gsg]/utils/basicAuthToURL.js 4:22 and [gsg]/gatsby-node.js 46:60. This happens when the credentials are added to .env, and removing "basicAuth" gives the same result. I've attached a screenshot of the output.
The version of GSG I'm using is from the repository, and I nabbed it via NPM (1.0.12). What portion of the config are you needing to see?
As for the basicAuth error, it's a straight 401 response.
My base url contains HTTPS, so we're good there. I can connect if I remove basicAuth and input the credentials directly in the config file.
-Travis
from gatsby-source-gravityforms.
If I can see your config for the plugin. Nothing else. What I posted above but your version.
Cheers
from gatsby-source-gravityforms.
It's this -
{
resolve:gatsby-source-gravityforms
,
options: {
baseUrl: process.env.SOURCE_URL,
api: {
key: process.env.GF_CONSUMER_KEY,
secret: process.env.GF_CONSUMER_SECRET,
},
//basicAuth: {
// username: process.env.AUTH_USERNAME,
// password: process.env.AUTH_PASSWORD,
//},
},
},
from gatsby-source-gravityforms.
Is your domain secret? If not, could you include the exact URL that you are including in the config.
from gatsby-source-gravityforms.
Code insert for some reason isn't working on my end. The plugin name is in quotes in my file.
from gatsby-source-gravityforms.
try
<'pre><'code>xxx</'pre></c'ode>
next time
without the commas. I needed that to get it to show ;)
from gatsby-source-gravityforms.
The domain isn't secret. It's https://adsoink.com. It's my website that I use from time to time as a testing ground.
from gatsby-source-gravityforms.
Would you be happy to message me your .env.dev file? So I can see if that is an issue?
As well as access to your repo.
I am struggling to see the issue atm.
from gatsby-source-gravityforms.
There frankly isn't much to look at. It's three lines.
<pre><code>SITE_BASE_URL = 'https://adsoink.com' GF_CONSUMER_KEY = 'key' GF_CONSUMER_SECRET = 'secret'</code></pre>
from gatsby-source-gravityforms.
Try unwrapping your sitename, so it is just SITE_BASE_URL=https://adsoink.com
If that doesnt work, try console logging your variable out in gatsby-node.js and see if it shows, or is undefined.
I have had issues in the past where gatsby isnt reading the env file.
from gatsby-source-gravityforms.
I've tried unwrapping the URL and see the same result, sadly. Tried back ticks as well.
The file is being read, and the variable is defined which is what makes this error weird. I've also deleted and reinstalled the plugin a couple of times via npm and yarn just in case it was an issue with the install.
To be honest, this is only going to be live for a couple of hours next week as a proof of concept. Everything seems to work just fine without the basicAuth, and I don't envision needing a fallback immediately.
I'll continue working with this through the weekend, and let you know if I run into the issue again.
Thanks for your time today!
from gatsby-source-gravityforms.
No worries.
I just rolled out a new version to NPM with a little bit of added error checking. It will probably not help you, but still stop the smaller mistakes. Also outputs a little bit more insight into what is happening.
Let me know what you find, so I can update/add logging where needed.
Cheers
from gatsby-source-gravityforms.
Related Issues (19)
- Minor edits to your docs HOT 1
- Error: Cannot find module './0AuthParameters' HOT 7
- 403 error status HOT 7
- Is there a way to get Site Key for reCAPTCHA? HOT 2
- Can't query field "content" HOT 11
- Get conditionalLogic for formFields? HOT 3
- Basic Auth HOT 1
- Update ignore fields to object instead of array
- Field type conflicts HOT 6
- Support for the latest version of Gatsby/WordPress HOT 1
- Conflicting field types in your data
- Converting Choices fields to Nodes HOT 1
- Improve error message for using wrong oauth_timestamp "Error 401 from GravityForms API"
- Error 401 from Gravity Forms API - provided signature does not match HOT 1
- Allocate confirmations to form HOT 1
- Split unique forms into own nodes
- Add build steps HOT 3
- Full example HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-source-gravityforms.