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
Calls run but completions are never returned? #804
Comments
Hi @BenQF, Unfortunately I can not reproduce this issue on my local setup. Is this is your case, please try with smaller one to make sure that it works. What I can also suggest is to pass additional parameter
Let me know if this helps! |
Hi @arjankowski ▷ POST https://upload.box.com/api/2.0/files/content Always the same outcome runs, uploads shows progress, lands in correct box folder, no completion call, additionally the test file I'm using is a 85 kb pdf, and i have tried others as well. Additionally, I can call the endpoint directly with alamofire doing a post with headers files and params in the app and in postman and both work and receive a response. let url = URL(string: "https://upload.box.com/api/2.0/files/content") However any time we try and use the iOS sdk itself, we never receive the response. Thanks for your assistance. |
Hi @BenQF, On my setup which is below uploading a file works every time:
Is this possible that will you send me to an email sample file upload project that does not run for you? |
Hi @arjankowski The output I'm seeing appears like this in the file I've provided(with private data hidden for github). ▷ GET https://api.box.com/2.0/users/me?fields=name,login ◁ Status code: 200: no error ▷ POST https://upload.box.com/api/2.0/files/content |
hi @BenQF, In your repo I actually can see only one |
Hi @arjankowski |
Hi @BenQF, I've just pushed a PR for your repo with some working code. The But to correctly execute a callback function a BoxClient instance should still exists, otherwise To fix this please move the BoxClient declaration outside this method scope. |
Hi @BenQF Is the problem still present and can I help somehow? |
No you've been very helpful thanks! |
Description of the Issue
When using client.files.upload the call runs and can even show progress but the completion is never returned. We've tried this in a fresh program with box using the example calls from the box api reference for iOS, and using sdk 5.0.0. The call seems to run and send the file to box but the completion never calls success and no body is returned from the call.
let task: BoxUploadTask = client.files.upload(data: data, name: "Test File.txt", parentId: self.fileId) { (result: Result<File, BoxSDKError>) in
guard case let .success(file) = result else {
print("Error uploading file")
return
}
}
Steps to Reproduce
Running this code in a new program with our token and client authenticated provides this return
▷ POST https://upload.box.com/api/2.0/files/content
▷ Headers:
▷ X-Box-UA, Value: agent=box-swift-sdk/5.0.0; env=iPhone XS/15.1
▷ Authorization, Value: Bearer ***removed but auth header was valid
▷ Body: Multipart
This is the last response
Expected Behavior
Error Message, Including Stack Trace
No error message file lands in box but the completion doesn't return and we cannot see what the box file id for the file that submitted was.
Screenshots
Versions Used
iOS SDK: using iOS sdk 5.0.0
iOS Preview SDK:
iOS: iOS 15.1
Xcode: Xcode 13.1
The text was updated successfully, but these errors were encountered: