Wavefunction collapse in relativity It is well accepted that quantum theory has well adapted itself to the requirements of special relativity. Quantum field theories are perfect examples of this peaceful coexistence. However I sometimes tend to feel little uneasy about some aspects. Consider an EPR pair of particles light years apart. Suppose there are 2 observers moving relative to each other with constant relative velocity. Let us consider, there are spin detection mechanism at both end for each particle. Now suppose one of the observer is at rest w.r.t. the detector for the first particle. As soon as the detection made, the wave function of the 2 particle entangled system will collapse instantaneously and the second particle must realize a definite opposite spin value. Now due to relativity of simultaneity, the second observer may claim that the collapse of the wave function for the two particle system is not simultaneous. He may even claim that the second particle is measured first. In that case a special frame of reference will be privileged, the frame at which the wave function collapsed instantaneously. This will cause a significant strain on the core principle of special relativity.
I am sure the above reasoning is flawed. My question is where?
 A: There's no privileged reference frame here.  Just two observers with consistent measurements and a disagreement on the order of events (as is typical in relativity).
Remember the collapse of the wave function isn't something you can observe.  You can observe the spin of one of the particles being measured, and then you can observe the spin of the other particle being measured, and these measurements are guaranteed to be consistent due to the entanglement.  Each observer will conclude that the first measurement (as determined in his reference frame) collapsed the wave function.
If your observers disagree on which measurement happened first, then perhaps they'll dispute which measurement collapsed the wave function, or when this collapse happened.  But certainly there won't be an observer who thinks the wave function collapse wasn't instantaneous, (unless that observer doesn't understand quantum mechanics).
A: The reasoning is flawed for multiple reasons. One of them is that there is no physical wave-function collapse so in particular there can't be any problem with relativity. More precisely, entanglement is only about correlations between particles. That is, if you carry out experiments and later (after both observers who measured individual particle meet) they will notice that there was a correlation.
And this has to do with another flaw: locality. You are simply not allowed to say anything about stuff you don't measure. And that is only the stuff in your past light-cone. You just can't say anything about the other particle which is space-like separated from you (for all you know, it might no longer exist, having been absorbed by a BH).

He may even claim that the second particle is measured first.

Sure, this is because there is no notion of causality between space-like separated events. This alone should be enough to convince you that wave-function collapse is completely unphysical. It is just a convenient tool of Copenhagen interpretation (which simply ignores the measurement problem) that has its limitations.
A: Since the status of the wave function "collapse" is still subject to open debates, let's just assume a moment that it is physical and that it is  instantaneous, which of course can only be true in some particular frames according SR. 
Within semiclassical gravity for instance, such instantaneous collapse generically leads to the possibility of faster than light signaling so that the theorists working with semiclassical gravity are aware that a "consistent fundamentally semi-classical theory of gravity can therefore only be achieved together with a suitable prescription of the wave-function collapse to avoid such superluminal signalling". https://arxiv.org/pdf/1407.4370.pdf
(As for semiclassical gravity, it is motivated by the analysis and conclusion of https://arxiv.org/abs/0802.1978 that "Despite the many physical arguments which speak in favor of a quantum theory of gravity, it appears that the justification for such a theory must be based on empirical tests and does not follow from logical arguments alone.")
Then not only the original question becomes an interesting and relevant one but moreover, i'm wondering why after all should we dismiss the possibility of instantaneous signaling ? Does faster than light signaling unavoidably lead to causality issues ? : may be not if there is a single unic privileged frame where all collapses are instantaneous (let's say the CMB restframe is the instantaneity frame). Then i (A) can send a message to my colleague (B) very far from me instantaneously and he can send it back to me also instantaneously still in this same privileged frame using QM collapses (whatever the relative motions and speeds of A and B and relative to the global privileged frame): the round trip duration is zero in this frame so it is zero in any other frames (because the spatial coordinates of the two end events are the same): so there seems to be no problem : no backward in time signaling with those instantaneous transmissions... i can hardly believe that a privileged frame is all we need to get rid of causality issues so ... what did i miss ? (if there is some time between B reception and reemission eventually A still receives in it's future: no CTC)
A: Let me rephrase your question with the simple, but wery illustrative example 
Let's call the event of detection of the first spin as $A$ and the event of detection of the second spin as $B$. Suppose that $A$ and $B$ are timelike events. Then you can choose such a reference frame, where $t_A>t_B$. But also there exist a reference frame, where $t_B>t_A$.
The conclusion is inavoidable:  


*

*In the first reference frame collapse happened before the detection of first spin. 

*In the second reference frame collapse happened before the detection of second spin.


In other words: The moment of collapse of the wave function depends on reference frame.
Is there any contradiction? -- No. You cannot devise an experiment that "detects" this collapse. You cannot use this collapse to transmit a signal. e.t.c. If you feel like "there is a condtradiction" -- try to get down to the level of a concrete experiment that demostrates this contradiction. You will see that any attempt to formulate such experimet will fail.
A: Just add a few points to the other answers. There are two immediate topics that are being conflated in the question. For me the ontology of QM has not been resolved and so I can only discuss some points from my current perspective.
Firstly QFT deals with relativistic fields and so is unlikely to be associated with any Special Relativity paradoxes or oddities. By contrast the EPR experiment was about QM, which is expressed in a Newtonian manner with phrases like "instantaneous collapse" which are at odds with Special Relativity - whether "collapse" is physical or not the word "instantaneous" should not also be used. Of course it sometimes is because QM is a Newtonian theory - you need QFT for the relativistic aspects!
As other answers have suggested this might be resolved if the "collapse" is not physical. Related to this is the issue as to whether $\Psi(x)$ is defined over physical space (in a field like manner as presented in elementary QM) or whether it should be taken as a member of an abstract Hilbert space only (and thus not subject to spacelike processes). Alternatively a conclusion could be that "collapse" is physical - but somehow local. GRW (and its variants) is such a physical collapse theory. For such a theory your example then becomes a valid gedanken experiment for that model of collapse.
The second point is that one needs to separate the issue of "collapse" - where/when/if and how - from the correlation issues in this EPR experiment. The story of EPR and Bell's theorem is still ongoing. See  Disproof of Bells Theorem if you wish to pursue that aspect further.
