Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Check `NetworkRequest#mDestroyed` before each network request?

Open Beginner friendly
#563 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, java
Domain
mobile

Research direction

Start at AidlNetworkRequest#performNetworkRequestV2 and compare it with the existing NetworkRequest#mDestroyed check performed during connect. Verify that calling close() before a request is detected at the start of the operation and results in a meaningful IllegalStateException rather than a later null-context failure.

Written by the indexing model from the issue text.

Description

I recently ran into an issue while trying to make a network request on an NextcloudAPI instance, on which I called close() before.

Of course, it failed, but at an odd place, that I didn't expected (I think context was null at some place).

This made me wondering why we do check for NetworkRequest#mDestroyed when connecting, but not before each request. Wouldn't make it sense to add this check also at the beginning of AidlNetworkRequest#performNetworkRequestV2 and throw a more meaningful IllegalStateException or something alike?

cc @David-Development

Dominant language
Java
Stars
74
Forks
36
Avg merge
1d 6h
Merged PRs (30d)
15

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/Android-SingleSignOn

All issues in nextcloud/Android-SingleSignOn

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.