Skip to content

[package_info_plus] Web: fail to get PackageInfo (version) offline #456

Closed

Description

@alextekartik

This is a issue I think related to #225

It only happens on the Web while offline.

I have a PWA flutter application where I call await PackageInfo.fromPlatform() before running the app. This is the only part that is not working offline as it tries to trick the cache to force reading the version, since there is no network, it fails. I think it should try to read the version but on failure (no network), it should return a stale value as there is no reason we could not get the package name and version offline.

To reproduce, create a flutter app from the basic template, add await PackageInfo.fromPlatform() in main() publish somewhere, run it, turn of network and refresh...

Activity

  1. ptisserand commented on Oct 11, 2021

    @ptisserand

    Can I work on this issue?

  2. github-actions commented on May 31, 2022

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

  3. dupuisdavid commented on Jan 14, 2025

    @dupuisdavid

    Hi.
    Could you let me know if this issue has been solved?
    Thanks for your feedback.

  4. miquelbeltran commented on Jan 14, 2025

    @miquelbeltran
    Member

    Package Info Plus on web relies on the hosted version.json file to read the package info, so, if the app is offline it won't be able to obtain the package info. This works as expected.

  5. dupuisdavid commented on Jan 14, 2025

    @dupuisdavid

    ok, I understand. By the way, do you know if there are any initiatives for offline operation in the context of a PWA?

  6. dupuisdavid commented on Jul 7, 2025

    @dupuisdavid

    Hi. Is there an update on this topic or not?
    In the context of PWA app, the version.json file could cached...
    What do you think @miquelbeltran?

  7. locked as resolved and limited conversation to collaborators on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestIssues taking part in HacktoberfestStalebugSomething isn't workingpackage_info_plusstuff related to package_info_plus

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions