I recently wiped my local mongo and after creating...
# give-feedback
I recently wiped my local mongo and after creating the first user, got booted out to the "Ask your admin to invite you to the organization." message. I noticed PR#92 was supposed to disable creating more than one organization on non-cloud deploys, but it seems creation is being disallowed even when there are no organizations at all. Poking around the db reveals the user was created anyway and that no organizations exist. Did I miss a change to how initial signup works for single-tenant setups between 0.5.0 and 0.6.0?
Hi Rufei
let me look into that
Did you restart the GrowthBook container after wiping mongo? I believe we check on startup if any organizations exists yet and cache the result.
I did, following the docs
Copy code
docker-compose pull growthbook
docker-compose stop growthbook
docker-compose up -d growthbook
I'm just spinning up a VM to try and reproduce the issue
also thought I was going insane earlier so I threw in a
Copy code
docker-compose up -d --force-recreate
for good measure
what did you wipe in mongo?
all of it? or just certain collections?
I stopped and removed the entire container and recreated it, so without any volume mounts I think that should've wiped all of it
let me try that...
did you use docker image rm or docker rmi or were you using the file system?
I was going through docker-compose, which I assume calls
docker image
docker rm
Copy code
$ docker-compose down --rmi all
Stopping growthbook_growthbook_1 ... done
Stopping growthbook_mongo_1      ... done
Removing growthbook_growthbook_1 ... done
Removing growthbook_mongo_1      ... done
Removing network growthbook_default
Removing image mongo:latest
Removing image growthbook/growthbook:latest
I take it it's proving hard to reproduce?
let me try more
I reproduced it
let me see if I can fix it easily
found the problem
So deleting the container and then reinstalling it deletes the organization document, but for some reason keeps the user document
⁉️ 1
we were not handling this edge case. I have a fix in a PR, should go live tomorrow
🙌 1
Wow thanks for nailing that down so fast Graham!
no problem
sorry about that
I can help you insert a blank org document into your mongo if you want to get unblocked
I got it with some fiddling around, thanks though 🙂
Copy code
db.organizations.insert({"ownerEmail":"<mailto:not@real.com|not@real.com>","name":"My Company","url":"","invites":[],"members":[{"id":"<grab the user _id>","role":"admin"}],"id":"org_skawiri7kv3k5f7e","__v":0});
ok, cool