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

[Bug]: failed with exception Socket timeout has expired on iOS while everything is fine on Android #849

Open
3 tasks done
Deorigami opened this issue Feb 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Deorigami
Copy link

General Info

  • I checked for similar bug report
  • I am using the latest version
  • I checked the troubleshooting page for similar problems

Version(s)

3.1.1

Kotlin Target(s) and their respective versions

iOS 18.2

What happened? (include your code)

override suspend fun updateGeneratedResumePicture(param: UpdateGeneratedResumeImageUseCase.Param): DomainResult<ResumeEntity> {
        storage.from("resumes").upload(path = "${param.resumeId}.png", param.image) {
            upsert = true
            this.httpOverride {
                this.timeout {
                    this.socketTimeoutMillis = Long.MAX_VALUE
                    this.requestTimeoutMillis = Long.MAX_VALUE
                    this.connectTimeoutMillis = Long.MAX_VALUE
                }
            }
        }
        storage.from("resumes").upload(path = "${param.resumeId}.pdf", param.pdf){ upsert = true }
        val updateImageUrl = storage["resumes"].publicUrl("${param.resumeId}.png")
        Napier.d(tag = "ANGGATAG", message = "updateGeneratedResumePicture : $updateImageUrl")
        postgrest[Tables.RESUME].update({
            set("generated_resume_image_url", updateImageUrl)
        }) {
            filter {
                ResumeTable::id eq param.resumeId
            }
        }
        val updatedResume = getResumeById(param.resumeId)
        return updatedResume
    }

this code runs fine on Android, both item .png and .pdf are uploaded to storage, i also set the storage to public
even i cant upload the first line, which upload .png file

Steps To Reproduce (optional)

No response

Relevant log output (optional)

2025-02-08 09:15:58.273216+0700 ResumeBuilder[23479:280979] [Default] Task <C2C4B814-8050-4EA3-958E-4C8A694C4F23>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x600000dbd230 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <C2C4B814-8050-4EA3-958E-4C8A694C4F23>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <C2C4B814-8050-4EA3-958E-4C8A694C4F23>.<1>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://*.supabase.co/storage/v1/object/resumes/25.png, NSErrorFailingURLKey=https://*.supabase.co/storage/v1/object/resumes/25.png, _kCFStreamErrorDomainKey=4}

2025-02-08 09:15:58.276348+0700 ResumeBuilder[23479:279760] [] 🔴 (Supabase-Core) POST request to endpoint /storage/v1/object/resumes/25.png failed with exception Socket timeout has expired [url=https://*.supabase.co/storage/v1/object/resumes/25.png, socket_timeout=unknown] ms
@Deorigami Deorigami added the bug Something isn't working label Feb 8, 2025
@jan-tennert jan-tennert self-assigned this Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants