Despite being on the same side in WW1, their historic and cultural ties, it seems the Kingdom of Yugoslavia did not recognize the USSR. Where there any unofficial relations? What was the Soviet Union's reaction to the German invasion and occupation?
There were almost no relations, as they had no official ties. There were plenty unofficial relations, but not from the heads of states, but from the Yugoslav communists working in the Comintern and going to schools in Moscow and other cities.
So the majority of the Yugoslav communist leadership that led the party at the end of the 30's was educated in he USSR.
Regarding the war, Stalin put the interests of his country before the interests of the world communist movement and he also ordered the Yugoslavian communists to not provoke the Germans in any way. Even after Germany invaded Yugoslavia, the USSR urged the Yugoslav communists to not openly resist - however they ignored these orders and started carrying out many acts of sabotage and organized a resistance army. After Germany attacked the USSR as well the resistance movement in Yugoslavia really got big.