box / box/box-android-apptoapp-sdk

Box.getAccountTree returns null / "unknown http status"

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
57
Forks
27
PR merge metrics
No merged PRs in 30d

Description

After the first call to Box.getAccountTree, subsequent calls result in the onComplete handler being called with a null BoxFolder, and the status "unknown http status" (or whatever the appropriate constant actually contains).

This behaviour is not documented anywhere noticable

The behaviour is a result of the HttpUrlConnection in BoxSynchronous.saxRequest having 'useCaches' turned on, which causes conn.getResponseCode() to return -1.
Adding conn.setUseCaches(false); to this method before conn.connect(); results in the http request always getting executing, and a BoxFolder always being passed to onComplete.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.