Someone already touched on this, but to be more specific, if you have a weak connection in the plug from the wiring harness to the resistor (from the dreaded green or white corrosion-with or without loose powder being present) it could be making and breaking contact as the wiring moves around-or from changes in ambient temperature. (Also check and burnish the connector for your interior fan switch. See below)
Take a close look and if you don't see anything obvious, at least connect and disconnect that plug several times to burnish the contacts. If it then works more reliably, shoot some electrical contact cleaner (or solvent type carb cleaner) into it, burnish it some more, and spray more cleaner into it afterwards. Then let it dry out completely and put dielectric grease in it. That keeps the connection protected against moisture and a repeat situation. When I do this cleaning-out I put a rag or paper towel under the connector to see what, if anything, comes out. It also helps contain the dripping solvent.
If you do find ANY connector that has this sort of corrosion, its a good idea to check every other one that you can for the same thing. More exposed wiring for external devices (turn signals, headlights, brake lights, etc) are especially vulnerable to this.
This type of corrosion inside connectors is something that's common in older vehicles-especially if they've spent time in the rust belt or any area where road salt is used, (or near the Salt Flats), or close to an ocean with the salt air exposure.
DON'T DO THIS WHILE SMOKING OR NEAR A HOT ENGINE OR A NEARBY HEAT SOURCE IF USING ANY VOLATILE SOLVENT CLEANER.