Skip to content

ModuleImport: Handle failures and edge cases #79

@partipan-dot

Description

@partipan-dot

The ModuleImporter is very naively implemented. It hopes the import succeeds always. The importModule(...) catches IOExceptions and returns null which lead to a NullPointerException in the AsyncTask. The exceptions get logged but the user only sees that the app crashed.

Problems:

  • Check if module imported correctly in AsyncTask iterating over the result (null -> NullPointerException)
  • During import the module lies in a tmp_extraction folder which get renamed afterwards (don't ignore result, it can fail)
  • Handle low space or no space
  • ManifestParser can't handle missing/unknown json attributes (app crashes)
  • The zip can be corrupted or not a zip at all
  • Expected files can be missing in zip
  • Notify user that something went wrong (be specific but user friendy)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions