# Amity video upload android error

**URL:** <https://forum.social.plus/t/amity-video-upload-android-error/1311>\
**Category:** Android\
**Created:** [May 20, 2024, 4:56pm UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311 "2024-05-20T16:56:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkmovement](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tkmovement](https://forum.social.plus/u/tkmovement)\
**Post date:** [May 20, 2024, 4:56pm UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/1 "2024-05-20T16:56:26Z")

</div>

Given the code below. It uploads well and can track progress but does not jump to COMPLETE, CANCELLED etc. It takes to much time to load

AmityCoreClient.newFileRepository()  
.uploadVideo(uri = videoUri, contentFeedType = AmityContentFeedType.POST)  
.doOnNext { uploadResult: AmityUploadResult →   
when (uploadResult) {  
is AmityUploadResult.PROGRESS → {  
// upload progress event  
val progress = uploadResult.getUploadInfo().getProgressPercentage()  
attachment\_progress = progress  
Log.e(“PROGRESS”, attachment\_progress.toString())  
}  
is AmityUploadResult.COMPLETE → {  
// completion event  
val video: AmityVideo = uploadResult.getFile()  
fileIds.add(video.getFileId())  
attachment\_type = “video”

```
                    val postAttachments = mutableListOf<PostAttachment>()
                    for (fileId in fileIds) {
                        val postAttachment = PostAttachment(fileId, "video")
                        postAttachments.add(postAttachment)
                    }

                    postAttachmentAdapter = PostAttachmentAdapter(this@SocialPostCreateActivity, postAttachments)
                    binding.recyclerViewAttachment.adapter = postAttachmentAdapter
                    binding.textViewProgress.text = "Loading .."
                    binding.cardViewProgress.visibility = GONE
                }
                is AmityUploadResult.ERROR -> {
                    // error event
                    val error = AmityError.from(uploadResult.getError())
                    Toast.makeText(this@SocialPostCreateActivity, "Error attaching files", Toast.LENGTH_SHORT).show()
                    binding.textViewProgress.text = "Loading .."
                    binding.cardViewProgress.visibility = GONE
                }
                is AmityUploadResult.CANCELLED -> {
                    // cancelled upload event
                    binding.textViewProgress.text = "Loading .."
                    binding.cardViewProgress.visibility = GONE
                }
            }
        }
        .subscribe()

```

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [May 20, 2024, 7:10pm UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/2 "2024-05-20T19:10:29Z")

</div>

Hello, the loading time can vary depending on factors such as the video size, internet connection, server region, and the actual application location.

Could you please provide information about the video size? When you mentioned that it never jumps to complete or is cancelled, did you mean that it remains stuck in an infinite loading loop and never completes?

---

<div class="post-metadata">

**Author:** ![tkmovement](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tkmovement](https://forum.social.plus/u/tkmovement)\
**Post date:** [May 21, 2024, 4:37am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/3 "2024-05-21T04:37:16Z")

</div>

Hello Yes. When you track progress it gets to 99 and never goes to completed. Any video size even less than 1MB. Suprisingly the image and files work perfectly even if 5MB. Internet speed is not an issue

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [May 21, 2024, 8:15am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/4 "2024-05-21T08:15:56Z")

</div>

@tkmovement Let me pass this on to my team for further checking, and I’ll get back to you.

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [May 21, 2024, 8:46am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/5 "2024-05-21T08:46:28Z")

</div>

@tkmovement Additional Question : Which version are you using to implement this?

---

<div class="post-metadata">

**Author:** ![tkmovement](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tkmovement](https://forum.social.plus/u/tkmovement)\
**Post date:** [May 21, 2024, 8:59am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/6 "2024-05-21T08:59:13Z")

</div>

This here on your documentation

> **[Video Handling | Amity Docs](https://docs.amity.co/amity-sdk/core-concepts/files-images-and-videos/video-handling)**

NOTE: It was working before. Just started failing this week

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [May 21, 2024, 9:02am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/7 "2024-05-21T09:02:55Z")

</div>

@tkmovement Which version of the Android SDK are you using?

---

<div class="post-metadata">

**Author:** ![tkmovement](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tkmovement](https://forum.social.plus/u/tkmovement)\
**Post date:** [May 21, 2024, 9:04am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/8 "2024-05-21T09:04:34Z")

</div>

com.github.AmityCo.Amity-Social-Cloud-SDK-Android:amity-sdk

Version 6.30.0

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [May 21, 2024, 9:11am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/9 "2024-05-21T09:11:31Z")

</div>

@tkmovement Thank you for the information you provided. I will get back to you if there are any updates.

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [May 23, 2024, 5:29am UTC](https://forum.social.plus/t/amity-video-upload-android-error/1311/10 "2024-05-23T05:29:08Z")

</div>

Hello @tkmovement , I have sent an email to [tkmovement.dev@gmail.com](mailto:tkmovement.dev@gmail.com) requesting additional information.

Thank you,
