gitpod icon indicating copy to clipboard operation
gitpod copied to clipboard

Flask redirects timing out in workspaces

Open kevin-ci opened this issue 5 years ago • 24 comments

Bug description

Flask redirects have started to time out where they never did before.

The terminal returns the expected HTTP status: 10.108.6.13 - - [30/Apr/2021 14:09:51] "GET / HTTP/1.1" 302 -

But the subsequent page never loads: image

I have verified that MWE code provided works locally, so it's definitely a Gitpod issue of some sort.

Happens in Firefox and Chrome, whether the port is public and private.

Steps to reproduce

I've made a MWE here which reproduces the bug: https://gitpod.io#snapshot/08d4d0b3-bda6-42c0-8ce7-6ebba850b8c5

Run the command: python3 app.py

Then open the port that is exposed in a browser.

Expected behavior

In the MWE, you should be redirected to a route which says Hello World. This times out.

Example repository

https://gitpod.io#snapshot/08d4d0b3-bda6-42c0-8ce7-6ebba850b8c5

Anything else?

No response

kevin-ci avatar Apr 30 '21 14:04 kevin-ci

I am also experiencing this issue

farrelleoin93 avatar Apr 30 '21 14:04 farrelleoin93

I am also experiencing this issue since today

thaysom22 avatar Apr 30 '21 14:04 thaysom22

I am having the same issue. When I go to test if a username is already in use, this times out but when I go back, the flash message appears and everything works fine.

I am struggling to even get onto my workspace with my env.py at the moment. it just says allocating resources forever...

marcusnolan avatar Apr 30 '21 14:04 marcusnolan

I'm having the same issue guys. I've been going around circles thinking I'm doing something wrong for hours!

Boki136 avatar Apr 30 '21 14:04 Boki136

having the same issue, I'm using to test the delete functionality on a id and when I go back receive the message saying that the record was deleted but not the correct record either and was working fine before

NunoCos avatar Apr 30 '21 16:04 NunoCos

Same issue here. I've been trying to fix it thinking it was something I'd done wrong for hours. It was all fine yesterday morning

SiobhanBaines avatar Apr 30 '21 17:04 SiobhanBaines

Hi All,

Are there any updates on this issue? ETA?

Boki136 avatar Apr 30 '21 20:04 Boki136

Running into the same issue!

Any kind of workaround at least?

Thanks

arturmpinho avatar Apr 30 '21 20:04 arturmpinho

same problem here!

lisa1Q84 avatar May 01 '21 10:05 lisa1Q84

Experiencing the same issue here.

LiamGaff avatar May 01 '21 10:05 LiamGaff

Experiencing the same problem since this morning.

Nazulka avatar May 01 '21 14:05 Nazulka

I am experiencing the same issue

elomasney avatar May 01 '21 14:05 elomasney

@jankeromnes @JanKoehnlein Any movement on this, please? This is another breaking issue that is affecting all of our students.

lechien73 avatar May 01 '21 17:05 lechien73

I am not sure why, but the redirect seems to use http instead of https. The workaround is to redirect using _external=True, _scheme='https'

    return redirect(url_for('hello', _external=True, _scheme='https'))

We should find out on Monday why this happens now.

JanKoehnlein avatar May 01 '21 19:05 JanKoehnlein

We've also been experiencing similar issues since ~Wednesday. It appears additional redirects are being added? If so, it's causing CSRF problems, SSL problems with https is being routed through http, etc.

raghubetina avatar May 01 '21 20:05 raghubetina

Thanks for that @JanKoehnlein :)

kevin-ci avatar May 01 '21 20:05 kevin-ci

Thanks, @JanKoehnlein, this helps a lot :)

Boki136 avatar May 01 '21 21:05 Boki136

I'm seeing a similar issue with https://github.com/shaal/ddev-gitpod Pages load as http instead of https, which results in an unreachable page.

shaal avatar May 02 '21 01:05 shaal

Issue still present in some workspaces, e.g. https://bronze-sturgeon-4xfx1lkf.ws-eu04.gitpod.io/#/workspace/3rdMilestoneProject

bravoalpha79 avatar May 02 '21 09:05 bravoalpha79

Issue still present in some workspaces, e.g. https://bronze-sturgeon-4xfx1lkf.ws-eu04.gitpod.io/#/workspace/3rdMilestoneProject

@bravoalpha79 Anywhere the student is using redirect, have them add this bit of code:

https://github.com/gitpod-io/gitpod/issues/4124#issuecomment-830685348 return redirect(url_for('hello', _external=True, _scheme='https'))

Works fine for all students I'm assisting thus far as a temporary workaround.

TravelTimN avatar May 02 '21 09:05 TravelTimN