# Web View Post Message/Receive Message Error

**URL:** https://community.thunkable.com/t/web-view-post-message-receive-message-error/1723057
**Category:** Questions about Thunkable X
**Created:** [February 8, 2022, 6:25pm UTC](https://community.thunkable.com/t/web-view-post-message-receive-message-error/1723057 "2022-02-08T18:25:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![damian](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@damian](https://community.thunkable.com/u/damian)
#### Post date: [February 8, 2022, 6:25pm UTC](https://community.thunkable.com/t/web-view-post-message-receive-message-error/1723057/1 "2022-02-08T18:25:12Z")

</div>

Im using the Thunkable Web Viewer Extensions ([https://github.com/thunkable/webviewer-extension](https://github.com/thunkable/webviewer-extension)) to pass a simple object from my web app to the thunkable web viewer:

![Screenshot 2022-02-08 at 19.23.48](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/a/baddfea8f3d7756bae41853b6eb97294982c972b.png)

and catch it like that:  
 ![Screenshot 2022-02-08 at 19.12.22](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/f/7f4e4f661d3da61170964ff530f31bbbc6374a05.png)

it works well on the live preview:

 ![Screenshot 2022-02-08 at 19.12.38](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/d/fd5bc05b0039b24c197e7e7c0810e221c15a2176.png)

but when previewing on iOS using the Thunkable Live app im getting the following error:

 ![IMG_2407.PNG](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/00fab8f426896f3b4671284eebd8f569f6eda11c.jpeg)

it works when im passing a simple string instead of an object. is this a bug or am i missing something?  
any help is much appreciated.

---

<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: [February 8, 2022, 6:53pm UTC](https://community.thunkable.com/t/web-view-post-message-receive-message-error/1723057/2 "2022-02-08T18:53:55Z")

</div>

in your code, use this

ThunkableWebviewerExtension.postMessage(JSON.stringify(messasgeObj)

and in your blocks use it like this  
 ![Screen Shot 2022-02-08 at 1.53.36 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/8/a88192e741cd265a1804bfda6d98a2e47caef2b6.png)

---

<div class="post-metadata">

### Author: ![damian](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@damian](https://community.thunkable.com/u/damian)
#### Post date: [February 8, 2022, 6:58pm UTC](https://community.thunkable.com/t/web-view-post-message-receive-message-error/1723057/3 "2022-02-08T18:58:05Z")

</div>

awesome, works perfectly! thanks.

was not aware that the component expects a string…

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [May 9, 2022, 6:58pm UTC](https://community.thunkable.com/t/web-view-post-message-receive-message-error/1723057/4 "2022-05-09T18:58:09Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
