You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AndroidIssues specific to the Android PlatformbugSomething is not working; the issue has reproducible steps and has been reproduceddatastoreIssues related to the DataStore Category
Sometimes during syncing models we see this error:
java.lang.ArrayIndexOutOfBoundsException: length=49; index=49 at java.util.ArrayList.add(ArrayList.java:468) at com.amazonaws.amplify.amplify_datastore.DataStoreHubEventStreamHandler.getHubListener$lambda-0(Unknown Source:12) at com.amazonaws.amplify.amplify_datastore.DataStoreHubEventStreamHandler.a(Unknown Source:0) at d.b.a.e.s0.onEvent(Unknown Source:2) at com.amplifyframework.hub.AWSHubPlugin.a(Unknown Source:4) at d.c.g.b.run(Unknown Source:4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012)
It shows in both headless and foreground mode. It doesn't affect app working, but seems sometimes adding hub event to event history fails.
Categories
Analytics
API (REST)
API (GraphQL)
Auth
Authenticator
DataStore
Notifications (Push)
Storage
Steps to Reproduce
Hard to reproduce it in the app with particular steps. One of our team's member found this when add object and than immediately edit it (but it's not showing all the time in this particular case). We see a lot of this bugs in production and everytime it shows during sync when a lot of models are syncing like in those logs:
[Headless HubListener] networks active : true
13:04:17
[Headless HubListener] sync on models : [Yepic, Image, ImageNote, Task, TaskNote, Stop, YepicVisit, OpenVisit, Note, YepicPlace, VisitNote]
13:04:17
[Headless HubListener] sync on model : Yepic , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
13:04:20
[Headless HubListener] sync on model : Image , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
13:04:20
[Headless HubListener] sync on model : ImageNote , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
13:04:20
[Headless HubListener] sync on model : Task , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
13:04:20
[Headless HubListener] sync on model : TaskNote , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
13:04:23
[Headless HubListener] sync on model : Stop , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
13:04:24
[Headless HubListener] sync on model : YepicVisit , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
13:04:24
[Headless HubListener] YepicVisit model synced - turning observer on
13:04:24
CRASH
java.lang.ArrayIndexOutOfBoundsException: length=73; index=73
MAPPINGS
Missing
STATUS
Open
Received:2023-05-24 13:04:24
java.lang.ArrayIndexOutOfBoundsException: length=73; index=73
at java.util.ArrayList.add(ArrayList.java:468)
at com.amazonaws.amplify.amplify_datastore.DataStoreHubEventStreamHandler.getHubListener$lambda-0(Unknown Source:12)
at com.amazonaws.amplify.amplify_datastore.DataStoreHubEventStreamHandler.a(Unknown Source:0)
at d.b.a.e.s0.onEvent(Unknown Source:2)
at com.amplifyframework.hub.AWSHubPlugin.a(Unknown Source:4)
at d.c.g.b.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Expand
13:04:24
[Headless HubListener] sync on model : OpenVisit , added : 0, deleted : 0, updated : 0, delta sync : true, full sync : false
looks like everytime the problem is connected with adding new event to event history. We are trying to figure out if the problem is on our code side or on Amplify Flutter side and if we are doing something wrong what it can be. Any suggestions will be very helpful
Screenshots
No response
Platforms
iOS
Android
Web
macOS
Windows
Linux
Flutter Version
3.10.4
Amplify Flutter Version
1.1.0
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered:
Looking at the stacktrace,
An index out of bounds within the add method will be likely to add something to an Array with an index that was too big. The ArrayList stores its data in an Array and maintains the size of that Array automatically. If 2 threads call add at the same time the check for capacity can pass, with only one thread successfully adding, then the other thread will throw the java.lang.ArrayIndexOutOfBoundsException.
This indicates there is a multithread issue when amplify is playing the events…
AndroidIssues specific to the Android PlatformbugSomething is not working; the issue has reproducible steps and has been reproduceddatastoreIssues related to the DataStore Category
Description
Sometimes during syncing models we see this error:
It shows in both headless and foreground mode. It doesn't affect app working, but seems sometimes adding hub event to event history fails.
Categories
Steps to Reproduce
Hard to reproduce it in the app with particular steps. One of our team's member found this when add object and than immediately edit it (but it's not showing all the time in this particular case). We see a lot of this bugs in production and everytime it shows during sync when a lot of models are syncing like in those logs:
looks like everytime the problem is connected with adding new event to event history. We are trying to figure out if the problem is on our code side or on Amplify Flutter side and if we are doing something wrong what it can be. Any suggestions will be very helpful
Screenshots
No response
Platforms
Flutter Version
3.10.4
Amplify Flutter Version
1.1.0
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered: