What is wrong with this proof (that all vector bundles of the same rank are isomorphic)?

Suppose I have two vector bundles $E \rightarrow M, E' \rightarrow M$ of rank $k$ on a smooth manifold $M$. Let $\mathcal{E}(M), \mathcal{E'}(M)$ denote their spaces of smooth sections. We can choose some arbitrary isomorphism $\phi_p: E_p \rightarrow E'_p$ for all $p \in M$, where $E_p, E'_p$ denote the fibers above $p$.

Now we use this to define a map $\mathcal{F}: \mathcal{E}(M) \rightarrow \mathcal{E'}(M)$ as follows. For any smooth section $\sigma \in \mathcal{E}(M)$, define the section $\mathcal{F}(\sigma)$ by $\mathcal{F}(\sigma)(p) = \phi_p(\sigma(p))$. Then $\mathcal{F}$ is linear over $C^\infty(M)$, so there is a smooth bundle map $F: E \rightarrow E'$ over $M$ such that $\mathcal{F}(\sigma) = F \circ \sigma$ for all $\sigma$. Defining a map $\mathcal{F}^{-1}: \mathcal{E}'(M) \rightarrow \mathcal{E}(M)$ using $\phi_p^{-1}$, we see by the same reasoning that there is a smooth bundle map $F^{-1}: E' \rightarrow E$ which is the inverse of $F$. So the two bundles are isomorphic.

-

The problem is that $\mathcal{F}(\sigma)$ is not going to be a smooth section of $E'$ unless the $\phi_p$'s are "coherent".

For example, let $E\to M$ and $E'\to M$ both be the trivial line bundle $\mathbb{S}^1\times\mathbb{R}$ on the circle $\mathbb{S}^1$. Let $A=\{e^{2\pi it}\mid t\in\mathbb{Q}\}\subset\mathbb{S}^1$. If we choose our isomorphisms on the fibers to be $$\phi_p=\begin{cases}\;\;\;\;\text{id}_{\{p\}\times\mathbb{R}}\text{ if }p\in A\\ -\text{id}_{\{p\}\times\mathbb{R}}\text{ if }p\notin A\end{cases}$$ then the smooth section $\sigma:\mathbb{S}^1\to E$ given by $\sigma(p)=1$ is sent to $$\mathcal{F}(\sigma)(p)=\begin{cases}\;\;\;\;1\text{ if }p\in A\\ -1\text{ if }p\notin A\end{cases}$$ which is not even continuous.

-

In addition to the problem Zev pointed out, there's further a problem with topology. Say you intend to avoid Zev's construction, so you do the following:

Since $(E,M,\pi, V)$ is a vector bundle, for every point $p \in M$ there is a neighbourhood $U\ni p$ such that $\pi^{-1}U$ is diffeomorphic to $V\times U$. Okay, so instead of just defining the isomorphism pointwise by $\phi_p$, you additionally require that it extends locally over $U$ to a smooth map between $V\times U$ and itself.

If you indeed are able to find such a map, you would have found a bundle isomorphism. But in reality it may not be possible to find such a map. In the case where $M$ is simply connected, the usual arguments can be used to show that the local definition can be extended to a well-defined global one. But when that is not the case, you can consider the example of the Möbius strip as an $\mathbf{R}$ bundle over $S^1$, and the trivial $\mathbf{R}$ bundle over $S^1$. It is clear to see that any smooth section of the Möbius strip must vanish at some point. On the other hand, there exists non-vanishing sections of the trivial bundle. So any smooth map which commutes with projection from the latter to the former must, at some point in $S^1$, fail to be surjective.

-