We tried to repro the issue with the provided sample, but it worked for us without any error in both Teams Desktop and mobile devices.
Adding the SS below:
Android:
Could you please try to update your MS teams version and check if it helps?
MS Teams version used for testing: