[ANSWERED] Dependency on the App's Gaia Storage URL being stored in the profile.json


#1

TL;DR: The apps[] entry in the profile.json is used for multiplayer data-storage. If it’s wiped, shared documents (etc) will “disappear” for the users who don’t “own” or have a copy of the data.


There was an issue reported that my extension was causing users to lose data because of it deleting & re-uploading a clean profile.json if something went wrong with fetching/parsing the data (I know this is wrong, I will fix it when I get back to working on the project).

While I have used the extension with no problems, I’ve also noticed that many apps (namely the ToDo App and Lio, among others) do not rely on this feature.

My (test) profile.json currently only has the https://apps.graphitedocs.com and https://www.stealthy.im entries within the apps array, and yet I still have my data persisting for every app I’ve used. If I recall correctly, I’ve even had my profile.json wiped and Stealthy still has my DM history and Graphite still has my documents.

Therefore, my questions are:

  • Why does the apps[] entry in the profile.json exist if it does not need to be used? It seems that deriving the storage URL is the same every time.

  • If some apps are losing data because the entries are removed/not stored, then what should they fix? (Additionally, what did they code to even make this an issue in the first place?)

edit: It seems that they are using this function:

Therefore, another question: why not add in a fall-back to this function to generate the “correct” URL if one is not found in the profile.json?

cc @larry


#2

Only apps that request the publish_data scope during the authentication use this feature. There are apps looking to share and interact with the data of other users.

While a user, Alice, is able to derive her app storage buckets, she’s not able to derive the storage bucket for a given app used by her friend Bob. apps[] is used to find other users’ data, not your own.

Some apps appear to “lose data”, because the data they display to a user is actually another user’s data. In an app that shares documents, for example, deleting the apps[] in my profile might cause documents I’ve shared with other users to disappear because they can no longer find my documents when they sign in.


#3

So if I understand you correctly, it’s just used for multiplayer data storage.

Thanks!


#4

Correct!

You’re welcome :smiley: