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

Build release get: Timed out waiting for connection acknowledgement #2793

Open
1 task done
sontnfabbi opened this issue Apr 25, 2024 · 7 comments
Open
1 task done
Assignees
Labels
api bug Something isn't working

Comments

@sontnfabbi
Copy link

sontnfabbi commented Apr 25, 2024

Before opening, please confirm:

Language and Async Model

Kotlin, Kotlin - Coroutines

Amplify Categories

GraphQL API

Gradle script dependencies

def amplify_version = "2.14.11"
implementation "com.amplifyframework:core:$amplify_version"
implementation "com.amplifyframework:aws-api:$amplify_version"
implementation "com.amplifyframework:core-kotlin:$amplify_version"

Environment information

Build time: 2023-06-30 18:02:30 UTC
Revision: 5f4a070a62a31a17438ac998c2b849f4f6892877

Kotlin: 1.8.20
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.6 (JetBrains s.r.o. 17.0.6+0-b2043.56-10027231)
OS: Windows 10 10.0 amd64

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

When build release with minifyEnabled true, Amplify.API.subscribe get timeout eror
Still that project build debug with minifyEnabled true, has no problem..

ApiException{message=Timed out waiting for connection acknowledgement., cause=null, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
proguard-rules.pro:

# Amazon
-keep class com.amazon.** { *; }
-keep class com.amazonaws.** { *; }
-keep class com.amplifyframework.** { *; }
# Class names are needed in reflection
-keepnames class com.amazonaws.**
-keepnames class com.amazon.**
# Request handlers defined in request.handlers
-keep class com.amazonaws.services.**.*Handler
# The following are referenced but aren't required to run
-dontwarn com.fasterxml.jackson.**
-dontwarn org.apache.commons.logging.**
# Android 6.0 release removes support for the Apache HTTP client
-dontwarn org.apache.http.**
# The SDK has several references of Apache HTTP client
-dontwarn com.amazonaws.http.**
-dontwarn com.amazonaws.metrics.**
-dontwarn com.amazonaws.mobile.auth.facebook.FacebookSignInProvider
-dontwarn com.amazonaws.mobile.auth.google.GoogleSignInProvider
-dontwarn com.amazonaws.mobile.auth.userpools.CognitoUserPoolsSignInProvider

-keepclassmembers class ** {
@com.amazonaws.mobileconnectors.apigateway.annotation.Operation public *;
}
-keepclassmembers class * {
@com.amazonaws.mobileconnectors.apigateway.annotation.Operation <methods>;
}
-keepattributes *Annotation*
-keepattributes InnerClasses
-keep class jp.co.tvtokyo.webapi.entities.** {*;}
-keep class jp.co.tvtokyo.webapi.v4.core.model.** {*;}
-keep class jp.co.tvtokyo.webapi.v4.core.model.CodeSubscribeData {*;}
-keepclassmembers class jp.co.tvtokyo.webapi.v4.core.extension.Amplify$**         { *; }
-keepclassmembers class jp.co.tvtokyo.webapi.v4.core.model.CodeSubscribeData$**         { *; }
-keep class org.apache.commons.logging.**               { *; }
-keep class com.amazonaws.services.sqs.QueueUrlHandler  { *; }
-keep class com.amazonaws.javax.xml.transform.sax.*     { public *; }
-keep class com.amazonaws.javax.xml.stream.**           { *; }
-keep class com.amazonaws.services.**.model.*Exception* { *; }
-keep class org.codehaus.**                             { *; }
-keepattributes Signature,*Annotation*

-dontwarn javax.xml.stream.events.**
-dontwarn org.codehaus.jackson.**
-dontwarn org.apache.commons.logging.impl.**
-dontwarn org.apache.http.conn.scheme.**

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


amplifyconfiguration.json

No response

GraphQL Schema

subscription MySubscription (${'$'}id: String!) {
onCreateStbLoginCodeSuccess(device_id: ${'$'}id) {
code
created_at
device_id
expires_in
jwt
user_info
}
}

Additional information

I have investigated that your lib get conflict with this lib muxstats. can you tell me that which part of library maybe conflict, and some idea for resolve it.

I had update lib to def amplify_version = "2.15.2"
https://github.com/muxinc/mux-stats-sdk-media3

@github-actions github-actions bot added the pending-triage Issue is pending triage label Apr 25, 2024
@mattcreaser mattcreaser added analytics Related to the Analytics category/plugins api and removed analytics Related to the Analytics category/plugins labels Apr 25, 2024
@vincetran
Copy link
Contributor

Hi @sontnfabbi we'll take a look at investigating this issue as soon as we can.

@joon-won joon-won added the bug Something isn't working label Apr 25, 2024
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Apr 25, 2024
@sontnfabbi
Copy link
Author

sontnfabbi commented Apr 26, 2024

Hi @sontnfabbi we'll take a look at investigating this issue as soon as we can.

hi there, I have investigated that your lib get conflict with this lib muxstats. can you tell me that which part of library maybe conflict, and some idea for resolve it.

bow, i had update lib to def amplify_version = "2.15.2"
thks alot.
https://github.com/muxinc/mux-stats-sdk-media3

@mattcreaser
Copy link
Contributor

Hi @sontnfabbi, can you elaborate on what conflict you are seeing? Is there a build time issue, or a run time time issue? Are you suggesting that when mux-stats-sdk-media3 is added to the application then the problem in the issue description occurs, but if it's not added then Amplify behaves correctly?

@tylerjroach tylerjroach added the pending-response Issue is pending response from the issue requestor label Apr 30, 2024
@fabbi-hoanh
Copy link

Hi @sontnfabbi, can you elaborate on what conflict you are seeing? Is there a build time issue, or a run time time issue? Are you suggesting that when mux-stats-sdk-media3 is added to the application then the problem in the issue description occurs, but if it's not added then Amplify behaves correctly?

@mattcreaser It's a runtime issue, an error occurs when building a release with minifyEnabled true.
When not using MUX, everything works fine.
When I configured the debug and release buildTypes to be the same, the error still only occurred with the release build.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue requestor label May 3, 2024
@mattcreaser
Copy link
Contributor

Thanks for the additional info @fabbi-hoanh. It almost sounds like there is some sort of dependency conflict, although it's interesting that it only manifests with release builds. We'll need to investigate this issue.

@mattcreaser mattcreaser self-assigned this May 3, 2024
@fabbi-hoanh
Copy link

@mattcreaser
I added this to proguard and it worked.
-keep class org.json.** { *; }
-dontwarn com.google.ads.interactivemedia.v3.api.**

@mattcreaser
Copy link
Contributor

Thanks for the update @fabbi-hoanh, appreciate the investigation. I'm still unsure about the cause of this issue but I'll look into whether we should have keeping org.json as a consumer rule for Amplify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants