# Welclient/web preview is able to connect to server but live test/apk (installed on mobile) gives "network request failed"

**URL:** <https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774>\
**Category:** Web API's\
**Created:** [December 21, 2023, 4:42am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774 "2023-12-21T04:42:41Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [December 21, 2023, 4:42am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/1 "2023-12-21T04:42:41Z")

</div>

Hi peoples,  
Able to connect to the local blynk server using the thunkable web client and web preview . But the downloaded apk mobile app does not connect. Gives the error “network request failed” message on the mobile app and live test. What might be the reason? Because the web client connects successfully. How to debug it?  
Suspect it to be a security issue, how to resolve it on mobile app?  
Please mention your suggestions? Using webapi’s to connect to the server from thunkable.

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [December 21, 2023, 2:44pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/3 "2023-12-21T14:44:51Z")

</div>

@mhatreuduyu @fredyfernando We’ll at very least need to see what blocks you are using to connect to help here. Have you checked the documentation for the source as well for these (e.g. Blynk and Microsoft Business Central)?

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [December 22, 2023, 4:46am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/4 "2023-12-22T04:46:17Z")

</div>

Yes. Its working with the web preview. Only live test and apk app are failing with “Network request failed” error. followin is my blocks sketch and nothing added to the webapi panel.

 ![iotpoc](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/a/fa0f4195bb2a6a24bbb6177c74c48c2204e50296.png)

---

<div class="post-metadata">

**Author:** ![matthewmcguire4321lz](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@matthewmcguire4321lz](https://community.thunkable.com/u/matthewmcguire4321lz)\
**Post date:** [December 27, 2023, 9:47am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/5 "2023-12-27T09:47:44Z")

</div>

I am having this exact issue.

---

<div class="post-metadata">

**Author:** ![matthewmcguire4321lz](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@matthewmcguire4321lz](https://community.thunkable.com/u/matthewmcguire4321lz)\
**Post date:** [December 27, 2023, 10:49am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/6 "2023-12-27T10:49:56Z")

</div>

This worked for me:

[Web API Error on Android: Network request failed - Questions about Thunkable - Community](https://community.thunkable.com/t/web-api-error-on-android-network-request-failed/1331289/10)

Add this to the query parameter:

Content-Type:text/plain

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [December 29, 2023, 5:06am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/7 "2023-12-29T05:06:20Z")

</div>

tried this solution but still same results . works with lweb preview but still the same "network request failed " on android.

 ![Screenshot_2023-12-29-10-35-03-31_2bbfbfee96a5dfce998f962ebb8b5da3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/e/eea494c1d97c35cfc8bc6c4c6b4ea9eb39244d64.png)

with web preview:

 ![iotpoc](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/e/ee0f6f57c9f042f99661ebd97b4b28dc2c01ad92.png)

---

<div class="post-metadata">

**Author:** ![matthewmcguire4321lz](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@matthewmcguire4321lz](https://community.thunkable.com/u/matthewmcguire4321lz)\
**Post date:** [December 29, 2023, 7:00am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/8 "2023-12-29T07:00:42Z")

</div>

Did you definitely add it to query parameter?

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [December 29, 2023, 12:33pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/9 "2023-12-29T12:33:43Z")

</div>

Of course Matt, I added this query parameter. I am looking to solve this. Every clue towards solving is appreciated. You can suggest all scenarios you have for this. I will test it for each scenario. I suspect it to be some permission issue on android.  
Regards

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [January 10, 2024, 9:08am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/10 "2024-01-10T09:08:44Z")

</div>

waiting for some clues…some work arounds…atleast something to debug this…

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [January 10, 2024, 2:49pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/11 "2024-01-10T14:49:32Z")

</div>

Have you tried reaching out to Blynk about this? It does sound like a security or permission issue and I would suspect only Blynk would have a suggestion on what to change in your call to make it work via the Thunkable Live app.

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [January 10, 2024, 4:01pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/12 "2024-01-10T16:01:38Z")

</div>

Blynk exposes some web api which I have tested successfully. After testing them I used them in thunkable Web\_API control. So that does not seem to be an issue with this.  
Anyway, we have got one part working. Maybe I will do the test again if people are feeling confident about this fix. What say?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [January 10, 2024, 4:42pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/13 "2024-01-10T16:42:53Z")

</div>

Hello @mhatreuduyu  
To solve this issue you can create a new API using a backend tool and then this API will call the service you are using right now.  
You could use a backend service such as Xano or Firebase.  
These services have been known to work well with Thunkable’s app

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [January 11, 2024, 9:59am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/14 "2024-01-11T09:59:31Z")

</div>

Do you mean a firebase function in cloud that would call webapi provided by blynk…? Ok a thunkable app on android would make a call to firebase cloud function which would call a blynk http web api…is the flow correct?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [January 11, 2024, 3:34pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/15 "2024-01-11T15:34:31Z")

</div>

Hello @mhatreuduyu Yes, that’s exactly what I mean.  
Let us know if you need help with the implementation

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [January 12, 2024, 2:28am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/16 "2024-01-12T02:28:51Z")

</div>

Hey Thanks ioannis…looks like we are getting closer to the solution. It probably needs some minimal credits to create a backend function…

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [January 15, 2024, 6:59am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/17 "2024-01-15T06:59:59Z")

</div>

Hey ioannis  
Require some guidance on how to call a firebase cloud function from thunkable app…some reading material woul help…  
I have been able to create a firebase project and add my mobile app to it, but unable to deploy function to it due to probably credit limits.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 15, 2024, 7:19pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/18 "2024-01-15T19:19:29Z")

</div>

to deploy functions you need a billing account associated to your firebase account and be on the blaze plan or higher.

firebase cloud functions will be written in JS/TS/Python and will be executed by calling their trigger endpoint via the API blocks.

 ![Screenshot 2024-01-15 at 2.16.35 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d753632d6b3b7a4d8efa140f4a37789a65a7abb0.png)

triggers can be found by going to [console.cloud.google.com](http://console.cloud.google.com)  
search for functions  
click cloud functions  
click the named function in the list  
click the trigger tab  
copy paste the trigger URL into your app.

be mindful you’ll either need to use an auth key, api key, or allow your funciton to be invoked by allUsers. be sure to take care of permissions

---

<div class="post-metadata">

**Author:** ![mhatreuduyu](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mhatreuduyu](https://community.thunkable.com/u/mhatreuduyu)\
**Post date:** [January 16, 2024, 3:42am UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/19 "2024-01-16T03:42:54Z")

</div>

Thanks Jared. Short and very useful info.  
on my side only this part is pending.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:33pm UTC](https://community.thunkable.com/t/welclient-web-preview-is-able-to-connect-to-server-but-live-test-apk-installed-on-mobile-gives-network-request-failed/2756774/20 "2024-11-08T13:33:09Z")

</div>


