New Installations and users created after migration - why?

27 views
Skip to first unread message

Tal Barnea

unread,
Jan 7, 2020, 11:58:24 AM1/7/20
to Back4App

I did a test migration of an established app from a different service provider - everything went fine (minus files in mongodb not showing - a separate issue), however when I connected to the newly migrated server with my iOS app, it created a new installation/user/seesion in the database rather than keep using the existing. I am not sure why, but any suggestions how to prevent this would be appreciated as this would pose a significant problem. The users in my app are all automatic anonymous users, with no username/password authentication.

Thanks!

Davi Macêdo

unread,
Jan 7, 2020, 5:38:12 PM1/7/20
to Back4App
Is it a new device connecting to the new server? Or did you update an existing app? How did you update? Did you remove the previous installation and installed the new one?

Best!

Tal Barnea

unread,
Jan 7, 2020, 5:49:21 PM1/7/20
to Back4App
Hi Davi,

It's the same device (iPhone) connecting to the new server. As the developer of the app I just plugged the new server credentials in to the app, recompiled, and installed over the old one. This is pretty much what all users would to through if I switched and released an updated version. The implication of what's happening is that all their saved stuff would be lost. When I went through a first migration (with a different app) when parse.com shut down, I don't recall this happening (I might be mistaken?). Even embedded files were transitioned. It was to a different prover though.

  ...tal

Thanks!

  ...tal

Davi Macêdo

unread,
Jan 8, 2020, 2:34:21 PM1/8/20
to Back4App
I think it shouldn't happen. The app should store the installation id locally to be used again later with the updated app. Can you share the lines of code that you are using to save the installation in the client side?

Tal Barnea

unread,
Jan 8, 2020, 6:37:23 PM1/8/20
to Back4App
Thanks for the prompt reply!  Generally it does not happen. The app does store the installation ID locally, and it is generated only the first time the app is run. On subsequent runs a check is done and a new installation ID is not created. furthermore, the installation ID gets updated, e.g. when the user decides he no longer wants to receive push notifications, etc. It is only after exporting the MongoDB, importing to Back4App, and pointing a newly compiled app (installed as a regular update over the previous version) that a new installation/user/session are created, though interestingly without asking the user again for permission to receive push notification. I will dig a bit deeper in to it, and check your suggestion in the previous post, though I am not sure how to link Installation and user collections.

Thanks again!

Davi Macêdo

unread,
Jan 14, 2020, 3:07:38 AM1/14/20
to Back4App
Give it a try and let me know in the case you need any help.
Reply all
Reply to author
Forward
0 new messages