Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error message while executing 'briefcase run': Application quit abnormally (Exit code -1)! #1009

Closed
iyu98 opened this issue Dec 16, 2022 · 5 comments
Labels
bug A crash or error in behavior.

Comments

@iyu98
Copy link

iyu98 commented Dec 16, 2022

Describe the bug

I got a run error when I used 'briefcase run' to run my packaged app. and, I don't know what caused it.

Steps to reproduce

I run 'briefcase dev' to start normally.

It's normal for me to run 'build':
image

When I run 'briefcase run' something goes wrong

Expected behavior

Hope to be able to learn how to find this mistake.

Screenshots

No response

Environment

  • Operating System: macOS Monterey 12.5.1
  • Python version: 3.9.16
  • Software versions:
    • Briefcase: 0.3.11
    • Toga: 0.3.0.dev39
    • wxPython: 4.2.0
    • pytube: 12.1.0

Logs

Briefcase is no longer using the data directory:

    /Users/yuxiaoyu/.briefcase

This directory can be safely deleted.

[DownloadTube] Starting app...

[DownloadTube] Following system log output (type CTRL-C to stop log)...
===========================================================================
Filtering the log data using "senderImagePath == "/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/MacOS/DownloadOne" OR (processImagePath == "/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/MacOS/DownloadOne" AND senderImagePath == "/usr/lib/libffi.dylib")"
Timestamp               Ty Process[PID:TID]
2022-12-16 16:39:29.572 Df DownloadOne[48135:11e535d] Configuring isolated Python...
2022-12-16 16:39:29.574 Df DownloadOne[48135:11e535d] PythonHome: /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/Resources/support/python-stdlib
2022-12-16 16:39:29.585 Df DownloadOne[48135:11e535d] PYTHONPATH:
2022-12-16 16:39:29.585 Df DownloadOne[48135:11e535d] - /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/Resources/support/python39.zip
2022-12-16 16:39:29.586 Df DownloadOne[48135:11e535d] - /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/Resources/support/python-stdlib
2022-12-16 16:39:29.586 Df DownloadOne[48135:11e535d] - /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/Resources/support/python-stdlib/lib-dynload
2022-12-16 16:39:29.586 Df DownloadOne[48135:11e535d] - /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/Resources/app_packages
2022-12-16 16:39:29.586 Df DownloadOne[48135:11e535d] - /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/macOS/app/DownloadOne/DownloadOne.app/Contents/Resources/app
2022-12-16 16:39:29.586 Df DownloadOne[48135:11e535d] Configure argc/argv...
2022-12-16 16:39:29.586 Df DownloadOne[48135:11e535d] Initializing Python runtime...
2022-12-16 16:39:29.669 Df DownloadOne[48135:11e535d] No Python NSLog handler found. stdout/stderr will not be captured.
2022-12-16 16:39:29.669 Df DownloadOne[48135:11e535d] To capture stdout/stderr, add 'std-nslog' to your app dependencies.
2022-12-16 16:39:29.669 Df DownloadOne[48135:11e535d] Running app module: DownloadTube
2022-12-16 16:39:29.830 Df DownloadOne[48135:11e535d] Application quit abnormally (Exit code -1)!

Additional context

No response

@iyu98 iyu98 added the bug A crash or error in behavior. label Dec 16, 2022
@iyu98
Copy link
Author

iyu98 commented Dec 16, 2022

I seem to have solved the problem. According to the prompt in the log,'To capture stdout/stderr, add 'std-nslog' to your app dependencies.' Add it to the ‘pyproject.toml’ file and you can run it.

image

@iyu98
Copy link
Author

iyu98 commented Dec 16, 2022

But I encountered a new problem when I packaged it as .exe.

cmd log:

Log saved to /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/logs/briefcase.2022_12_16-17_10_16.build.log

Traceback (most recent call last):
  File "/usr/local/bin/briefcase", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/briefcase/__main__.py", line 21, in main
    command(**options)
  File "/usr/local/lib/python3.9/site-packages/briefcase/commands/build.py", line 60, in __call__
    state = self._build_app(
  File "/usr/local/lib/python3.9/site-packages/briefcase/commands/build.py", line 41, in _build_app
    state = self.build_app(app, **full_options(state, options))
  File "/usr/local/lib/python3.9/site-packages/briefcase/platforms/windows/app.py", line 52, in build_app
    self.tools.subprocess.run(
  File "/usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py", line 127, in inner
    return sub_method(sub, args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py", line 284, in run
    return self._run_and_stream_output(args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py", line 342, in _run_and_stream_output
    with self.Popen(args, **kwargs) as process:
  File "/usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py", line 435, in Popen
    return self._subprocess.Popen(
  File "/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'

And
This is '/logs/briefcase.2022_12_16-17_10_16.build.log'

Date/Time:       2022-12-16 17:10:16 
Command line:    /usr/local/bin/briefcase build windows

OS Release:      Darwin 21.6.0
OS Version:      Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64
Architecture:    x86_64
Platform:        macOS-12.5.1-x86_64-i386-64bit

Python exe:      /usr/local/opt/python@3.9/bin/python3.9
Python version:  3.9.16 (main, Dec  7 2022, 10:15:43)  [Clang 14.0.0 (clang-1400.0.29.202)]
Virtual env:     False
Conda env:       False

Briefcase:       0.3.11
Target platform: windows
Target format:   app

Environment Variables:
    ANDROID_SDK=/Users/yuxiaoyu/Desktop/assets/android-sdk/tools
    COLORTERM=truecolor
    COMMAND_MODE=unix2003
    CONDA_CHANGEPS1=false
    HOME=/Users/yuxiaoyu
    HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
    HOMEBREW_GITHUB_API_TOKEN=********************
    JAVA_15_HOME=/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home
    JAVA_17_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
    JAVA_8_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
    LC_CTYPE=UTF-8
    LESS=-R
    LOGNAME=yuxiaoyu
    LSCOLORS=Gxfxcxdxbxegedabagacad
    NVM_DIR=/Users/yuxiaoyu/.nvm
    OLDPWD=/Users/yuxiaoyu/Desktop/demos/brieface/beeware
    PAGER=less
    PATH=/Users/yuxiaoyu/Desktop/demos/brieface/beeware/beeware-venv/bin:/Users/yuxiaoyu/.pyenv/shims:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/aria2/bin:/Library/Apple/usr/bin
    PS1=(beeware-venv) 
%{�[1m�[34m%}#%{�[00m%} %(#,%{�[43m%}%{�[30m%}%n%{�[00m%},%{�[36m%}%n) %{�[00m%}@ %{�[32m%}%m %{�[00m%}in %{�[1m�[33m%}%~%{�[00m%}$(ys_hg_prompt_info)$(git_prompt_info)$(svn_prompt_info)$(virtenv_prompt) [%*] %(?,,C:%{�[31m%}%?%{�[00m%})
%{�[1m�[31m%}$ %{�[00m%}
    PWD=/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube
    SHELL=/bin/zsh
    SHLVL=2
    SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.eUocTDUmIs/Listeners
    TERM=xterm-256color
    TERM_PROGRAM=WarpTerminal
    TERM_PROGRAM_VERSION=v0.2022.11.29.08.03.stable_03
    TMPDIR=/var/folders/dd/9bp7fy0x39s39jt5pvd9gr300000gn/T/
    USER=yuxiaoyu
    VIRTUAL_ENV=/Users/yuxiaoyu/Desktop/demos/brieface/beeware/beeware-venv
    WARP_IS_LOCAL_SHELL_SESSION=1
    WARP_PS1=%{�]133;A�%}(beeware-venv) 
%{�[1m�[34m%}#%{�[00m%} %(#,%{�[43m%}%{�[30m%}%n%{�[00m%},%{�[36m%}%n) %{�[00m%}@ %{�[32m%}%m %{�[00m%}in %{�[1m�[33m%}%~%{�[00m%}$(ys_hg_prompt_info)$(git_prompt_info)$(svn_prompt_info)$(virtenv_prompt) [%*] %(?,,C:%{�[31m%}%?%{�[00m%})
%{�[1m�[31m%}$ %{�[00m%}%{�]133;B�%}
    WARP_USE_SSH_WRAPPER=1
    XPC_FLAGS=0x0
    XPC_SERVICE_NAME=0
    ZSH=/Users/yuxiaoyu/.oh-my-zsh
    _=/usr/local/bin/briefcase
    __CFBundleIdentifier=dev.warp.Warp-Stable
    __CF_USER_TEXT_ENCODING=0x1F5:0x19:0x34
    buildgis=/Users/yuxiaoyu/Desktop/file/scripts/build.sh

Briefcase Log:
[17:09:46] Briefcase is no longer using the data directory:                                                                                                              base.py:180
                                                                                                                                                                         base.py:180
               /Users/yuxiaoyu/.briefcase                                                                                                                                base.py:180
                                                                                                                                                                         base.py:180
           This directory can be safely deleted.                                                                                                                         base.py:180
                                                                                                                                                                       create.py:746
           [DownloadTube] Generating application template...                                                                                                           create.py:746
           Assigning DownloadTube an application GUID of c76567b7-6731-5599-b123-fe31a94d4ae1                                                                         __init__.py:61
           Using app template: https://github.com/beeware/briefcase-windows-app-template.git, branch v0.3.11                                                           create.py:283
[17:09:49] Using existing template (sha 1af3081cbe8ac48e04972d64cecab04487f78ff5, updated Tue Nov  1 12:56:54 2022)                                                      base.py:678
                                                                                                                                                                       create.py:749
           [DownloadTube] Installing support package...                                                                                                                create.py:749
           Using support package https://www.python.org/ftp/python/3.9.13/python-3.9.13-embed-amd64.zip                                                                create.py:377
[17:09:51] python-3.9.13-embed-amd64.zip already downloaded                                                                                                           download.py:75
           Unpacking support package... done                                                                                                                           create.py:320
                                                                                                                                                                       create.py:756
           [DownloadTube] Installing dependencies...                                                                                                                   create.py:756
                                                                                                                                                                   subprocess.py:516
           >>> Running Command:                                                                                                                                    subprocess.py:517
           >>>     /usr/local/opt/python@3.9/bin/python3.9 -u -m pip install --upgrade --no-user                                                                   subprocess.py:518
           --target=/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne/src/app_packages 'wxPython>=4.2.0' 'pytube>=12.1.0'                         
           'std-nslog~=1.0.0' 'toga-winforms>=0.3.0.dev38'                                                                                                                          
           >>> Working Directory:                                                                                                                                  subprocess.py:525
           >>>     /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube                                                                                     subprocess.py:526
           >>> Environment Overrides:                                                                                                                              subprocess.py:535
           >>>     PYTHONPATH=/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne/src/platform-site                                subprocess.py:537
[17:09:52] Looking in indexes: https://pypi.Python.org/simple/                                                                                                     subprocess.py:495
[17:09:55] Collecting wxPython>=4.2.0                                                                                                                              subprocess.py:495
             Using cached wxPython-4.2.0-cp39-cp39-macosx_10_10_universal2.whl (31.4 MB)                                                                           subprocess.py:495
[17:09:57] Collecting pytube>=12.1.0                                                                                                                               subprocess.py:495
             Using cached pytube-12.1.0-py3-none-any.whl (56 kB)                                                                                                   subprocess.py:495
[17:09:58] Collecting std-nslog~=1.0.0                                                                                                                             subprocess.py:495
             Using cached std_nslog-1.0.3-py3-none-any.whl (4.8 kB)                                                                                                subprocess.py:495
[17:09:59] Collecting toga-winforms>=0.3.0.dev38                                                                                                                   subprocess.py:495
             Using cached toga_winforms-0.3.0.dev39-py3-none-any.whl (329 kB)                                                                                      subprocess.py:495
[17:10:01] Collecting numpy                                                                                                                                        subprocess.py:495
             Using cached numpy-1.23.5-cp39-cp39-macosx_10_9_x86_64.whl (18.1 MB)                                                                                  subprocess.py:495
[17:10:03] Collecting pillow                                                                                                                                       subprocess.py:495
             Using cached Pillow-9.3.0-cp39-cp39-macosx_10_10_x86_64.whl (3.3 MB)                                                                                  subprocess.py:495
[17:10:04] Collecting six                                                                                                                                          subprocess.py:495
             Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)                                                                                                  subprocess.py:495
[17:10:05] Collecting toga-core==0.3.0.dev39                                                                                                                       subprocess.py:495
             Using cached toga_core-0.3.0.dev39-py3-none-any.whl (496 kB)                                                                                          subprocess.py:495
[17:10:06] Collecting pythonnet>=3.0.0a1                                                                                                                           subprocess.py:495
             Using cached pythonnet-3.0.1-py3-none-any.whl (284 kB)                                                                                                subprocess.py:495
[17:10:07] Collecting travertino>=0.1.3                                                                                                                            subprocess.py:495
             Using cached travertino-0.1.3-py3-none-any.whl (15 kB)                                                                                                subprocess.py:495
[17:10:08] Collecting clr-loader<0.3.0,>=0.2.2                                                                                                                     subprocess.py:495
             Using cached clr_loader-0.2.4-py3-none-any.whl (50 kB)                                                                                                subprocess.py:495
[17:10:09] Collecting cffi>=1.13                                                                                                                                   subprocess.py:495
             Using cached cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl (179 kB)                                                                                    subprocess.py:495
[17:10:10] Collecting pycparser                                                                                                                                    subprocess.py:495
             Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)                                                                                             subprocess.py:495
           Installing collected packages: travertino, std-nslog, six, pytube, pycparser, pillow, numpy, wxPython, toga-core, cffi, clr-loader, pythonnet,          subprocess.py:495
           toga-winforms                                                                                                                                                            
[17:10:15] Successfully installed cffi-1.15.1 clr-loader-0.2.4 numpy-1.23.5 pillow-9.3.0 pycparser-2.21 pythonnet-3.0.1 pytube-12.1.0 six-1.16.0 std-nslog-1.0.3   subprocess.py:495
           toga-core-0.3.0.dev39 toga-winforms-0.3.0.dev39 travertino-0.1.3 wxPython-4.2.0                                                                                          
[17:10:16] >>> Return code: 0                                                                                                                                      subprocess.py:553
           Installing app dependencies... done                                                                                                                         create.py:497
                                                                                                                                                                       create.py:759
           [DownloadTube] Installing application code...                                                                                                               create.py:759
           Installing src/DownloadTube... done                                                                                                                         create.py:552
                                                                                                                                                                       create.py:762
           [DownloadTube] Installing application resources...                                                                                                          create.py:762
           Installing src/DownloadTube/resources/DownloadTube.ico as application icon... done                                                                          create.py:625
                                                                                                                                                                       create.py:765
           [DownloadTube] Removing unneeded app content...                                                                                                             create.py:765
           No app content clean up required.                                                                                                                           create.py:722
                                                                                                                                                                       create.py:768
           [DownloadTube] Created windows/app/DownloadOne                                                                                                              create.py:768
                                                                                                                                                                           app.py:48
           [DownloadTube] Building App...                                                                                                                                  app.py:48
                                                                                                                                                                   subprocess.py:516
           >>> Running Command:                                                                                                                                    subprocess.py:517
           >>>     /Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe src/DownloadOne.exe --set-version-string CompanyName Yaohang          subprocess.py:518
           --set-version-string FileDescription DownloadOne --set-version-string FileVersion 0.0.1 --set-version-string InternalName DownloadTube                                   
           --set-version-string OriginalFilename DownloadOne.exe --set-version-string ProductName DownloadOne --set-version-string ProductVersion 0.0.1 --set-icon                  
           icon.ico                                                                                                                                                                 
           >>> Working Directory:                                                                                                                                  subprocess.py:525
           >>>     /Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne                                                             subprocess.py:526
           Setting stub app details...                                                                                                                                     app.py:87

╭─────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────╮
│ /usr/local/lib/python3.9/site-packages/briefcase/__main__.py:21 in main                                                                                                          │
│                                                                                                                                                                                  │
│   18 │   │   options = command.parse_options(extra=extra_cmdline)                                                                                                                │
│   19 │   │   command.check_obsolete_data_dir()                                                                                                                                   │
│   20 │   │   command.parse_config(Path.cwd() / "pyproject.toml")                                                                                                                 │
│ ❱ 21 │   │   command(**options)                                                                                                                                                  │
│   22 │   except HelpText as e:                                                                                                                                                   │
│   23 │   │   logger.info()                                                                                                                                                       │
│   24 │   │   logger.info(str(e))                                                                                                                                                 │
│                                                                                                                                                                                  │
│ ╭──────────────────────────────────────────── locals ────────────────────────────────────────────╮                                                                               │
│ │       command = <briefcase.platforms.windows.app.WindowsAppBuildCommand object at 0x105083dc0> │                                                                               │
│ │       Command = <class 'briefcase.platforms.windows.app.WindowsAppBuildCommand'>               │                                                                               │
│ │       console = <briefcase.console.Console object at 0x105197a60>                              │                                                                               │
│ │ extra_cmdline = []                                                                             │                                                                               │
│ │        logger = <briefcase.console.Log object at 0x105058d60>                                  │                                                                               │
│ │       options = {'update': False}                                                              │                                                                               │
│ │        result = 0                                                                              │                                                                               │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯                                                                               │
│                                                                                                                                                                                  │
│ /usr/local/lib/python3.9/site-packages/briefcase/commands/build.py:60 in __call__                                                                                                │
│                                                                                                                                                                                  │
│   57 │   │   else:                                                                                                                                                               │
│   58 │   │   │   state = None                                                                                                                                                    │
│   59 │   │   │   for app_name, app in sorted(self.apps.items()):                                                                                                                 │
│ ❱ 60 │   │   │   │   state = self._build_app(                                                                                                                                    │
│   61 │   │   │   │   │   app, update=update, **full_options(state, options)                                                                                                      │
│   62 │   │   │   │   )                                                                                                                                                           │
│   63                                                                                                                                                                             │
│                                                                                                                                                                                  │
│ ╭───────────────────────────────────────── locals ──────────────────────────────────────────╮                                                                                    │
│ │      app = <com.example.DownloadTube v0.0.1 AppConfig>                                    │                                                                                    │
│ │ app_name = 'DownloadTube'                                                                 │                                                                                    │
│ │  options = {}                                                                             │                                                                                    │
│ │     self = <briefcase.platforms.windows.app.WindowsAppBuildCommand object at 0x105083dc0> │                                                                                    │
│ │    state = None                                                                           │                                                                                    │
│ │   update = False                                                                          │                                                                                    │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────╯                                                                                    │
│                                                                                                                                                                                  │
│ /usr/local/lib/python3.9/site-packages/briefcase/commands/build.py:41 in _build_app                                                                                              │
│                                                                                                                                                                                  │
│   38 │   │                                                                                                                                                                       │
│   39 │   │   self.verify_app_tools(app)                                                                                                                                          │
│   40 │   │                                                                                                                                                                       │
│ ❱ 41 │   │   state = self.build_app(app, **full_options(state, options))                                                                                                         │
│   42 │   │                                                                                                                                                                       │
│   43 │   │   self.logger.info(                                                                                                                                                   │
│   44 │   │   │   f"Built {self.binary_path(app).relative_to(self.base_path)}",                                                                                                   │
│                                                                                                                                                                                  │
│ ╭──────────────────────────────────────────────────── locals ────────────────────────────────────────────────────╮                                                               │
│ │         app = <com.example.DownloadTube v0.0.1 AppConfig>                                                      │                                                               │
│ │     options = {}                                                                                               │                                                               │
│ │        self = <briefcase.platforms.windows.app.WindowsAppBuildCommand object at 0x105083dc0>                   │                                                               │
│ │       state = None                                                                                             │                                                               │
│ │ target_file = PosixPath('/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne') │                                                               │
│ │      update = False                                                                                            │                                                               │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                               │
│                                                                                                                                                                                  │
│ /usr/local/lib/python3.9/site-packages/briefcase/platforms/windows/app.py:52 in build_app                                                                                        │
│                                                                                                                                                                                  │
│    49 │   │                                                                                                                                                                      │
│    50 │   │   with self.input.wait_bar("Setting stub app details..."):                                                                                                           │
│    51 │   │   │   try:                                                                                                                                                           │
│ ❱  52 │   │   │   │   self.tools.subprocess.run(                                                                                                                                 │
│    53 │   │   │   │   │   [                                                                                                                                                      │
│    54 │   │   │   │   │   │   self.tools.rcedit.rcedit_path,                                                                                                                     │
│    55 │   │   │   │   │   │   self.binary_path(app).relative_to(self.bundle_path(app)),                                                                                          │
│                                                                                                                                                                                  │
│ ╭──────────────────────────────────────── locals ─────────────────────────────────────────╮                                                                                      │
│ │    app = <com.example.DownloadTube v0.0.1 AppConfig>                                    │                                                                                      │
│ │ kwargs = {}                                                                             │                                                                                      │
│ │   self = <briefcase.platforms.windows.app.WindowsAppBuildCommand object at 0x105083dc0> │                                                                                      │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────╯                                                                                      │
│                                                                                                                                                                                  │
│ /usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py:127 in inner                                                                                         │
│                                                                                                                                                                                  │
│   124 │   │   │   with sub.tools.input.release_console_control():                                                                                                                │
│   125 │   │   │   │   return sub_method(sub, args, **kwargs)                                                                                                                     │
│   126 │   │   else:                                                                                                                                                              │
│ ❱ 127 │   │   │   return sub_method(sub, args, **kwargs)                                                                                                                         │
│   128 │                                                                                                                                                                          │
│   129 │   return inner                                                                                                                                                           │
│   130                                                                                                                                                                            │
│                                                                                                                                                                                  │
│ ╭────────────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────────────╮                           │
│ │                    args = [                                                                                                                        │                           │
│ │                           │   PosixPath('/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'),                              │                           │
│ │                           │   PosixPath('src/DownloadOne.exe'),                                                                                    │                           │
│ │                           │   '--set-version-string',                                                                                              │                           │
│ │                           │   'CompanyName',                                                                                                       │                           │
│ │                           │   'Yaohang',                                                                                                           │                           │
│ │                           │   '--set-version-string',                                                                                              │                           │
│ │                           │   'FileDescription',                                                                                                   │                           │
│ │                           │   'DownloadOne',                                                                                                       │                           │
│ │                           │   '--set-version-string',                                                                                              │                           │
│ │                           │   'FileVersion',                                                                                                       │                           │
│ │                           │   ... +15                                                                                                              │                           │
│ │                           ]                                                                                                                        │                           │
│ │                  kwargs = {'check': True, 'cwd': PosixPath('/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne')} │                           │
│ │ remove_dynamic_elements = False                                                                                                                    │                           │
│ │                     sub = <briefcase.integrations.subprocess.Subprocess object at 0x106fe4880>                                                     │                           │
│ │              sub_method = <function Subprocess.run at 0x106a02af0>                                                                                 │                           │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                           │
│                                                                                                                                                                                  │
│ /usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py:284 in run                                                                                           │
│                                                                                                                                                                                  │
│   281 │   │   if stream_output or (                                                                                                                                              │
│   282 │   │   │   self.tools.input.is_console_controlled and not is_output_redirected                                                                                            │
│   283 │   │   ):                                                                                                                                                                 │
│ ❱ 284 │   │   │   return self._run_and_stream_output(args, **kwargs)                                                                                                             │
│   285 │   │                                                                                                                                                                      │
│   286 │   │   # Otherwise, invoke run() normally.                                                                                                                                │
│   287 │   │   self._log_command(args)                                                                                                                                            │
│                                                                                                                                                                                  │
│ ╭──────────────────────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────────────────────╮                              │
│ │                 args = [                                                                                                                        │                              │
│ │                        │   PosixPath('/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'),                              │                              │
│ │                        │   PosixPath('src/DownloadOne.exe'),                                                                                    │                              │
│ │                        │   '--set-version-string',                                                                                              │                              │
│ │                        │   'CompanyName',                                                                                                       │                              │
│ │                        │   'Yaohang',                                                                                                           │                              │
│ │                        │   '--set-version-string',                                                                                              │                              │
│ │                        │   'FileDescription',                                                                                                   │                              │
│ │                        │   'DownloadOne',                                                                                                       │                              │
│ │                        │   '--set-version-string',                                                                                              │                              │
│ │                        │   'FileVersion',                                                                                                       │                              │
│ │                        │   ... +15                                                                                                              │                              │
│ │                        ]                                                                                                                        │                              │
│ │ is_output_redirected = None                                                                                                                     │                              │
│ │               kwargs = {'check': True, 'cwd': PosixPath('/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne')} │                              │
│ │                 self = <briefcase.integrations.subprocess.Subprocess object at 0x106fe4880>                                                     │                              │
│ │        stream_output = False                                                                                                                    │                              │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                              │
│                                                                                                                                                                                  │
│ /usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py:342 in _run_and_stream_output                                                                        │
│                                                                                                                                                                                  │
│   339 │   │   kwargs.setdefault("bufsize", 1)                                                                                                                                    │
│   340 │   │                                                                                                                                                                      │
│   341 │   │   stderr = None                                                                                                                                                      │
│ ❱ 342 │   │   with self.Popen(args, **kwargs) as process:                                                                                                                        │
│   343 │   │   │   self.stream_output(args[0], process)                                                                                                                           │
│   344 │   │   │   if process.stderr and kwargs["stderr"] != subprocess.STDOUT:                                                                                                   │
│   345 │   │   │   │   stderr = process.stderr.read()                                                                                                                             │
│                                                                                                                                                                                  │
│ ╭─────────────────────────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────────────────────────╮                 │
│ │   args = [                                                                                                                                                   │                 │
│ │          │   PosixPath('/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'),                                                         │                 │
│ │          │   PosixPath('src/DownloadOne.exe'),                                                                                                               │                 │
│ │          │   '--set-version-string',                                                                                                                         │                 │
│ │          │   'CompanyName',                                                                                                                                  │                 │
│ │          │   'Yaohang',                                                                                                                                      │                 │
│ │          │   '--set-version-string',                                                                                                                         │                 │
│ │          │   'FileDescription',                                                                                                                              │                 │
│ │          │   'DownloadOne',                                                                                                                                  │                 │
│ │          │   '--set-version-string',                                                                                                                         │                 │
│ │          │   'FileVersion',                                                                                                                                  │                 │
│ │          │   ... +15                                                                                                                                         │                 │
│ │          ]                                                                                                                                                   │                 │
│ │  check = True                                                                                                                                                │                 │
│ │ kwargs = {'cwd': PosixPath('/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne'), 'stdout': -1, 'stderr': -2, 'bufsize': 1} │                 │
│ │   self = <briefcase.integrations.subprocess.Subprocess object at 0x106fe4880>                                                                                │                 │
│ │ stderr = None                                                                                                                                                │                 │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                 │
│                                                                                                                                                                                  │
│ /usr/local/lib/python3.9/site-packages/briefcase/integrations/subprocess.py:435 in Popen                                                                                         │
│                                                                                                                                                                                  │
│   432 │   │   self._log_cwd(kwargs.get("cwd"))                                                                                                                                   │
│   433 │   │   self._log_environment(kwargs.get("env"))                                                                                                                           │
│   434 │   │                                                                                                                                                                      │
│ ❱ 435 │   │   return self._subprocess.Popen(                                                                                                                                     │
│   436 │   │   │   [str(arg) for arg in args], **self.final_kwargs(**kwargs)                                                                                                      │
│   437 │   │   )                                                                                                                                                                  │
│   438                                                                                                                                                                            │
│                                                                                                                                                                                  │
│ ╭─────────────────────────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────────────────────────╮                 │
│ │   args = [                                                                                                                                                   │                 │
│ │          │   PosixPath('/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'),                                                         │                 │
│ │          │   PosixPath('src/DownloadOne.exe'),                                                                                                               │                 │
│ │          │   '--set-version-string',                                                                                                                         │                 │
│ │          │   'CompanyName',                                                                                                                                  │                 │
│ │          │   'Yaohang',                                                                                                                                      │                 │
│ │          │   '--set-version-string',                                                                                                                         │                 │
│ │          │   'FileDescription',                                                                                                                              │                 │
│ │          │   'DownloadOne',                                                                                                                                  │                 │
│ │          │   '--set-version-string',                                                                                                                         │                 │
│ │          │   'FileVersion',                                                                                                                                  │                 │
│ │          │   ... +15                                                                                                                                         │                 │
│ │          ]                                                                                                                                                   │                 │
│ │ kwargs = {'cwd': PosixPath('/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/DownloadOne'), 'stdout': -1, 'stderr': -2, 'bufsize': 1} │                 │
│ │   self = <briefcase.integrations.subprocess.Subprocess object at 0x106fe4880>                                                                                │                 │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                 │
│                                                                                                                                                                                  │
│ /usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:951 in __init__                                                         │
│                                                                                                                                                                                  │
│    948 │   │   │   │   │   self.stderr = io.TextIOWrapper(self.stderr,                                                                                                           │
│    949 │   │   │   │   │   │   │   encoding=encoding, errors=errors)                                                                                                             │
│    950 │   │   │                                                                                                                                                                 │
│ ❱  951 │   │   │   self._execute_child(args, executable, preexec_fn, close_fds,                                                                                                  │
│    952 │   │   │   │   │   │   │   │   pass_fds, cwd, env,                                                                                                                       │
│    953 │   │   │   │   │   │   │   │   startupinfo, creationflags, shell,                                                                                                        │
│    954 │   │   │   │   │   │   │   │   p2cread, p2cwrite,                                                                                                                        │
│                                                                                                                                                                                  │
│ ╭───────────────────────────────────────────────── locals ──────────────────────────────────────────────────╮                                                                    │
│ │               args = [                                                                                    │                                                                    │
│ │                      │   '/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe',     │                                                                    │
│ │                      │   'src/DownloadOne.exe',                                                           │                                                                    │
│ │                      │   '--set-version-string',                                                          │                                                                    │
│ │                      │   'CompanyName',                                                                   │                                                                    │
│ │                      │   'Yaohang',                                                                       │                                                                    │
│ │                      │   '--set-version-string',                                                          │                                                                    │
│ │                      │   'FileDescription',                                                               │                                                                    │
│ │                      │   'DownloadOne',                                                                   │                                                                    │
│ │                      │   '--set-version-string',                                                          │                                                                    │
│ │                      │   'FileVersion',                                                                   │                                                                    │
│ │                      │   ... +15                                                                          │                                                                    │
│ │                      ]                                                                                    │                                                                    │
│ │            bufsize = -1                                                                                   │                                                                    │
│ │            c2pread = 6                                                                                    │                                                                    │
│ │           c2pwrite = 7                                                                                    │                                                                    │
│ │          close_fds = True                                                                                 │                                                                    │
│ │      creationflags = 0                                                                                    │                                                                    │
│ │                cwd = '/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/Download'+3 │                                                                    │
│ │           encoding = 'UTF-8'                                                                              │                                                                    │
│ │                env = None                                                                                 │                                                                    │
│ │             errors = None                                                                                 │                                                                    │
│ │            errread = -1                                                                                   │                                                                    │
│ │           errwrite = 7                                                                                    │                                                                    │
│ │         executable = None                                                                                 │                                                                    │
│ │       extra_groups = None                                                                                 │                                                                    │
│ │                  f = <_io.TextIOWrapper name=6 encoding='UTF-8'>                                          │                                                                    │
│ │                gid = None                                                                                 │                                                                    │
│ │               gids = None                                                                                 │                                                                    │
│ │              group = None                                                                                 │                                                                    │
│ │     line_buffering = True                                                                                 │                                                                    │
│ │            p2cread = -1                                                                                   │                                                                    │
│ │           p2cwrite = -1                                                                                   │                                                                    │
│ │           pass_fds = ()                                                                                   │                                                                    │
│ │         preexec_fn = None                                                                                 │                                                                    │
│ │    restore_signals = True                                                                                 │                                                                    │
│ │               self = <Popen: returncode: 255 args: ['/Users/yuxiaoyu/Library/Caches/org.beeware.b...>     │                                                                    │
│ │              shell = False                                                                                │                                                                    │
│ │  start_new_session = False                                                                                │                                                                    │
│ │        startupinfo = None                                                                                 │                                                                    │
│ │             stderr = -2                                                                                   │                                                                    │
│ │              stdin = None                                                                                 │                                                                    │
│ │             stdout = -1                                                                                   │                                                                    │
│ │               text = True                                                                                 │                                                                    │
│ │                uid = None                                                                                 │                                                                    │
│ │              umask = -1                                                                                   │                                                                    │
│ │ universal_newlines = None                                                                                 │                                                                    │
│ │               user = None                                                                                 │                                                                    │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                                    │
│                                                                                                                                                                                  │
│ /usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:1821 in _execute_child                                                  │
│                                                                                                                                                                                  │
│   1818 │   │   │   │   │   │   err_filename = orig_executable                                                                                                                    │
│   1819 │   │   │   │   │   if errno_num != 0:                                                                                                                                    │
│   1820 │   │   │   │   │   │   err_msg = os.strerror(errno_num)                                                                                                                  │
│ ❱ 1821 │   │   │   │   │   raise child_exception_type(errno_num, err_msg, err_filename)                                                                                          │
│   1822 │   │   │   │   raise child_exception_type(err_msg)                                                                                                                       │
│   1823                                                                                                                                                                           │
│   1824                                                                                                                                                                           │
│                                                                                                                                                                                  │
│ ╭──────────────────────────────────────────────────── locals ────────────────────────────────────────────────────╮                                                               │
│ │                    args = [                                                                                    │                                                               │
│ │                           │   '/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe',     │                                                               │
│ │                           │   'src/DownloadOne.exe',                                                           │                                                               │
│ │                           │   '--set-version-string',                                                          │                                                               │
│ │                           │   'CompanyName',                                                                   │                                                               │
│ │                           │   'Yaohang',                                                                       │                                                               │
│ │                           │   '--set-version-string',                                                          │                                                               │
│ │                           │   'FileDescription',                                                               │                                                               │
│ │                           │   'DownloadOne',                                                                   │                                                               │
│ │                           │   '--set-version-string',                                                          │                                                               │
│ │                           │   'FileVersion',                                                                   │                                                               │
│ │                           │   ... +15                                                                          │                                                               │
│ │                           ]                                                                                    │                                                               │
│ │                 c2pread = 6                                                                                    │                                                               │
│ │                c2pwrite = 7                                                                                    │                                                               │
│ │    child_exception_type = <class 'OSError'>                                                                    │                                                               │
│ │ child_exec_never_called = False                                                                                │                                                               │
│ │               close_fds = True                                                                                 │                                                               │
│ │           creationflags = 0                                                                                    │                                                               │
│ │                     cwd = '/Users/yuxiaoyu/Desktop/demos/brieface/beeware/DownloadTube/windows/app/Download'+3 │                                                               │
│ │                     env = None                                                                                 │                                                               │
│ │                env_list = None                                                                                 │                                                               │
│ │            err_filename = '/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'          │                                                               │
│ │                 err_msg = 'Permission denied'                                                                  │                                                               │
│ │               errno_num = 13                                                                                   │                                                               │
│ │            errpipe_data = bytearray(b'OSError:d:')                                                             │                                                               │
│ │            errpipe_read = 8                                                                                    │                                                               │
│ │           errpipe_write = 9                                                                                    │                                                               │
│ │                 errread = -1                                                                                   │                                                               │
│ │                errwrite = 7                                                                                    │                                                               │
│ │          exception_name = bytearray(b'OSError')                                                                │                                                               │
│ │              executable = b'/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'         │                                                               │
│ │         executable_list = (b'/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe',)      │                                                               │
│ │             fds_to_keep = {9}                                                                                  │                                                               │
│ │                     gid = None                                                                                 │                                                               │
│ │                    gids = None                                                                                 │                                                               │
│ │               hex_errno = bytearray(b'd')                                                                      │                                                               │
│ │        low_fds_to_close = []                                                                                   │                                                               │
│ │         orig_executable = '/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'          │                                                               │
│ │                 p2cread = -1                                                                                   │                                                               │
│ │                p2cwrite = -1                                                                                   │                                                               │
│ │                    part = b''                                                                                  │                                                               │
│ │                pass_fds = ()                                                                                   │                                                               │
│ │                     pid = 64798                                                                                │                                                               │
│ │              preexec_fn = None                                                                                 │                                                               │
│ │         restore_signals = True                                                                                 │                                                               │
│ │                    self = <Popen: returncode: 255 args: ['/Users/yuxiaoyu/Library/Caches/org.beeware.b...>     │                                                               │
│ │                   shell = False                                                                                │                                                               │
│ │       start_new_session = False                                                                                │                                                               │
│ │             startupinfo = None                                                                                 │                                                               │
│ │                     sts = 65280                                                                                │                                                               │
│ │                     uid = None                                                                                 │                                                               │
│ │                   umask = -1                                                                                   │                                                               │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
PermissionError: [Errno 13] Permission denied: '/Users/yuxiaoyu/Library/Caches/org.beeware.briefcase/tools/rcedit-x64.exe'

@rmartin16
Copy link
Member

You can only build and run Windows apps on Windows. It looks like v0.3.9 inadvertently dropped the error message stating this.

@iyu98
Copy link
Author

iyu98 commented Dec 17, 2022

Oh, I see, thank you.
I'll try it now.

@freakboy3742
Copy link
Member

Closing as the source of the problem is now known, and is captured as a separate ticket (#1010)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

3 participants