Web view not working, persitent issue

’ Hmm… We couldn’t reach this Repl

Make sure this Repl has a port open and is ready to receive HTTP traffic. ’

This error has been coming up endlessy for a few weeks, its not to do with my code as it appears randomly, I’ve tried on different networks - still seems to randomly occur.
I thought the solution was to just fork your repl, and it seemed to work for just around a week, however now that doesnt resolve it either


@app.route('/')
def LandingPage(): 
    return render_template('LandingPage.html')


global ListOfHours

@app.route('/test')
def TestPage():
  GraphData = ListOfHours
  Top15artists = Top15Artist()
  return render_template('test.html', Top15Artist = Top15artists, ListxData = GraphData )

@app.route('/home')
def HomePage():
  return render_template('HomePage.html')

@app.route('/results')
def ResultsPage():
  return render_template('ResultsPage.html')

@app.route('/signup')
def SignUp():
  return render_template('signup.html')

@app.route('/signup', methods = ['POST'])
def SigningUp():
  username = request.form['username']
  password = request.form['password']
  # print(username)
  # print(password)
  UserResult = UserSignUp(username, password)
  if UserResult == 'signed up successfully':
    # add username as a cookie ( session )
    session['username'] = username
    return redirect("/home")
  else:
    return redirect("/signup")

app.run(host='0.0.0.0', port=5000, debug=True)
1 Like

Hello @RoniOusi, welcome to Replit Ask!
The error is that you put app.secret_key before app = Flask(__name__).
I hope this helps!

Hi so I put it after but nothings seemed to change, is there someplace specifc it should go ?

Have you looked at the errors? I’m afraid that no one on Replit Ask will look through 800+ lines of code, but try posting a bounty instead.

there are no erros in my console regardining that issue but when inspecting the web page these are the errors:
Default levels

No issues

/favicon.ico:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway)

cc900e6a-ca4d-4c55-a….kirk.replit.dev/:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway)

Hey @RoniOusi!

Try removing debug=True from your app.run call.

hi, unfortunatly didnt work

Hi @RoniOusi, did you ever manage to fix this? I’ve got the same issue with my very first Repl and am completely lost. I get the same message on the webpage, but in the Networking tab I also see this:

No web server is currently running with ports available to view. Try running your Repl, and check the Networking tool to ensure ports are being forwarded correctly.

I haven’t changed anything so I’ve no idea how it’s suddenly broken.