Exception in rendering!

Message: window is not defined

ReferenceError: window is not defined
    at new c (/tmp/execjs20161208-101651-apmtw0js:136:3912)
    at m.mountComponent (/tmp/execjs20161208-101651-apmtw0js:47:15602)
    at /tmp/execjs20161208-101651-apmtw0js:49:31860
    at a.r.perform (/tmp/execjs20161208-101651-apmtw0js:47:12503)
    at Object.a [as renderToString] (/tmp/execjs20161208-101651-apmtw0js:49:31821)
    at r (/tmp/execjs20161208-101651-apmtw0js:50:21164)
    at Object.S.ReactOnRails.serverRenderReactComponent (/tmp/execjs20161208-101651-apmtw0js:32:6073)
    at eval (eval at <anonymous> (/tmp/execjs20161208-101651-apmtw0js:173:8), <anonymous>:10:23)
    at eval (eval at <anonymous> (/tmp/execjs20161208-101651-apmtw0js:173:8), <anonymous>:17:3)
    at /tmp/execjs20161208-101651-apmtw0js:173:8

Q: Headlights come on when off in middle of night draining battery

asked by on

My headlights mysteriously power on in the middle of the night without any key in the ignition or it started and drains my battery about every night almost for a week now. I'm not sure what is going on. Is it a fuse or relay? Is it my turn signal switch and corrosion?? Help please. Tina Daniels

My car has 167834 miles.
My car has an automatic transmission.

A: There are several possibilities that may be...

There are several possibilities that may be the source of this issue - first make sure your headlight switch is in the "Off" position (rather than "Auto" for example). Then remove both the headlight relay and the daytime running light (DRL) relay from the fuse panel. Leave the vehicle overnight to see if the lights come on. If not - progress! Re-install the DRL and headlight relays one at a time - install, leave overnight, check to see if the lights come on. Reinstalling either the DRL or headlight relay causing the lights to come on will identify which of these relays has burned contacts, and is sticking in the "On" position. If you need assistance in diagnosing this issue, a YourMechanic certified technician can come to your location to inspect your vehicle and help find the faulty electrical component.

Was this answer helpful?

Need advice from certified mechanic? Get help now!

Over 1000 mechanics are ready to answer your question.
The statements expressed above are only for informational purposes and should be independently verified. Please see our terms of service for more details

Ask a Mechanic
(100% Free)

Have a car question? Get free advice from our top-rated mechanics.

Ask A Mechanic
Over 10,000 questions answered!

Get an instant quote for your car

Our certified mechanics come to you ・Backed by 12-month, 12,000-mile guarantee・Save up to 30%

Get a quote

What others are asking

Q: What does the Service Vehicle Soon message mean?

The Service Vehicle Soon message can appear on your driver information center (DIC). When the DIC displays this alert, there is an issue with your vehicle that needs to be addressed and serviced.

Q: The traction light is on but the button on the console says it's off. Is it safe to drive the car?

Your car should be safe to drive, however this suggests that you may have a traction control system problem. Your car is equipped with wheel speed sensors at each of the four wheels which monitor wheel speed while relaying this...

Q: Headlights and dashboard lights flash off/on when switch control is switched to lights on

You may need to have the lighting control module reprogrammed to fix the problem with the auto lights. There are technical bulletins to reprogram the module. You will most likely need to have the dealer do this.

Related articles

What Causes Hoses to Leak?
While the largest part of your engine is mechanical, hydraulics plays a significant role. You’ll find fluids at work in a number of different areas. Your car's fluids include: Engine oil Transmission...
How to Avoid Back Pain in a Car
If you have back problems, sitting in a car for an extended period of time can be excruciating. Even without back problems, you could experience discomfort and soreness from...
P2103 OBD-II Trouble Code: Throttle Actuator Control Motor Circuit High
P2103 means there is a fault with the throttle actuator control motor circuit, likely due to a defective electrical component or part.