Every source I read mentions the potential difference building up at the glass membrane (according to the Nernst equation). But how is this difference actually measured? Sticking an electrode into a solution doesn't mean that I can measure the potential at a membrane which is some distance away. Hence, there must be some reaction at the electrode itself. Mainly Ag/AgCl electrodes are used, as far as I read. So what causes this reaction?
On the other hand, as I already noted, every source is talking about the ion selective glass membrane. It is selective regarding $\ce{H+}$ ions and doesn't let them pass through? But what does this have to do with the measured potential? The Nernst equation only mentions the different activities of the solutions.