Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

After briefcase create fails, output of subsequent commands is very confusing #487

Closed
talljosh opened this issue Sep 11, 2020 · 2 comments
Closed
Labels
bug A crash or error in behavior.

Comments

@talljosh
Copy link

Describe the bug
I'm new to using briefcase. When I ran briefcase create on my app, it failed because of a network error.

.
.
.
[myapp] Installing support package...
Using support package https://briefcase-support.org/python?platform=linux&version=3.6&arch=x86_64
... using most recent revision
Unable to downloading support package; is your computer offline?

Once I fixed the network error, I had no idea what I should do. I had to dig into the briefcase source code to work out what was going on.

When I tried briefcase create again, it said:

Application myapp already exists; overwrite [y/N]?

This sounds dangerous—maybe it's going to delete and recreate my whole project!

(It's not, but as a new user the message didn't make that clear to me.)

When I tried briefcase update, things looked more promising:

[myapp] Updating application code...
Installing src/myapp...

[myapp] Application updated.

(This is misleading too, because the support package still hasn't been downloaded.)

When I tried briefcase build it was super confusing:

[myapp] Building AppImage...

[myapp] Entering Docker context...
Unable to find image 'briefcase/com.example.myapp:py3.6' locally

At this point Docker tried to find a Docker image for com.example.myapp on the internet.

To Reproduce
Steps to reproduce the behaviour:

  1. Follow the Beeware tutorial up to the start of step 3: Packaging for distribution
  2. Sabotage briefcase create, e.g., by pulling out your network cable
  3. After briefcase create fails, try briefcase create, briefcase update, and briefcase build to see the confusing output.

Expected behaviour
I'm not sure what the correct thing to do here is. Perhaps some combination of these things:

  • Replace the message "Application myapp already exists; overwrite [y/N]?" with something like "A packaging configuration already exists for application myapp; overwrite [y/N]?" to make it clear that if you select yes, the only thing you're overwriting is the packaging configuration.
  • If briefcase create fails, remove the packaging configuration directory so that calls to briefcase update fail with a nice message, and calls to briefcase build try the create step first. (A potential downside to this is that the package configuration directory wouldn't exist for someone to inspect what went wrong.)
  • If briefcase create fails, store a failed flag in the package configuration directory, and have briefcase update and briefcase build detect that flag and warn the user that they may need to rerun briefcase create.

Environment:

  • Operating System: Ubuntu 18.04.5
  • Python version: 3.6.9
  • Briefcase version: 0.3.3

Additional note
I'm happy to submit a patch for fixing this, but I need some guidance as to what the correct solution is.

@talljosh talljosh added the bug A crash or error in behavior. label Sep 11, 2020
@freakboy3742
Copy link
Member

Thanks for the report. That's definitely an edge case we should be catching - a comprehensive audit of failure modes throughout create/build/run would be very worthwhile.

@freakboy3742 freakboy3742 added up-for-grabs bug A crash or error in behavior. and removed bug A crash or error in behavior. labels Mar 28, 2022
@freakboy3742
Copy link
Member

Doing some housekeeping, this appears to be a duplicate of #411.

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

No branches or pull requests

2 participants