Mar 30 2022 09:34 PM - edited Mar 31 2022 11:51 PM
I have been developing Microsoft Teams custom apps since last year and they were working fine. But recently (probably after the recent Microsoft Teams update in March), my custom apps stopped working properly.
When my apps try to use Fetch API to connect to my server (node-app) that I have deployed on Microsoft Azure, I get the error "Failed to fetch". Then I tried using axios instead of Fetch, but got the error "Network Error". I also tried upgrading npm packages but couldn't fix this problem.
In fact, this phenomenon ONLY occurs on "Teams App on Desktop". The custom apps work perfectly fine on Teams on Browser and Teams Mobile App.
Any possible solutions or suggestions are highly appreciated. Thank you!
Mar 31 2022 10:29 PM
Mar 31 2022 11:49 PM
@Sayali-MSFT Thank you for your reply. I appreciate your cooperation.
Apr 01 2022 02:41 AM
Apr 03 2022 09:50 PM - edited Apr 03 2022 10:26 PM
Solution@Sayali-MSFT Sorry for the late reply.
Thank you very much for investigating this issue, but after some research and testing, I seemed to have solved the problem.
I am using Helmet (https://www.npmjs.com/package/helmet) for the server (node-app) that I have deployed on Microsoft Azure and apparently, downgrading the version of Helmet from 5.0.2 to 4.6.0 has fixed the problem. On Teams App on Desktop, probably if a Teams custom app tries to connect to a node-app that has Helmet of version 5.0.2, Helmet somehow denies the access and the error occurs.
Therefore, I will be using Helmet of version 4.6.0 for the time being to avoid the error from occurring.
Once again, thank you very much for your kind support!
Apr 03 2022 09:50 PM - edited Apr 03 2022 10:26 PM
Solution@Sayali-MSFT Sorry for the late reply.
Thank you very much for investigating this issue, but after some research and testing, I seemed to have solved the problem.
I am using Helmet (https://www.npmjs.com/package/helmet) for the server (node-app) that I have deployed on Microsoft Azure and apparently, downgrading the version of Helmet from 5.0.2 to 4.6.0 has fixed the problem. On Teams App on Desktop, probably if a Teams custom app tries to connect to a node-app that has Helmet of version 5.0.2, Helmet somehow denies the access and the error occurs.
Therefore, I will be using Helmet of version 4.6.0 for the time being to avoid the error from occurring.
Once again, thank you very much for your kind support!