I recently wiped my local mongo and after creating...
# give-feedback
f
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?
f
Hi Rufei
let me look into that
f
Did you restart the GrowthBook container after wiping mongo? I believe we check on startup if any organizations exists yet and cache the result.
f
I did, following the docs
Copy code
docker-compose pull growthbook
docker-compose stop growthbook
docker-compose up -d growthbook
f
I'm just spinning up a VM to try and reproduce the issue
f
also thought I was going insane earlier so I threw in a
Copy code
docker-compose up -d --force-recreate
for good measure
f
what did you wipe in mongo?
all of it? or just certain collections?
f
I stopped and removed the entire container and recreated it, so without any volume mounts I think that should've wiped all of it
f
let me try that...
did you use docker image rm or docker rmi or were you using the file system?
f
I was going through docker-compose, which I assume calls
docker image
and
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?
f
let me try more
ah!
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
f
Wow thanks for nailing that down so fast Graham!
f
no problem
sorry about that
I can help you insert a blank org document into your mongo if you want to get unblocked
f
I got it with some fiddling around, thanks though 🙂
f
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