  A search for the exclusive production of the $Z_c^{\pm}(3900)$ hadron by
virtual photons has been performed in the channel $Z_c^{\pm}(3900)\rightarrow
J/\psi \pi^{\pm}$. The data cover the range from 7 GeV to 19 GeV in the
centre-of-mass energy of the photon-nucleon system. The full set of the COMPASS
data set collected with a muon beam between 2002 and 2011 has been used. An
upper limit for the ratio $BR(Z_c^{\pm}(3900)\rightarrow J/\psi \pi^{\pm}
)\times \sigma_{
  \gamma~N \rightarrow Z_c^{\pm}(3900)~ N} /\sigma_{\gamma~N \rightarrow
  J/\psi~ N}$ of $3.7\times10^{-3}$ has been established at the confidence
level of 90%.
