Devs are aware and working on it.
I advise against editing the db.json directly as it is risky. Using the private server cli you can enter the following after replacing the username parameter:
storage.db.users.update({username:username},{$set: {badge: {type: 0, color1: '#000000', color2: '#000000', color3: '#000000', param: 0, flip: false}}})
This will work with the screepsmod-mongo mod as well if you are using that.
For private servers that are not being hosted by yourself you will have to contact the server admin to get the badge set so you can fix your map and place your spawn.
Most third party servers listed on the screeps client frontpage have slack channels on chat.screeps.com so feel free to stop by and ask for support.