I use plain tap water, (our well water, which isn't chlorinated) add it to the potato flake media I get from Saurian, sprinkle the top with just a little Baker's yeast, stuff in some excelsior (to give more space for pupae,) and keep my cultures in a closed, unlighted cupboard. So I don't think light is a major factor, although they might do a bit better with light. In my own experience, they do just fine in the dark and are out of sight.
You could try fixing the media ahead of time and allow the yeast to activate for a few hours before adding the flies. There may be an initial burst of CO2 that is overwhelming them, but again, I don't do this myself and have no particular problems. I just read this advice somewhere in the past, so pass it on.
Check that the media isn't too wet. The flies may be drowning. The temps should be around 72 degrees. The excelsior should also help keep the flies above any media that may be too wet.
I use 1 quart delicups, cut a half dollar sized hole in the center of the lid and squash this down over a piece of heavy paper towel, although coffee filters are sturdier. (I sometimes have a bit of trouble with the larvae getting through the paper toweling and pupating between the lid and towel on the outside.) I also add a lot more flies than 30 for starters--from a culture that is about midway through its cycle, probably 100 or more, although I don't count them. With only 30 or so, you may not have enough young breeding flies vs old ones.
How are you cleaning the glass jars? That's about the only other thing I can think of that could cause your problem as you've described. It's best to boil them after washing them in soap and water and rinsing well. If you are sanitizing them with chlorox, this may not be getting rinsed away enough.
I'm not sure any of us has a single correct answer for you. It must be very frustrating for you. But be assured you will get it to work, and once you do, it's a "piece of cake," whatever that means.
-----
Patty
Pahsimeroi, Idaho
4 D. auratus blue
5 D. galactonotus pumpkin orange splash back
5 D. imitator
6 D. leucomelas
4 D. pumilio Bastimentos
4 D. fantasticus
4 P. terribilis
4 D. reticulatus
4 D. castaneoticus