Describe the bug
When running an app on macOS or Windows, briefcase run will fail if a build step hasn't been executed.
On Windows, the error manifests as:
SystemExit: stub: No module named stub
On macOS, it is
The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x158e246f0 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}
Steps to reproduce
$ briefcase new -Q app_name=foobar
$ cd foobar
$ briefcase create
$ briefcase run
Expected behavior
App should start without error. The run should imply the need for a build on the macOS/Windows app templates, but because the template and binary both exist, the need for a build isn't detected.
Screenshots
No response
Environment
- Operating System: macOS, Windows
- Python version: All
- Software versions:
Logs
Traceback (most recent call last):
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 183, in _run_module_as_main
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 136, in _get_module_details
runpy._Error: No module named stub
During handling of the above exception, another exception occurred:
SystemExit: stub: No module named stub
---------------------------------------------------------------------------
Application quit abnormally (Exit code -1)!
stub: No module named stub
Unable to start app helloworld.
Additional context
The briefcase dev is normal, but the briefcase run is abnormal.
If you invoke briefcase run on a clean project, the app works.
If you invoke briefcase build before invoking briefcase run, the app works.
This only affects the app targets; the Xcode/VisualStudio templates do the right thing, because they require an explicit compilation step to create the binary.
Describe the bug
When running an app on macOS or Windows,
briefcase runwill fail if abuildstep hasn't been executed.On Windows, the error manifests as:
On macOS, it is
Steps to reproduce
Expected behavior
App should start without error. The
runshould imply the need for abuildon the macOS/Windows app templates, but because the template and binary both exist, the need for a build isn't detected.Screenshots
No response
Environment
Logs
Additional context
The briefcase dev is normal, but the briefcase run is abnormal.
If you invoke
briefcase runon a clean project, the app works.If you invoke
briefcase buildbefore invokingbriefcase run, the app works.This only affects the
apptargets; theXcode/VisualStudiotemplates do the right thing, because they require an explicit compilation step to create the binary.