this is due to your decorators order
@jwt_required
@app.route('/test')
def test():
return "Hello"
will return in the same Runtime error
you have to call get_current_user() after token is extracted and decoded by jwt_extended lib. a working example here Implementing roles with Flask-JWT-Extended