I saw this tree foaming, so I had to find out why...
"As rainwater trickles down the tree stem or trunk (called stemflow), it collects deposited dust particles (i.e. salts) and plant residues (i.e. acids) that have accumulated on the bark surfaces. Bubbles are formed through the process of “stemflow mixing”. As this dissolved, simple soap solution flows down the trunk, it encounters barriers and bumps, like bark plates, furrows, and ridges. The solution is then tumbled, mixed and aerified, during its downward flow to the ground, generating the bubbles or soapsuds, which collect at the tree base. Occasionally, a light coating of foam may even be visible higher up on the tree trunk. Stemflow mixing has no known deleterious effect on tree health.
Tree suds can happen in all types of trees and has been observed occurring in all continents where trees grow."