-
Notifications
You must be signed in to change notification settings - Fork 87
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
Migration from v3 to v4 doesn't work? #243
Comments
Hi @vietstone-ng, great to hear that you are trying to upgrade to the v4 SDK, though it is unfortunate that the migration isn't going smoothly. Are there any logs? Could you describe a bit more about what exactly isn't working? |
Hi @chungdaniel there's no debug log from the SDK and no events received on server side. |
@vietstone-ng I tried using your sample code in the example app for the Amplitude-Flutter app and wasn't able to reproduce the issue - I was able to get events sent. One thing to note is that by default we wait 30 seconds before the event queue is flushed and sent over to Amplitude, though this was the same behaviour in v3. I'm assuming you have waited longer than 30 seconds before checking if events have sent? Is the correct API key being passed to the SDK? |
@chungdaniel I found the problem. It's because default minIdLength is 5 in v4. I changed it to 1, and everything works. Just want to know the reason behind this change? Thank you. |
@vietstone-ng ah, good catch! Our v3 SDK used an older version of our HTTP API, which did not have any enforcement of userId/deviceId length. Our v4 SDK uses our HTTP v2 API which enforces a minimum length of 5 as shorter ID lengths could potentially cause instrumentation issues. I'll add this to the migration guide and an item in our backlog to add debug logging for insufficient length of IDs. Thank you! |
The docs have been updated to explicitly mention that there is now a default minimum length for userId and deviceId on both the v3 -> v4 migration guide and for the v4 docs. Thanks for finding this! |
Hi,
I'm migrating from v3 to v4. My migrating code is quite simple as below.
My app is currently working with v3, but not with v4 on both Android, iOS.
Not sure what's wrong with my migration.
The text was updated successfully, but these errors were encountered: