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

Python/flask macOS doesn't load #3052

Open
aviramha opened this issue Feb 3, 2025 · 1 comment
Open

Python/flask macOS doesn't load #3052

aviramha opened this issue Feb 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@aviramha
Copy link
Member

aviramha commented Feb 3, 2025

Bug Description

Running the Python app leads to the app running but without layer loaded to it.

Steps to Reproduce

  1. Create script file (server.py)
from flask import Flask, request

app = Flask(__name__)

@app.route('/', methods=['GET', 'POST'])
def index():
    # Print request path
    print(f"Request path: {request.path}")

    # Print request headers
    print("Headers:")
    for header, value in request.headers:
        print(f"{header}: {value}")

    # Print request body if present
    if request.data:
        print("Body:")
        print(request.data.decode('utf-8'))

    return "Request received", 200

if __name__ == "__main__":
    # app.run(host='0.0.0.0', port=9313, ssl_context=('cert.pem', 'key.pem'))
    app.run(host='0.0.0.0', port=9313)
  1. mirrord exec -t deployment/lala -- python server.py

Backtrace

mirrord layer logs

mirrord intproxy logs

mirrord agent logs

mirrord config

mirrord CLI version

3.131.2

mirrord-agent version

No response

mirrord-operator version (if relevant)

No response

plugin kind and version (if relevant)

No response

Your operating system and version

macos sequoia 15.2 Darwin 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000 x86_64 i386 Darwin

Local process

Python

Local process version

3.9.16 from pyenv

Additional Info

Flask 3.1.0

@aviramha aviramha added the bug Something isn't working label Feb 3, 2025
Copy link

linear bot commented Feb 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant