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

[gatsby-source-contentful] Stuck at load plugins when using proxy #28526

Closed
donaldkg opened this issue Dec 8, 2020 · 7 comments
Closed

[gatsby-source-contentful] Stuck at load plugins when using proxy #28526

donaldkg opened this issue Dec 8, 2020 · 7 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. topic: source-contentful Related to Gatsby's integration with Contentful type: bug An issue or pull request relating to a bug in Gatsby

Comments

@donaldkg
Copy link

donaldkg commented Dec 8, 2020

Description

When using gatsby-source-contentful with proxy, I cannot get passed load plugins. It runs for a while and returns a timeout error.

Steps to reproduce

  1. Run npm run build behind proxy

Expected result

It should be able to build.

Actual result

The build process is stuck in load plugins

Environment

System:
OS: Linux 3.10 Red Hat Enterprise Linux Server 7.6 (Maipo)
CPU: (2) x64 Intel(R) Xeon(R) CPU E5-26xx v4
Shell: 4.2.46 - /bin/bash
Binaries:
Node: 12.18.3 - /bin/node
npm: 6.14.6 - /bin/npm
Languages:
Python: 2.7.5 - /bin/python
npmPackages:
gatsby: ^2.26.1 => 2.28.1
gatsby-image: ^2.7.0 => 2.7.0
gatsby-plugin-canonical-urls: ^2.6.0 => 2.6.0
gatsby-plugin-google-analytics: ^2.7.0 => 2.7.0
gatsby-plugin-google-tagmanager: ^2.8.0 => 2.8.0
gatsby-plugin-intl: ^0.3.3 => 0.3.3
gatsby-plugin-manifest: ^2.8.0 => 2.8.0
gatsby-plugin-react-helmet: ^3.6.0 => 3.6.0
gatsby-plugin-react-svg: ^3.0.0 => 3.0.0
gatsby-plugin-sharp: ^2.10.0 => 2.10.1
gatsby-plugin-sitemap: ^2.8.0 => 2.8.0
gatsby-plugin-styled-components: ^3.6.0 => 3.6.0
gatsby-source-contentful: ^2.3.52 => 2.3.56
gatsby-source-filesystem: ^2.7.0 => 2.7.0
gatsby-transformer-remark: ^2.12.0 => 2.12.0
gatsby-transformer-sharp: ^2.8.0 => 2.8.0

@donaldkg donaldkg added the type: bug An issue or pull request relating to a bug in Gatsby label Dec 8, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 8, 2020
@donaldkg
Copy link
Author

donaldkg commented Dec 8, 2020

I suspect that validateContentfulAccess function misses to pass proxy options in fetch in gatsby-node.js file.

@donaldkg donaldkg changed the title Stuck in load plugins in gatsby-source-contentful when using proxy [gatsby-source-contentful] Stuck at load plugins when using proxy Dec 10, 2020
@LekoArts LekoArts added topic: source-contentful Related to Gatsby's integration with Contentful and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 14, 2020
@DSchau
Copy link
Contributor

DSchau commented Dec 14, 2020

@donaldkg can you share your particular set up or how the plugin is configured? (https://gatsby.dev/reproduction)

My suspicion is you're probably correct, but it's hard to know that until there's something for us to review!

@donaldkg
Copy link
Author

@DSchau Thanks for your reply. I have provided the environment above. To reproduce, just run gatsby build with downloadLocal set to true.

@donaldkg
Copy link
Author

I finally use global-agent to solve the problem. I put require('global-agent/bootstrap'); in gatsby-config.js and setting the environment variable GLOBAL_AGENT_HTTP_PROXY. It seems that all the api call from Contentful can use the proxy defined in the variable.

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jan 18, 2021
@github-actions
Copy link

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

@philicious
Copy link

/reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. topic: source-contentful Related to Gatsby's integration with Contentful type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants