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?**



Principal bundles that can't be detected by spheres
If all maps are involved are pointed, your question is equivalent to the following: if $f : X \to BG$ is a map (where $X$ is connected) such that the induced map on $\pi\_{\bullet}$ is zero, is $f$ zero (nullhomotopic)? The answer is no, although it's easiest to give a counterexample if we replace $BG$ with an arbitrary space $Y$ (although if $G$ is allowed to be any topological group, $BG$ can be any connected space). 


For example, if $X = BG$ for a discrete group $G$ and $Y = B^2 A$ for an abelian group $A$, then $X$ and $Y$ do not share nonzero homotopy groups in any degree, but maps $BG \to B^2 A$ correspond to classes in group cohomology $H^2(G, A)$, or equivalently to central extensions $A \to E \to G$. (This is a basic but important class of counterexamples to many naive guesses about how homotopy theory and higher category theory work; for example, it shows that a functor between 2-categories is not determined by what it does to objects, morphisms, and 2-morphisms. In this case all of the interesting data of a map $BG \to B^2 A$ is in coherence isomorphisms.) 


As for what goes wrong in your proof, the condition says that if $g : S^n \to X$ is any map, there exists some trivialization of the pullback bundle $g^{\ast} P$. This means that the natural map $\pi\_0 [S^n, E\_f] \to \pi\_0 [S^n, X]$ is a surjection, not a bijection. To get a bijection on $\pi\_0$ you also want trivializations to be unique up to homotopy. 


Let's see explicitly how your proof breaks down in the above example. Let $n = 1$ in the example $X = BG, Y = B^2 A$ above. Here the homotopy fiber of a map $f : BG \to B^2 A$ is $BE$ where $E$ is the central extension classified by $f$. A map $g : S^1 \to BG$ picks out an element $g \in G$ (conveniently). The composite $f \circ g : S^1 \to B^2 A$ is always nullhomotopic, so each $g$ always lifts to a map $\widetilde{g} : S^1 \to BE$, or equivalently an element $\widetilde{g} \in E$, which is clear since $E \to G$ is surjective, so admits a section. But lifts are not unique, and there's no reason we can choose lifts so that $g \mapsto \widetilde{g}$ is a homomorphism (which would correspond to a section of $BE \to BG$). 


