-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Pinpoint: Exceeded maximum endpoint per user count: 15 #7251
Comments
Thanks @joebernard! Are you seeing this locally in development during test or in production use? |
@jpignata I've only been able to test in development so far but the previous time this happened it was affecting production too. This only started breaking again after upgrading to |
Also here |
Amplify updated to 3.3.10 and it worked |
Interesting. Maybe this is only broken in the modular packages. Unfortunately I cannot easily convert. |
I am not using modular packages, was on amplify 3.3.9 and encountered this issue. Updating to 3.3.10 did not resolve the issue. Update: reverting to 3.3.8 resolved it for now. |
Can we get an update on how to proceed now that we are stuck with this artificial endpoint limit? Are we expected to manually manage this limit within Pinpoint somehow? What was the rationale behind removing this functionality? This has become a huge blocker for my team. |
Hi @joebernard - we're working on this with Pinpoint and will have more to share soon. Do you have anytime to chat tomorrow on discord perhaps? I'd like to learn more about the block and see if we can help. Happy Thanksgiving! |
@jpignata That would be helpful. I can meet anytime between 9:00 AM and 2:00 PM ET Nov 27. Happy Thanksgiving to you as well. |
@joebernard Are you ok if we resolve this issue? Just wanted to validate if there were any other issues you were facing after our conversation last week. Please let us know |
Hi @sammartinez, thanks for asking. I would consider my case temporarily mitigated by rolling back, but the underlying issue re-introduced in To me, this is a showstopper that precludes us from upgrading to |
I thought it worked but it was only in the web version. |
I believe new endpoints not only occur when you uninstall apps, but just by clearing local storage. For us, our big concern is that iOS users will stop receiving push notifications as we can't update the endpoint with the address with the new token. |
This is now the 5. incarnation of the very same topic. It seems this problem keeps popping up every other release. I guess it may be due to the fragile nature of the underlying code, where the returned message is string-checked to be starting with 'Exceeded maximum endpoint per user count' in AWSPinpointProvider.ts#461:
A slight change of the message kills it, which already happened in the past. Also OP seems absolutely right with his assumption that PR #7245 removed the clean-up of unused endpoints which worked perfectly before. How is this supposed to be handled? |
Here's a manual workaround you can do using the CLI for each affected user: step 1. Use cognito to search for the affected users subin this example i found user 719f397f-c6a6-4598-b603-7cc4d9d17911 step 2. see how many endpoints are in pinpointaws --profile YourProfile pinpoint get-user-endpoints --user-id 719f397f-c6a6-4598-b603-7cc4d9d17911 --application-id daafcc04059a444aa9363e484113c189 count them .. here i'm using ➜ aws --profile YourProfile pinpoint get-user-endpoints --user-id 719f397f-c6a6-4598-b603-7cc4d9d17911 --application-id daafcc04059a444aa9363e484113c189| jq '.EndpointsResponse.Item[]|.Id' | wc yup there are 10. so this user can't sign in due to this 10 endpoint restriction step 3. Clear the oldest endpoints3a. find the oldest ones. I scanned the list printed in step 2 and had manually found the newest endpoint creation date ('2020-12-18T19:45:48.212Z') to put in this expression:
"3aa4dc90-2501-11eb-a16e-99d12931a92e" 3b. use xargs to delete themaws --profile YourProfile pinpoint get-user-endpoints --user-id 719f397f-c6a6-4598-b603-7cc4d9d17911 --application-id daafcc04059a444aa9363e484113c189| jq '.EndpointsResponse.Item[]|select(.CreationDate | contains("2020-12-18T19:45:48.212Z") | not)|.Id' -r |
@sammartinez Has there been any progress on this "exceeded maximum endpoint per user" issue"? @dylan-westbury Which version of |
Hi @joebernard We upgraded aws-amplify and noticed this issue, so we downgraded back to the last working version we had within the app, which was:
We no longer received the "exceeded maximum endpoint per user" once we downgraded. |
I've recently updated to Would be nice to get someone from the amplify team commenting on the issue. Is there any config change that we need to apply in order to resolve this? Or is it a bug that need to be reverted as per suggested in aws-amplify/amplify-cli#5918? |
@the-smart-home-maker there definitely needs to be something done with this issue, it has been going on for way too long and needs some crazy "workarounds" that are not guaranteed to work :D |
I got the same problem with amplify 4.3.12.
The workaround worked partially #7251 (comment) It seems to be a problem with browsers who had these local storage objects set for a long time, using a different/new browser did not trigger the problem as well as deleting the local storage. |
Now is this 100% confirmed to be fixed with the latest PR by @hkjpotato? @dylan-westbury Is this an error you still see on prod? |
Hi @nubpro Amplify version is Were you expecting it to be fixed in these versions? This is in dev, but we are facing push notification issue in production. What we notice is, overtime users will stop receiving push notifications in production. At first they will work, but then after some months they stop. So assuming the latest endpoint is not able to save once limit is reached, occasionally? Perhaps endpoints are changing from optOut NONE to ALL when creating a new endpoint? As this issue has been ongoing for 2 years and there has been lots of instructions of how to implement on various Github issues that doesn't reflect what is shown in the documentation and lots of work arounds and hacks posted by everyone, is it possible to provide the exact expected way to implement and we can test that? For example, do we still need to update the endpoint ourselves like this. For our use case, we request push permission once user is logged in in iOS and update when onRegister is called. But we also store in local storage and update providing it exists as well as the userId, because for Android the user may not be logged in when the token is received.
Or can we depend on @aws-amplify/pushnotification to do this for us? Or another preferred suggestion? |
FYI @Samaritan1011001 ^ |
@josefaidt - any chance you can take a look at this issue? 🙏🏼 |
Can we get an update on this? Is Amplify now managing Pinpoint endpoints correctly or do we need to do it manually? Trying to weigh using Amplify on a new project and this is a deal breaker. |
Hi, issue: AWSPinpointProvider - updateEndpoint failed Exceeded maximum endpoint per user count:15
I am using analytics in the following way:
then later, I start recording my analytics:
Using the application in the browser with the localstorage clear (no cookies), when I log in, I can see the events that are called to pinpoint without problems; now I just refresh the browser and start to get: AWSPinpointProvider - updateEndpoint failed Exceeded maximum endpoint per user count:15 If I log out, clean the localstorage, and log in again, everything is ok; I refresh the browser, and the problem comes back. Can someone tell me what the best practices to record analytics with pinpoint are? I'm not using it for notifications, just to record analytics. And after reading this thread I'm not clear if any version of amplify it solves the problem or if after almost two years the problem persists. Thanks more info: System: |
Hello everyone, we are working with the Pinpoint team to alleviate this issue. In the future, the Pinpoint team is going to allow events to be recorded at the "User" level rather than at the endpoint, which would mean that the creation of the 15 endpoints would be significantly less prone to happen since an endpoint would not be required for recording analytics events. We will keep you updated when we have a path forward. |
That is great news. Looking very much forward to that! |
Thanks for your update, meanwhile is there any recommendation to fix this limitation? |
To get around this now, you would need to use the AWS SDK and directly interact with Pinpoint to cleanup any unused endpoints for a specific userID. The only issue is identifying WHICH endpoints are actually unused, Pinpoint does not provide that information by default in the Endpoint information, so you will have to create some mechanism to detect that - maybe by using a custom attribute for example on the Endpoints to capture that. |
FWIW, we have had success by using the following to configure Amplify Analytics:
where |
Hi gspeicher, thanks for your suggestion, I'm going to try it, but first I have a question, the user I'm testing is giving me this error, how could I delete the endpoints for that user in pinpoint? |
Hey there, one of the possible options is to clear it via the SDK ( |
Hi @wasurocks - we completely agree with you, this is extremely frustrating. We are working closely with the Pinpoint team to get this resolved. We will provide timelines on when we expect this issue to be resolved. |
Hi @abdallahshaban557, any news on this issue? |
Hi. Are there any updates on this issue? I am seeing this problem in |
Hello @abdallahshaban557, we are also facing this issue with version |
Hi @irfancnk - I am no longer a part of the Amplify team - I am adding @haverchuck /@renebrandel/ @cwomack to help answer this for you. |
Any updates on this? |
I am getting this error as well. But I still seem to get the notifications. This issue has been open for 4 years. Is this error benign? |
Using identifyUser worked well. import { record, identifyUser } from "aws-amplify/analytics";
...
await identifyUser({
userId: userInfo.username,
}); |
Any update on this? We're experiencing the same issue due to browser cache getting cleared frequently. |
Describe the bug
After upgrading to
"@aws-amplify/analytics": "^4.0.0"
push notifications have stopped working. I can no longer update endpoints. This was originally solved in #5423 but seems to have reappeared recently. Possibly related to the merge in #7245 .To Reproduce
Install the app on a device more than 10 times.
Expected behavior
Amplify should clear old endpoints as mentioned in the docs.
Environment
Additional context
May be related to #7245
The text was updated successfully, but these errors were encountered: