flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.55k stars 452 forks source link

flet build fail in flet-25-dev #4269

Closed imadityacoder closed 3 weeks ago

imadityacoder commented 3 weeks ago

Duplicate Check

Describe the bug

Unable to create file 'ios/Runner/Info.plist' in ubuntu.

Code sample

from flet import (
    app as RunApp,
    Page,
    Text,
    TextField,
    Theme,
    AppBar,
    Icon,
    icons,
    colors,
    NavigationBar,
    NavigationBarDestination,
    PopupMenuButton,
    IconButton,
    PopupMenuItem,
    Container,
    Row,
    Column,
    padding,
    margin,

)
import time

def main_app(page:Page):
    page.title = 'NMT Doctor'
    page.window.height = 720
    page.window.width = 345
    page.scroll = "hidden"
    page.theme_mode = 'light'
    page.theme = Theme(colors.BLUE_500)
    page.window.prevent_close = True

    appbar = AppBar(
        leading=Icon(icons.MEDICAL_INFORMATION_ROUNDED),
        leading_width=40,     
        center_title=False,
        bgcolor=colors.BLUE_50,
        title=Text('NMT Doctor',weight="w500"),
        actions=[
            PopupMenuButton(
                items=[
                    PopupMenuItem(text="Test 1"),
                    PopupMenuItem(text='Test 2'),
                ]
            ),
        ],
    )

    navbar = NavigationBar(
        bgcolor=colors.BLUE_50,
        height=55,
        destinations=[
            NavigationBarDestination(
                icon=icons.HOME_OUTLINED,
                selected_icon=icons.HOME,
                label="Home",
            ),
            NavigationBarDestination(
                icon=icons.SPACE_DASHBOARD_OUTLINED,
                selected_icon=icons.DASHBOARD_ROUNDED,
                label="Dashboard",
            ),

            NavigationBarDestination(
                icon=icons.MEDICAL_SERVICES_OUTLINED,
                selected_icon=icons.MEDICAL_SERVICES_SHARP,
                label="Services",
            ),
            NavigationBarDestination(
                icon=icons.SETTINGS_OUTLINED,
                selected_icon=icons.SETTINGS,
                label="Settings"
            ),
        ],
    )

    cont1_box=Container(
        height=82,
        bgcolor='blue',
        border_radius=10,
    )

    home_cont1_content=Column(
        controls=[],
    )

    for i in range(4):
        home_cont1_content.controls.append(cont1_box)

    home_container1 = Container(
        height=400,
        padding=padding.symmetric(20,8),
        content=home_cont1_content,
    )

    cont2_box=Container(
        height=150,
        width=150,
        bgcolor='blue',
        border_radius=10,

    )

    home_cont2_content=Row(
        controls=[],
        scroll="adaptive",

    )

    for i in range(4):
        home_cont2_content.controls.append(cont2_box)

    home_container2 = Container(
        height=180,
        padding=padding.symmetric(0,10),
        content=home_cont2_content,

        margin=margin.only(top=0)
    )

    home_page = Column(
        controls=[
            home_container1,
            Text('Top services',weight='w400',size=18),
            home_container2,
        ],

    )

    page.add(
        appbar,
        navbar,
        home_page,
        )
    page.update()

RunApp(target=main_app,assets_dir='/assets',view='flet_app')

To reproduce


(venv) aditya@adi-system:~/code playground/AppCode/test-flet-v0.25dev$ flet build apk

[10:21:00] Unable to create file 'ios/Runner/Info.plist'. Error message: 'dict object' has no attribute 'deep_linking'.       
           Context: OrderedDict({'cookiecutter': OrderedDict({'out_dir': 'flutter', 'python_module_name': 'main',             
           'project_name': 'test_flet_v025dev', 'project_name_slug': '', 'project_description': '', 'product_name':           
           'test_flet_v025dev', 'org_name': 'com.flet', 'company_name': 'Your Company', 'copyright': 'Copyright (c) 2023 Your 
           Company', 'flutter': {'dependencies': []}, 'sep': '/', 'kotlin_dir': 'com/flet/test_flet_v025dev/',                
           'hide_loading_animation': True, 'team_id': '', 'base_url': '/', 'route_url_strategy': 'path', 'web_renderer':      
           'canvaskit', 'use_color_emoji': 'false', 'split_per_abi': False, 'options': {'info_plist': {},                     
           'macos_entitlements': {'com.apple.security.app-sandbox': False, 'com.apple.security.cs.allow-jit': True,           
           'com.apple.security.network.client': True, 'com.apple.security.network.server': True}, 'android_permissions':      
           {'android.permission.INTERNET': True}, 'android_features': {'android.software.leanback': False,                    
           'android.hardware.touchscreen': False}, 'deep_linking_url': None, 'android_signing': False}, '_template':          
           'gh:flet-dev/flet-build-template', '_output_dir': '/home/aditya/code playground/AppCode/test-flet-v0.25dev/build', 
           '_repo_dir': '/home/aditya/.cookiecutters/flet-build-template', '_checkout': '0.25.0'}), '_cookiecutter':          
           {'out_dir': 'flutter', 'python_module_name': 'main', 'project_name': 'test_flet_v025dev', 'project_name_slug': '', 
           'project_description': '', 'product_name': 'test_flet_v025dev', 'org_name': 'com.flet', 'company_name': 'Your      
           Company', 'copyright': 'Copyright (c) 2023 Your Company', 'flutter': {'dependencies': []}, 'sep': '/',             
           'kotlin_dir': "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{                  
           cookiecutter.project_name }}{{ cookiecutter.sep }}", 'hide_loading_animation': True, 'team_id': '', 'base_url':    
           '/', 'route_url_strategy': 'path', 'web_renderer': 'canvaskit', 'use_color_emoji': 'false', 'split_per_abi': False,
           'options': {'info_plist': {}, 'macos_entitlements': {'com.apple.security.app-sandbox': False,                      
           'com.apple.security.cs.allow-jit': True, 'com.apple.security.network.client': True,                                
           'com.apple.security.network.server': True}, 'android_permissions': {'android.permission.INTERNET': True},          
           'android_features': {'android.software.leanback': False, 'android.hardware.touchscreen': False},                   
           'deep_linking_url': None, 'android_signing': False}}})                                                             
[10:21:03] Doctor summary (to see all details, run flutter doctor -v):                                                        
           [✓] Flutter (Channel stable, 3.24.4, on Ubuntu 24.04.1 LTS 6.8.0-41-generic, locale en_US.UTF-8)                   
           [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)                                   
           [✓] Chrome - develop for the web                                                                                   
           [✓] Linux toolchain - develop for Linux desktop                                                                    
           [✓] Android Studio (version 2024.1)                                                                                
           [✓] VS Code (version 1.94.2)                                                                                       
           [✓] Connected device (2 available)                                                                                 
           [✓] Network resources                                                                                              

           • No issues found!  

Expected behavior

No response

Screenshots / Videos

Captures [Upload media here]

Operating System

Linux

Operating system details

Ubuntu 23.04.1LTS

Flet version

flet-0.25.0.dev3519

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

Logs ```console (venv) aditya@adi-system:~/code playground/AppCode/test-flet-v0.25dev$ flet build apk [10:21:00] Unable to create file 'ios/Runner/Info.plist'. Error message: 'dict object' has no attribute 'deep_linking'. Context: OrderedDict({'cookiecutter': OrderedDict({'out_dir': 'flutter', 'python_module_name': 'main', 'project_name': 'test_flet_v025dev', 'project_name_slug': '', 'project_description': '', 'product_name': 'test_flet_v025dev', 'org_name': 'com.flet', 'company_name': 'Your Company', 'copyright': 'Copyright (c) 2023 Your Company', 'flutter': {'dependencies': []}, 'sep': '/', 'kotlin_dir': 'com/flet/test_flet_v025dev/', 'hide_loading_animation': True, 'team_id': '', 'base_url': '/', 'route_url_strategy': 'path', 'web_renderer': 'canvaskit', 'use_color_emoji': 'false', 'split_per_abi': False, 'options': {'info_plist': {}, 'macos_entitlements': {'com.apple.security.app-sandbox': False, 'com.apple.security.cs.allow-jit': True, 'com.apple.security.network.client': True, 'com.apple.security.network.server': True}, 'android_permissions': {'android.permission.INTERNET': True}, 'android_features': {'android.software.leanback': False, 'android.hardware.touchscreen': False}, 'deep_linking_url': None, 'android_signing': False}, '_template': 'gh:flet-dev/flet-build-template', '_output_dir': '/home/aditya/code playground/AppCode/test-flet-v0.25dev/build', '_repo_dir': '/home/aditya/.cookiecutters/flet-build-template', '_checkout': '0.25.0'}), '_cookiecutter': {'out_dir': 'flutter', 'python_module_name': 'main', 'project_name': 'test_flet_v025dev', 'project_name_slug': '', 'project_description': '', 'product_name': 'test_flet_v025dev', 'org_name': 'com.flet', 'company_name': 'Your Company', 'copyright': 'Copyright (c) 2023 Your Company', 'flutter': {'dependencies': []}, 'sep': '/', 'kotlin_dir': "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{ cookiecutter.project_name }}{{ cookiecutter.sep }}", 'hide_loading_animation': True, 'team_id': '', 'base_url': '/', 'route_url_strategy': 'path', 'web_renderer': 'canvaskit', 'use_color_emoji': 'false', 'split_per_abi': False, 'options': {'info_plist': {}, 'macos_entitlements': {'com.apple.security.app-sandbox': False, 'com.apple.security.cs.allow-jit': True, 'com.apple.security.network.client': True, 'com.apple.security.network.server': True}, 'android_permissions': {'android.permission.INTERNET': True}, 'android_features': {'android.software.leanback': False, 'android.hardware.touchscreen': False}, 'deep_linking_url': None, 'android_signing': False}}}) [10:21:03] Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.4, on Ubuntu 24.04.1 LTS 6.8.0-41-generic, locale en_US.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio (version 2024.1) [✓] VS Code (version 1.94.2) [✓] Connected device (2 available) [✓] Network resources • No issues found! ```

Additional details

No response

ndonkoHenri commented 3 weeks ago

Make use of flet==0.25.0.dev3526 minimum.

imadityacoder commented 3 weeks ago

Make use of flet==0.25.0.dev3526 minimum.

I can't understood!

ndonkoHenri commented 3 weeks ago

You need to modify the Flet version in your requirements to at least flet==0.25.0.dev3526.