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

Box.getAccountTree returns null / "unknown http status" #3

Open
ghost opened this issue Mar 26, 2012 · 1 comment
Open

Box.getAccountTree returns null / "unknown http status" #3

ghost opened this issue Mar 26, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 26, 2012

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.

@RicoYao
Copy link

RicoYao commented Mar 26, 2012

Very interesting, thanks for the report. We've never had this reported to us, nor have we seen this in our own use of the library, but we'll definitely look into it further. In any case, setting setUseCaches(false) is unlikely to be harmful so we can likely just add it after we've tested. A couple quick questions though:

  1. Why would useCaches cause a -1 responseCode? Any documentation/reports you can point to? How did you figure this out?
  2. Is there a specific device that you saw this on? As mentioned, we haven't ran into this so I'd be curious to know if it's a device/rom specific issue.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant