Bynder / bynder-c-sharp-sdk

SDK in C# for integration with Bynder
MIT License
3 stars 22 forks source link

Calling Bynder GetAssetService().UploadFileAsync() #63

Open greenrya opened 2 years ago

greenrya commented 2 years ago

We have not been able to pinpoint why but using the SDK we get this error periodically:

SendHttpRequest - Status: InternalServerError Body: {"message":"Could not complete upload","retry":1,"success":false} Headers: Connection = keep-alive, Date = Wed, 03 Nov 2021 11:02:59 GMT, Server = nginx, Cache-Control = no-store, must-revalidate, no-cache, X-Frame-Options = SAMEORIGIN, Access-Control-Allow-Origin = *, Access-Control-Allow-Credentials = true, Access-Control-Allow-Methods = GET, POST, PUT, DELETE, OPTIONS, Access-Control-Allow-Headers = DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,X-Bynder-Integration, X-Cache = Error from cloudfront, Via = 1.1 930a139903fb043f0be58fe5e0a67072.cloudfront.net (CloudFront), X-Amz-Cf-Pop = SFO53-C1, X-Amz-Cf-Id = FDh7EEIkCVHbjiEW58z9fuyECqs2YFoNpD2iMkxSLjNNAnNyhWgMlA==

I got this back from support: Hi,

I got some insight to share with you from the team. The “error” that you are receiving is a valid one. It means that the upload is not ready yet and that the call (poll) to check the status needs to be retried.

It could be that sometimes an upload takes longer to be processed before it’s returned in the “done” array. Especially if you batch upload the polling status can take longer than when checking for a single upload.

Also, the load on Bynder itself at any moment in time can cause uploads to take longer to be processed completely. In this case the integration needs to keep on polling until it get the items in the done array.

Additionally, we are going to make improvements to the upload process with File Services. I don't have all the info on all the proposed changes but based off my conversation with the team there will no longer be a need to poll for items as the conversion will just happen in the background.

I hope the above info helps, let me know if you have any further questions on this or if we can close out this ticket. Thanks.

Just posting incase someone else has ran into similar issue we will continue to monitor.

TimBloembergen commented 2 years ago

Hi @greenrya The error that you receive is being returned when trying to finalize the upload. If this issue does not happen with all uploads it could also indicate that there might be something wrong with the file itself that you're trying to upload, or, that the chunk(s) have not all been uploaded yet. What happens if you retry?

Like support did say we are going to move to the Files Service upload hopefully soon, this will hopefully solve any upload issue with the current method. We are awaiting on other teams to give the greenlight to merge the PR we have ready for this.

greenrya commented 2 years ago

@TimBloembergen It happens more frequently in our instance now. The file uploads just fine from the UI we need to be able to rely on the upload process it is very important to us. What is being done to help resolve this we need help our sandbox URL is https://playlsisandbox.getbynder.com

SendHttpRequest - Status: InternalServerError Body: {"message":"Upload not ready","retry":1,"success":false} Headers: Connection = keep-alive, Date = Wed, 17 Nov 2021 16:21:43 GMT, Server = nginx, Cache-Control = no-store, must-revalidate, no-cache, X-Frame-Options = SAMEORIGIN, Access-Control-Allow-Origin = *, Access-Control-Allow-Credentials = true, Access-Control-Allow-Methods = GET, POST, PUT, DELETE, OPTIONS, Access-Control-Allow-Headers = DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,X-Bynder-Integration, X-Cache = Error from cloudfront, Via = 1.1 a2165b66922b78c24eb18ccc5d845335.cloudfront.net (CloudFront), X-Amz-Cf-Pop = SFO53-C1, X-Amz-Cf-Id = 6wouqhcfKsYgNluLCw7SYjQ5zKw7AB1u5XKQY6V_bxeNBX8mByfGJw==

greenrya commented 2 years ago

Hi @greenrya The error that you receive is being returned when trying to finalize the upload. If this issue does not happen with all uploads it could also indicate that there might be something wrong with the file itself that you're trying to upload, or, that the chunk(s) have not all been uploaded yet. What happens if you retry?

Like support did say we are going to move to the Files Service upload hopefully soon, this will hopefully solve any upload issue with the current method. We are awaiting on other teams to give the greenlight to merge the PR we have ready for this.

Any update on merging this PR into our Sandbox instance?

greenrya commented 2 years ago

Still getting this message frequently and retries fail too. What is the status on File Services?

2022-03-18T11:36:38.017 [Error] Executed 'SyncModel' (Failed, Id=676aee46-36e8-4a9a-8fc0-2282374ea247, Duration=60591ms)SendHttpRequest - Status: InternalServerError Body: {"message":"Upload not ready","retry":1,"success":false} Headers: Connection = keep-alive, Date = Fri, 18 Mar 2022 11:36:37 GMT, Server = nginx, Cache-Control = no-store, must-revalidate, no-cache, X-Frame-Options = SAMEORIGIN, Access-Control-Allow-Origin = *, Access-Control-Allow-Credentials = true, Access-Control-Allow-Methods = GET, POST, PUT, DELETE, OPTIONS, Access-Control-Allow-Headers = DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,X-Bynder-Integration, X-Cache = Error from cloudfront, Via = 1.1 f180978007f83adae5595134610a89fe.cloudfront.net (CloudFront), X-Amz-Cf-Pop = LAX50-C4, X-Amz-Cf-Id = qOtJpIPFL9m9ayC6JZNAbDMNJypLe-SvAdZUqFca0Gfjr6gM3GphEQ==

meghuizen commented 2 years ago

I'd prefer if the FileService upload branch is being pulled in to the master branch and a new release being created. Since this removes the polling and creates a way more stable file upload process.