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

Inaccurate Error Message When Running flutter build ipa Without Internet Connection #4299

Open
leo271 opened this issue Jun 4, 2024 · 2 comments
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@leo271
Copy link

leo271 commented Jun 4, 2024

When attempting to run flutter build ipa, I encountered an error message stating Null check operator used on a null value during the phase where Dart packages are downloaded. This issue occurred when my machine was not connected to the internet. Here's the relevant log file;
pub_log.txt

Expected Behavior:
The error message should explicitly indicate a connectivity issue, such as Internet connection error.

Actual Behavior:
The error message is misleading as it indicates a null check operation failure, which doesn't clearly reflect the underlying issue of a missing internet connection.

Steps to Reproduce:

  1. Disconnect from the internet.
  2. Run flutter build ipa.
  3. Observe the error message.

After reconnecting to the internet, the problem was resolved, indicating that the issue was indeed related to the network connectivity. This misleading error message could lead to unnecessary debugging efforts focusing on the wrong aspect of the problem.

@leo271 leo271 changed the title Pub run has caught null pointer exception. Inaccurate Error Message When Running flutter build ipa Without Internet Connection Jun 4, 2024
@sigurdm
Copy link
Contributor

sigurdm commented Jun 10, 2024

Oh - maybe we should avoid reading advisories when in --offline mode.

cc @szakarias .

@sigurdm sigurdm added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jun 10, 2024
@sigurdm
Copy link
Contributor

sigurdm commented Jun 10, 2024

But basically I think this is a duplicate of #4269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants