# Custom Action Working in Preview but not in Testing

**URL:** <https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734>\
**Category:** External Collections, Custom Actions & Collections\
**Created:** [January 8, 2021, 3:54am UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734 "2021-01-08T03:54:12Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 3:54am UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/1 "2021-01-08T03:54:12Z")

</div>



---

<div class="post-metadata">

**Author:** ![ncmarc](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@ncmarc](https://forum.adalo.com/u/ncmarc)\
**Post date:** [January 8, 2021, 4:28am UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/2 "2021-01-08T04:28:02Z")

</div>

3rd party APIs are not working

---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 4:54am UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/3 "2021-01-08T04:54:29Z")

</div>

No, they are. I’ve tried other ones.

---

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bhanu/32/6859_2.png) [@bhanu](https://forum.adalo.com/u/bhanu)\
**Post date:** [January 8, 2021, 5:01am UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/4 "2021-01-08T05:01:28Z")

</div>

@John can you try writing the response directly on the screen and see if there’s a value being returned from your API?

I have had a similar issue previously and when I tried to print the result directly on screen without first storing it in the list, I realized that the reposes were blank.

---

<div class="post-metadata">

**Author:** ![ncmarc](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@ncmarc](https://forum.adalo.com/u/ncmarc)\
**Post date:** [January 8, 2021, 1:03pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/5 "2021-01-08T13:03:54Z")

</div>

If I try to edit any 3rd party api collection, it does not work. Also, if I build a new version for iOS or Android, none of the data shows up in the app. This is very disturbing. Oddly, the apps that are in the app store are working. I haven’t changed anything in my app other than redesigning the login page and changing the url to 1 static image. There is something odd going on that doesn’t make sense. The web preview application works fine though.

---

<div class="post-metadata">

**Author:** ![ncmarc](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@ncmarc](https://forum.adalo.com/u/ncmarc)\
**Post date:** [January 8, 2021, 1:07pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/6 "2021-01-08T13:07:26Z")

</div>

I just created a new project, then added an external collection with a test JSON webservice. It will not let you add it. try to do it yourself.

URL:  
[https://jsonplaceholder.typicode.com/todos/](https://jsonplaceholder.typicode.com/todos/)

UPDATE MORE INFO, In console:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/8/86e575ba37c86c13e910c7d6fd5b6ee0621fdb13.png)

---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 3:33pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/7 "2021-01-08T15:33:25Z")

</div>

Yeah, I tried that and wasn’t getting anything. But that’s the weird part. It works when it’s testing but not when I run it.

---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 3:33pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/8 "2021-01-08T15:33:54Z")

</div>

Thanks. That’s weird, I thought that was the whole idea of custom actions?

---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 3:34pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/9 "2021-01-08T15:34:34Z")

</div>

@anon78309838, any thoughts?

---

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bhanu/32/6859_2.png) [@bhanu](https://forum.adalo.com/u/bhanu)\
**Post date:** [January 8, 2021, 4:01pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/10 "2021-01-08T16:01:46Z")

</div>

This could be due to the onscreen action not passing the data to your custom action. You can try to re-run this while the inspect mode on your browser is turned on to check is the status codes are returning 200.

That could be one way of identifying where this is breaking.

---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 4:39pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/11 "2021-01-08T16:39:47Z")

</div>

@bhanu thanks

---

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bhanu/32/6859_2.png) [@bhanu](https://forum.adalo.com/u/bhanu)\
**Post date:** [January 8, 2021, 4:54pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/12 "2021-01-08T16:54:57Z")

</div>

@John glad that helped, maybe one last check I could think of to do is to print the api\_key on your screen above the button to see if the logged in user api-key is actually being sent when you click the search domain for emails button.

---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 5:16pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/13 "2021-01-08T17:16:05Z")

</div>



---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/john/32/4533_2.png) [@John](https://forum.adalo.com/u/John)\
**Post date:** [January 8, 2021, 5:41pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/14 "2021-01-08T17:41:15Z")

</div>

Figured it out. I wasn’t logged in. So if you want to test with data from logged in user do you always have to log in? So you can’t test with setting the screen as “if user is logged in”?

---

<div class="post-metadata">

**Author:** ![bhanu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bhanu/32/6859_2.png) [@bhanu](https://forum.adalo.com/u/bhanu)\
**Post date:** [January 8, 2021, 5:56pm UTC](https://forum.adalo.com/t/custom-action-working-in-preview-but-not-in-testing/7734/15 "2021-01-08T17:56:44Z")

</div>

Yup, you must be logged in to pass any logged in user data during testing (preview mode).

Glad you could get to the root of it. Cheers!
