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

Ensure Briefcase can run while offline #388

Open
freakboy3742 opened this issue Apr 29, 2020 · 4 comments
Open

Ensure Briefcase can run while offline #388

freakboy3742 opened this issue Apr 29, 2020 · 4 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@freakboy3742
Copy link
Member

As long as you have previously downloaded templates, support packages etc, it should be possible to run Briefcase while you have no internet connection.

At present, being offline raises loud errors.

There may be other online checks that need to be gated.

Two changes are required:

  • There should be an --offline command line argument that will silence (or at least radically quieten down) warnings related to being offline
  • Any request to access the network should be able to fallback to previously downloaded files.

The NetworkFailure exception may provide a useful way to identify and catch these cases.

@freakboy3742 freakboy3742 added enhancement New features, or improvements to existing features. up-for-grabs labels Apr 29, 2020
@MosGeo
Copy link

MosGeo commented Feb 26, 2022

I'll add to this that the fallback file should be transferable by the user to a clearly defined folder. For example, the user can set it to a custom directory in the toml file.

@freakboy3742
Copy link
Member Author

@MosGeo It's already possible to manually specify templates or support packages as part of your project configuration; the issue is that this won't necessarily prevent network access.

@MosGeo
Copy link

MosGeo commented Jan 5, 2024

I am able to use briefcase in offline mode after copying all the required tools, templates manually and setting the environment variable. I don't have the project on me right now to provide exact info.

Now, I am able to build and package my project completely offline without any warnings.

Note that I am doing this for windows. I have not rested it for Android.

@freakboy3742
Copy link
Member Author

After some time trying, I found a rough idea to be able to run offline: first realize a successful run, then copy the JDK and Android SDK to the project...

Thanks, but that's not really a solution to this problem - it's a (partial) fix for #738.

The issue this ticket describes isn't getting the tools - it's working around the various places that Briefcase (and the tools Briefcase invokes) perform explicit "am I up to date?" checks. These currently require network access. It doesn't matter if you have those tools already - Briefcase is expecting to be able to request updates; those cases need to be either avoided, or the network error caused by being offline needs to be caught.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

3 participants
@freakboy3742 @MosGeo and others