Consider a simplest 3D solution of Maxwell's equations: $$\vec B=\vec e_z \cos\left(\frac{2\pi}{\lambda}(ct-x)\right),$$ $$\vec E=\vec e_y\cos\left(\frac{2\pi}{\lambda}(ct-x)\right),$$
and propagation is in direction of $\vec e_x$.
I'd like to find some vector potential $\vec A$ and scalar potential $\phi$ for such wave. I've tried using known expression for static uniform magnetic field: $\vec A=\vec e_y B x$, which satisfies $\vec B=\nabla\times \vec A$ and multiplying it by the cosine factor: $$\vec A=\vec e_y B x\cos\left(\frac{2\pi}{\lambda}(ct-x)\right),$$ but despite it does satisfy $\vec B=\nabla\times \vec A$, it appears that I can't have correct result for $\vec E=-\nabla\phi-\frac{\partial\vec A}{\partial t}$ (at least if I use $\phi=\mathrm{const}$). Using another expression for static part of $\vec A$, $\vec A=\frac{B}2\left(\vec e_y x-\vec e_x y\right)$, gave even worse result. Seems either I use wrong expression for $\vec A$, or I have to add non-const $\phi$.
What would be the correct way of determining the potentials?