Common point for both shore and generator is the transfer switch. Remove the cover and check the connections at the outlet for the switch—the wires that go to your electrical panel. If no obviously loose connections, loosen then retighten them anyway.
If you are confident, check, tighten, then test the voltage at the inlet lugs with a meter, both connected to shore then disconnect and test on generator. Do you read 120 VAC from shore and from generator lugs? If not, check shore breaker and generator breakers.
If you are getting 120 VAC through the transfer switch, the problem moves to your panel and/or inverter.
BTW, what is it that “flashes for just a moment then goes off?” That could be a clue, but don’t know to what you refer.
Larry, Eileen, and Finley
2004 Alpine 36FDDS
Third motor home, first Alpine, no need for another.