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

On-premise Works when compiling the apk doesn't work #4513

Open
1 task done
fckfck97 opened this issue Dec 6, 2024 · 0 comments
Open
1 task done

On-premise Works when compiling the apk doesn't work #4513

fckfck97 opened this issue Dec 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fckfck97
Copy link

fckfck97 commented Dec 6, 2024

Duplicate Check

Describe the bug

I'm compiling the apk to use google login with the provider
if name == "main":
ft.app(target=main, port=8550,view=ft. WEB_BROWSER,assets_dir="assets")
When I place the port and the view I compile the apk and it doesn't work if I use page.launch_url to call a URL when compiling the URL doesn't call me but when using flet run or flet run --android it does work

Code sample

Code
API_URL = "http://localhost:8000/auth/o/google-oauth2"
    REDIRECT_URI = "http://localhost:8550/oauth_callback"

    def redirect_to_google_login(e):
        try:
            # Llamada al backend para obtener la URL de autenticación
            response = requests.get(f"{API_URL}/?redirect_uri={REDIRECT_URI}")
            response.raise_for_status()
            authorization_url = response.json().get("authorization_url")
            if authorization_url:
                # Abrir la URL en el navegador predeterminado
                page.launch_url(authorization_url)
            else:
                print("Error: No se pudo obtener la URL de autorización.")
        except requests.RequestException as err:
            print(f"Error al obtener la URL: {err}")

To reproduce

White screen using the Google provider and using the page.launch_url the URL does not run

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

macOS

Operating system details

Versión 15.1.1 (24B91)

Flet version

0.25.1

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

@ndonkoHenri ndonkoHenri added the bug Something isn't working label Dec 7, 2024
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

2 participants