# Question: Which "Open link" block conditions lead to the "On error" state?

**URL:** <https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843>\
**Category:** Questions about Thunkable X\
**Created:** [September 16, 2019, 9:39am UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843 "2019-09-16T09:39:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 9:39am UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/1 "2019-09-16T09:39:44Z")

</div>

The “Open link” block has a “On error” part:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cb2f849650b0f051efb51418e35c30aac5bd6e57.png)

Does anyone know what could lead to the “On error” state? My question originates from my attempt to launch an app if installed using its URL scheme ([examples](https://unionassets.com/ios-native-pro/launch-urls-for-popular-apps-608)) and get an error if it does not exist which means that the app is not installed and in that case, launch a web page version of the content I am trying to access.

So for example I am trying to open a Facebook page in the app if it is installed and if not, launch the web browser and display the page there. Logically, just using the page’s URL would work but at least on iOS it opens the web page version even if the app is installed. Then I am trying to use the fb:// scheme which does work if the Facebook app is installed but it does nothing if it is not since the fb:// scheme is not known to the OS unless the app is installed.

What would help would be to get an error returned from the “Open link” block if it tries to open a link (fb:// in this case) and “Open link” actually did return an error. I would then create an if-then-else statement to deal with the conditions.

Any ideas on this? Anyone knows what triggers the “On error” state?

Thanks  
K

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 10:47am UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/2 "2019-09-16T10:47:22Z")

</div>

Hi, @Deluxe! 👋

* * *

> [@Deluxe](#):
>
> Anyone knows how I can get the “On error” state?

Yeah 😄

* * *

For **checking error** blocks, try this -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/0/2094a2144524ccb2006730ea38f2a1bd64932562.png)

* * *

Were you looking for this?  
If so, this would help you 😉

* * *

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 11:06am UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/3 "2019-09-16T11:06:14Z")

</div>

My point exactly. In my testing, the logic does **not** ever reach the “On error” part of the block. Are you telling me that in your example, your “On error” part executes and you hear the “Sorry…” part?

Thanks  
K

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 11:12am UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/4 "2019-09-16T11:12:29Z")

</div>

Hi,

* * *

> [@Deluxe](#):
>
> the logic does **not** ever reach the “On error” part of the block

## **Do you encounter an error in your device?**

**More clearly, -**  
Assume that you **don’t have any browser** in your phone.  
And you are trying to open the link - **`www.youtube.com`** in your app; you have also added a **vibrate** block in the **on-error** area.  
Does your device vibrate? or nothing happens? (for this case)

If so, then it might be that

> [@Deluxe](#):
>
> the logic does **not** ever reach the “On error” part of the block

* * *

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 11:30am UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/5 "2019-09-16T11:30:47Z")

</div>

Hey Kartik

Let’s let the code do the talking:

[https://x.thunkable.com/copy/cfc2ae3edc9f01b0f444c6b514abbcc1](https://x.thunkable.com/copy/cfc2ae3edc9f01b0f444c6b514abbcc1)

Do you get “Error” in the text box or not?

Thanks  
K

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 12:02pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/6 "2019-09-16T12:02:18Z")

</div>

…also, there is no specific reference to the “On error” state in the official documentation:

[https://docs.thunkable.com/control#open-an-installed-app-or-website-by-link](https://docs.thunkable.com/control#open-an-installed-app-or-website-by-link)

So has anyone ever made it to the “On error” part? If so, what caused that?

Thanks  
K

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [September 16, 2019, 12:40pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/7 "2019-09-16T12:40:33Z")

</div>

Hi there, @Deluxe  
You can use it if device not is online  
Popup a message that accounces “You should turn on your connection”

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 12:44pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/8 "2019-09-16T12:44:35Z")

</div>

Hey @BlueWhaleYT. So what you are saying is that, to your knowledge, the **only** case the “Open link” block will trigger the “On Error” condition is if the device is offline?

@Mark can you please help us understand under which conditions the “On Error” condition is met? In this case, shouldn’t it be met if we request the “Open link” block to open an unknown to the device scheme URL? I believe it should.

Thanks  
K

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [September 16, 2019, 12:47pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/9 "2019-09-16T12:47:44Z")

</div>

![Screenshot_2019-09-16_204309](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/3/7389cf72e62ac1f2f1e77f2c19b65e96b3e60081.png)

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 12:49pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/10 "2019-09-16T12:49:19Z")

</div>

Not sure what your point is with the above screenshot. Can you please elaborate?

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [September 16, 2019, 12:51pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/11 "2019-09-16T12:51:03Z")

</div>

That show you to link that website  
on error ( if user have not turned on connection ) (in this case)  
from label or using the alert to tell the user.

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 12:53pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/12 "2019-09-16T12:53:25Z")

</div>

Ok I understand that. You just post an example of your previous comment that the “On error” condition will be met if the device is offline. Yes, this is clear, we understood that.

So my question to the rest who follow this thread is if this is the **only** case the “On error” condition will be met and under which **other** conditions it will be met (i.e. trying to open an unsupported scheme URL).

Thanks  
K

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 1:18pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/13 "2019-09-16T13:18:52Z")

</div>

Hi, @Deluxe! 👋

* * *

> [@Deluxe](#):
>
> “On error” condition will be met if the device is offline.

Yeah.  
**But,** it will also be met **if** a browser is not installed.  
If you don’t have an internet connection, i think it will go to your browser, and the browser will show **no internet.**

* * *

> [@Deluxe](#):
>
> trying to open an unsupported schema URL

This can be the problem too.  
I think you should try with a more standard URL, like [google.com](http://google.com).

* * *

Likewise. you were trying facebook’s, right? I assume that you have facebook installed in your phone.  
If it is, try in a phone on which facebook is not installed 🙂

* * *

I am currently trying on mine (with no facebook), will report here 😊

* * *

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 1:33pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/14 "2019-09-16T13:33:35Z")

</div>

Hey @kartik14

I appreciate your help and expertise but let’s please stick to what we can prove though code and not assume. You provide two cases:

1. " **But,** it will also be met **if** a browser is not installed."
2. " I think you should try with a more standard URL, like [google.com](http://google.com/)."

On the first point, if what you say is correct, any links provided in the “Open link” part of the block containing http:// or https:// would return an error message, right? If so, why is it that no similar error is returned if I am using fb:// or flickr:// when neither Facebook or Flickr are installed on the device? Did you assume we would get an error message or did you actually test?

On the second point, “[google.com](http://google.com)” is an address, not a URL scheme. By URL scheme I mean what is listed in [this link](https://unionassets.com/ios-native-pro/launch-urls-for-popular-apps-608) and I have mentioned in my initial message in this thread.

Thanks  
K

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 16, 2019, 1:37pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/15 "2019-09-16T13:37:19Z")

</div>

> [@Deluxe](#):
>
> did you actually test?

I did just now, schema(s) are not working for me 😐  
No error, nothing 🤷‍♂️

* * *

I think, it’s for iOS only -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/9/398dee666a5f58afa33524ecd5cbbca2cb962819.png)

* * *

What device are you testing on?  
I have a **Galaxy A50…**

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 1:39pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/16 "2019-09-16T13:39:51Z")

</div>

@kartik14 I am not talking about the specific iOS services!!! I am taking about apps!!! I never mentioned iOS services in my message!!! I mentioned Facebook and (to add one more example) Flickr!!! Posting irrelevant information is misleading to the rest who follow this thread! Please, let’s stick to the point!

And no, it is **not** related to iOS only, I tested on both iOS and Android and I am getting the same. I even built a test app to help with testing mentioned in one of my responses:

[https://x.thunkable.com/copy/cfc2ae3edc9f01b0f444c6b514abbcc1](https://x.thunkable.com/copy/cfc2ae3edc9f01b0f444c6b514abbcc1)

Did you test with it?

Thanks  
K

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [September 16, 2019, 4:10pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/17 "2019-09-16T16:10:57Z")

</div>

On Android 8.1 and iOS 12.4, no error occurs when trying to open a nonexistent link.

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/3/234cc7c220fcfd3daf6ebc65d7e5b1b6ece76bd9.png)

I did not manage to make an error in this block

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [September 16, 2019, 4:18pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/18 "2019-09-16T16:18:16Z")

</div>

Thank you @actech.

So shouldn’t this logically be considered as a bug since we don’t have any documentation as to when the “On error” state is met? @Mark?

Thanks  
K

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [September 16, 2019, 4:20pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/19 "2019-09-16T16:20:31Z")

</div>

I agree with you. This block looks rather strange. If an error occurs, then there must be a local block in which to place the error text. But there is no local block and there is confusion and misunderstanding of why the “on error” part is needed at all.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [September 18, 2019, 5:04pm UTC](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843/20 "2019-09-18T17:04:56Z")

</div>

There are currently two circumstances when an error will occur. The first is if there are no registered apps to handle the provided URL. The second may occur on those cases where a dialog is opened to allow the user to choose which app to handle the URL. In that second case an error will be returned if the user cancels or dismisses the dialog.

We should add this to the documentation.

Hope this helps.

-Mark

[Next page](https://community.thunkable.com/t/question-which-open-link-block-conditions-lead-to-the-on-error-state/228843.md?page=2)
