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

Handling 301 "Moved Permanently" redirects? #143

Open
lancejpollard opened this issue Dec 31, 2013 · 16 comments
Open

Handling 301 "Moved Permanently" redirects? #143

lancejpollard opened this issue Dec 31, 2013 · 16 comments
Labels

Comments

@lancejpollard
Copy link
Contributor

If you change the name of your repo, or move it to a different organization, GitHub still allows that URL to work which is nice if you have projects referencing the old repo location. But component fails in this case because it doesn't seem to handle the 301 redirect.

What do you think about adding support for 301 redirects, so this error doesn't occur?

  error : failed to fetch https://raw.github.com/user/repo/master/index.js, got 301 "Moved Permanently"

The reason is, even if I were to update all my projects referencing the old repo location so they pointed to the new location, if anyone was going to try to install/build in the middle of that process, it would fail.

By adding support for 301 redirects, you could be more relaxed about it.

Thoughts?

@jonathanong
Copy link
Contributor

once we have a registry, the registry should be able to handle this. i'll be sure to fix this on or before component v1 because i want to move stuff to the component org

@gvilarino
Copy link

Is there any suggested quick workaround for this? My apps are crashing :(

@enggmind
Copy link

Getting this error while installing nodejs-starter, the same 301 redirect issue.
Installing components...

 install : visionmedia/page.js@master
 install : component/domify@master
 install : visionmedia/jade@master
 install : yields/empty@master
 install : component/emitter@master
 install : visionmedia/superagent@master


   error : failed to fetch https://raw.github.com/visionmedia/page.js/master/index.js, got 301 "Moved Permanently"

{ [Error: Command failed: error : failed to fetch https://raw.github.com/visionmedia/page.js/master/index.js, got 301 "Moved Permanently"
] killed: false, code: 1, signal: null }
make: *** [components] Error 1

@gvilarino
Copy link

Ok, with big help from @cristiandouce we found a workaround for this:

  • Update component dependency version in package.json from ~0.19.5 to ~0.19.8
  • Add the following remotes to my root component.json:
"remotes": [
    "https://raw.githubusercontent.com",
    "https://cdn.rawgit.com",
    "https://rawgit.com"
  ]

The component build process now takes a bit longer but it stopped failing (and my apps are now back up!).

@fredsterss
Copy link

@gvilarino 👍 also this was happening for random non-versioned components, eg. component/event

@gvilarino
Copy link

@fredsterss :( we've had several problems with non-versioned components in the past, so in DemocracyOS we ended up pinning the version of every single component dependency.

@fredsterss
Copy link

Oh man. Core component devs, why oh why did you ruin component in v1? 👎 😢. Everything about component was carefully considered, with a focused eye on building production apps. It seems like a lot of the great decisions and low barriers to entry in pre-1.0 is kind of getting fucked. I say this as someone who has components deployed across 4 production apps, and who has had to spend at least 10 hrs since 1.0 trouble-shooting various parts of the component builder and ecosystem.

Guys, we want you to do better because we love component. I realize that complaining here is kind of bs, but as a longish-time user it really feels like you're dropping the ball.

@azhang
Copy link

azhang commented Apr 29, 2014

I've been using component builder2 for a few weeks now, and after initially spending a day or two setting it up and building a few custom builder plugins, it seems MUCH more stable and consistent than < v1. Obviously new bugs are going to be created with a major change, but from what I've seen, the new project architecture makes things a lot clearer and thus easier to debug. For me, there was a lower barrier to entry because plugins are also a lot easier to write for v1.
If this new version isn't production ready enough for you, why not stick with the older version until v1 is ready?

@fredsterss
Copy link

Yeah I guess this rant was really in the wrong place, I'm thinking about
the user experience of install and build, two of the most common commands
id guess.

On Monday, April 28, 2014, aaronz8 [email protected] wrote:

I've been using component builder2 for a few weeks now, and after
initially spending a day or two setting it up and building a few custom
builder plugins, it seems MUCH more stable and consistent than < v1.
Obviously new bugs are going to be created with a major change, but from
what I've seen, the new project architecture makes things a lot clearer and
thus easier to debug. For me, there was a lower barrier to entry because
plugins are also a lot easier to write for v1.
If this new version isn't production ready enough for you, why not stick
with the older version until v1 is ready?


Reply to this email directly or view it on GitHubhttps://github.com//issues/143#issuecomment-41639367
.

Fred Stevens-Smith

+1-650-526-8703

co-founder, rainforestqa.com/

@timoxley
Copy link
Contributor

It seems like a lot of the great decisions and low barriers to entry in pre-1.0 is kind of getting fucked.

@fredsterss this is terribly vague. If you can't be more specific about what changes you classify as "fucked" how is anyone to avoid making such changes in the future?

@fredsterss
Copy link

Agreed - feel free to delete my comments, on the go right now but will
write exactly what I mean rather than just a rant when I'm home.

On Monday, April 28, 2014, Tim Oxley [email protected] wrote:

It seems like a lot of the great decisions and low barriers to entry in
pre-1.0 is kind of getting fucked.

@fredsterss https://github.com/fredsterss this is terribly vague. If
you can't be more specific about what changes you classify as "fucked" how
is anyone to avoid making such changes in the future?


Reply to this email directly or view it on GitHubhttps://github.com//issues/143#issuecomment-41640177
.

Fred Stevens-Smith

+1-650-526-8703

co-founder, rainforestqa.com/

@timoxley
Copy link
Contributor

@fredsterss cool. you should do so in a new issue.

@fredsterss
Copy link

Will do! Thanks for being chill (unlike me :)

On Monday, April 28, 2014, Tim Oxley [email protected] wrote:

@fredsterss https://github.com/fredsterss cool. you should do so in a
new issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/143#issuecomment-41640259
.

Fred Stevens-Smith

+1-650-526-8703

co-founder, rainforestqa.com/

@jonathanong
Copy link
Contributor

yeah it's kind of a mess now =/ i'm not sure how it's worse than < 1 but for sure there are more issues, mostly with remotes

@BrunoWinck
Copy link

The good point of this discussion is that I found it easily by googling "component 301 failed to fetch" :)
Followed workaround, Updating component was enough to fix it. Didn't change the remotes.
Why not checking if a new version exists when issueing an error and issue a message suggesting users to upgrade to version xxx or check a news/regressions/bugs page.
It would help to do the right thing at once when struggling with failing setups.

@tokki
Copy link

tokki commented May 6, 2014

great!!!!!

prateekbhatt added a commit to prateekbhatt/userjoy that referenced this issue Jun 3, 2014
prateekbhatt added a commit to prateekbhatt/userjoy that referenced this issue Apr 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants