My employer mistakenly paid taxes in a state I neither live or work in. I won't get the correct W2 before the deadline. What do I do?

My employer paid taxes in CA and I liv ein NY. I am waiting for a new W2. Do I have to file in both CA & NY and amend later?