-
Notifications
You must be signed in to change notification settings - Fork 49
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
Crashing on some user devices when try to access searchPlaceIndexForSuggestions
#1425
Comments
Hello, you've shared two different exceptions ( For |
Both Exceptions are in the same crash stack trace. In the LocationRepository Implementation
In our ViewModel
This mean we are not calling the AWS Location API call outside of the Main but this crash we could not be able to reproduce on our and only happening for some of our users. Since this is executing on Main thread why it is not crashing on our device ? |
I can't say why it's crashing on user devices and not on your test devices. Using the SDK on the main UI thread can result in unpredictable behavior. I'd recommend wrapping your |
We are doing hotfix by setting the dispatcher. I was wondering, since |
|
You are correct in terms of the behavior of the What I am referring to, as an SDK developer, is that those implementing the network calls within the SDK may need to explicitly manage the coroutine context. This would help prevent crashes for the developers or applications consuming the library. Ensuring the appropriate context is set when making asynchronous network calls can mitigate issues related to threading and context switching, which are especially important in environments where concurrency needs to be managed effectively. |
Users are responsible for choosing the appropriate coroutine dispatcher to launch SDK requests on. I'm closing this issue for now, please feel free to open a new issue if you have SDK-specific issues to report. Thanks. |
|
Describe the bug
We have debounce 500ms for user search and if user type text to search for address, we will kill the previous job and create new search for place index request to get the Address suggestions
Regression Issue
Expected behavior
It should not crash the application since the network operation(AWS library internal implementation) is not on the main thread to call AWS location APIs
Current behavior
Some of the users when they try to search for place index is crashing:
at aws.smithy.kotlin.runtime.http.engine.CoroutineUtilsKt$attachToOuterJob$cleanupHandler$1.invoke(CoroutineUtils.kt:51) at aws.smithy.kotlin.runtime.http.engine.CoroutineUtilsKt$attachToOuterJob$cleanupHandler$1.invoke(CoroutineUtils.kt:49)
Steps to Reproduce
We could not be able to reproduce on it our end but we can see lot our end users are getting this and cause the crash the app
Possible Solution
We could not be able to reproduce on our end using the same build that user have
Context
It cause crashing many user devices on the production and need to fix as soon as possible
AWS SDK for Kotlin version
software.amazon.location:auth:0.2.5
aws.sdk.kotlin:location:1.2.38
(Can't update to the latest version due to #1411)Platform (JVM/JS/Native)
JVM (Kotlin) JDK 17
Operating system and version
Android 13
The text was updated successfully, but these errors were encountered: