Sharedrop keeps loading after deployment
I think I might have done something wrong, as I'm not familiar, with the firebase db. I created a realtime db, copied the link shown under the "Data" tab and put it in the FIREBASE_URL env. I changed the rules to this:
{
"rules": {
".read": true,
".write": true
}
}
[Sign up](https://www.firebase.com/) for a Firebase account and create a database.
Go to "Security Rules" tab, click "Load Rules" button and select firebase_rules.json file.
Take note of your database URL and its secret, which can be found in "Secrets" tab.
I think some things might have changed on the firebase side as I couldn't find "Load Rules", just a Rules tab. The "Secrets" tab I couldn't find that either. I guess it's all within the Rules editor now?
I put nothing in the FIREBASE_SECRET env (for testing). Unfortunately I don't see any logs of not being able to connect to a firebase db. So I'm not sure if it connects or not.
Can someone tell me what I'm doing wrong?
https://sharedrop.mindglowing.art/
the same thing happens to me
how can we solve it
You can get FIREBASE_SECRET when you go to Project settings -> Service accounts -> Database secrets.
However, I do not know if these secrets are created for new Firebase projects, as they are marked as deprecated. FIREBASE_SECRET is only used to generate authentication token in server.js file. You might be able to update the code to use a non-deprecated solution to generate them, or even skip this part completely and have unauthenticated users.
You can get
FIREBASE_SECRETwhen you go to Project settings -> Service accounts -> Database secrets.However, I do not know if these secrets are created for new Firebase projects, as they are marked as deprecated.
FIREBASE_SECRETis only used to generate authentication token inserver.jsfile. You might be able to update the code to use a non-deprecated solution to generate them, or even skip this part completely and have unauthenticated users.
I found the secret and added the secret to the .env file, however it still keeps loading...
@kenjibailly The error handling could be done better, but the error I'm getting on your page is the following:
"FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com "
Yours is: "https://sharedrop-mindglowingart-default-rtdb.europe-west1.firebasedatabase.app/"
I tried to find that "firebasio" url, but couldn't find it. So I just tried to change FIREBASE_URL with these: https://sharedrop-mindglowingart.firebaseio.com/ https://sharedrop-mindglowingart-default-rtdb.europe-west1.firebaseio.com/
But they also keep loading. All I can find is https://sharedrop-mindglowingart-default-rtdb.europe-west1.firebasedatabase.app/
I'm not entirely sure how to proceed from here, thanks for answering though!
For Sharedrop the FIREBASE_URL is https://sharedrop.firebaseio.com. This is the URL that I see in Firebase console when I go to "Realtime Database" and "Data":
If you deploy a new version with a correct FIREBASE_URL and it still doesn't work, let me know and I can see if I can find what's wrong. This would help me to update the docs to make it easier for others to deploy it themselves.
For Sharedrop the
FIREBASE_URLishttps://sharedrop.firebaseio.com. This is the URL that I see in Firebase console when I go to "Realtime Database" and "Data":
If you deploy a new version with a correct
FIREBASE_URLand it still doesn't work, let me know and I can see if I can find what's wrong. This would help me to update the docs to make it easier for others to deploy it themselves.
Well that's the initial url I used, please have a look at my screenshot.
Got it. Most likely the URL pattern has changed, but the ~10 year old version of the Firebase library used in Sharedrop does not support the new URL pattern :/ I can see if I can update the library, but it might be non-trivial, as a lot has changed :/
Got it. Most likely the URL pattern has changed, but the ~10 year old version of the Firebase library used in Sharedrop does not support the new URL pattern :/ I can see if I can update the library, but it might be non-trivial, as a lot has changed :/
Okay thank you for looking into it, please let us know if you got an update regarding this!
I changed the json file and removed all . and $ and stuff like that
firebase.txt
can it be a solution? because then you can load that file
Has someone found a workaround to the new URL format of Firebase databases? Since every newly created database is not supported by the old library anymore.
