The question I'm trying to answer is the following:

Let $P \to X$ be a principal $G$-bundle (over a connected CW complex) satisfying that all pullbacks to spheres (of arbitrary dimension) are trivial. Is $P$ trivial? If not, what's the simplest example for a faliure of this?

The following "proof" must be wrong since a very authoritative figure told me today that this should not be true even at the level of the $2$-skeleton.

**The " Proof " :**

Let $f: X \to BG$ be the classfing map of $P$ (assume everything is pointed). Any map $g: T \to X$ satisfying that $f \circ g$ is null homotopic (i.e. $f \circ g \cong *$ where $*$ is the trivial map) factorizes through the homotopy fibre of $f$ which is $E_f=\{(x,\gamma) \in X \times BG^{I} | \gamma(0) = *,\gamma(1)=f(x) \}$.

For a map $g: S^n \to X$, triviality of the pullback bundle $g^*P$ is equivalent to triviality of $g \circ f$ and by the above equivalent to $g$ factorizing through $E_f$. Since any map to $E_f$ gives a map to $X$ we deduce a bijection for all $n$ of homotopy classes $[S^n,X] = [S^n,E_f]$ concluding that $E_f$ and $X$ are weakly homotopy equivalent. (Starting here I assume that $E_f$ has the homotopy type of a CW complex, although I'm not sure if that's necessary). By whitehead we have that $X \cong E_f$ ("strongly" homotopy equivalent).

We proved that the homotopy kernel of $f:X \to BG$ is homotopic to $X$. Consider now the identity map $id_X\in[X,X]\cong[E_f,X]$. We have that $f=f \circ id_X \cong *$ (null homotopic) by the property of the homotopy kernel. QED.

So now my question has two parts:

**1) What's wrong with the above proof?**

**2) What's the simplest example of a principal bundle (or vector bundle) that can't be detected by spheres?**