cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Simple app with a custom connector works fine on Android but return a HTTP error : 0 on iOS

Hi,

 

I've created a simple application that is linked to a custom connector, the app works on Android but not on iOS. on iOS the apps return a HTTP error : 0 with no response when i submit the query.

 

I've tried to connect the custom connector to an external API like JSON Placeholder and it works just fine on both Android and iOS devices, I can't understand where the problem come from.

 

My app just take a simple input text that post a query to the custom connector when i press a search button, like so : ClearCollect(ouitems; TestJson.Getall({q:TextInput1}))

I then output the results on a Gallery.

 

Thanks & greets !

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Simple app with a custom connector works fine on Android but return a HTTP error : 0 on iOS

Hi @Anonymous ,

Do you mean that the custom connector action works well in your Android device but not in your iOS device?

Which authentication way do you use within your custom connector? No Authentication?

 

Currently, I could not reproduce your issue on my side. Please consider modify your formula as below (set the OnSelect property of the Button to following😞

ClearCollect(ouitems; TestJson.Getall({q: TextInput1.Text}))

then try your app again in your iOS device, check if the issue is solved.

 

Also please consider take a try to turn on the "Formula-level error management" option within Advanced settings of App settings of your app, then re-publish your app, check if the issue fixed.

 

Actually, there is no HTTP status code 0. What you see is a 0 returned by the REST API that you are using. Please check and see if the following article would help in your scenario:

https://stackoverflow.com/questions/19858251/http-status-code-0-error-domain-nsurlerrordomain

I think this issue may be related to the CORS mechanism. Please consider take a try to add the following header

Access-Control-Allow-Origin: *

in Headers part of the Getall action in your custom connector, then re-publish your custom connector:5.JPG

More details about Access-Control-Allow-Origin Header, please check the following article:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin

 

Within your app, re-create a new connection to custom connector, then try the TestJson.Getall({...}) formula agian, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: Simple app with a custom connector works fine on Android but return a HTTP error : 0 on iOS

Hi @v-xida-msft , 

Thank you for your answer but unfortunately, it still doesn't work. I think the problem is in the custom connector or maybe server-side.

 

I don't have any authentification mode, sorry for the mistake in the code I badly copied it. I've also tried to turn on the "Formula-level error management", it didn't do anything to the app. 

 

I think the request is indeed timing out because there is for some reason no response from the server. I've tried to resolve the Access-Control-Allow-Origin but I don't think the problem comes from here, it didn't solve the problem.

 

As I said the weird thing about this problem is that my app works fine on Android but not on iOS, but I can't understand where the problem comes from. I have set a copy of the webservice we generate so you can try to replicate my issue : https://repgdev.epge.ch/testformicrosoft.php?q=alex

 

Best regards and thank you for your help !

Highlighted
Community Support
Community Support

Re: Simple app with a custom connector works fine on Android but return a HTTP error : 0 on iOS

Hi @Anonymous ,

Which version of PowerApps Mobile App in your iOS device?

Have you upgrade it to the latest version?

 

Please check if the version of the PowerApps Mobile App is the latest version, if not, please upgrade it to the latest version, then try your app again, check if the issue is solved.

 

Also please consider uninstall PowerApps Mobile App from your iOS device, then re-install it again, check if the issue is solved.

 

If the issue still exists, please consider submit an assisted ticket for further help through the following link:
https://powerapps.microsoft.com/en-us/support/pro

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,095)