Web component timeout

Could anybody explain how these should work together?

kuva

kuva

This is my code where I am trying to interrupt the image upload (because no image taken) with short timeout, and after timeout bail out to the Web2_sendpic.TimedOut block and quit:

kuva

kuva

Does it affect somehow that the Image1.Picture has no image at all?

  • Tommi S.

The Timeout property specifies the maximum number of milliseconds that the Web component should attempt to wait while performing the request. If the time limit is exceeded, then the TimedOut event will run.

Given the error indicator, you might not be running a new enough version of the companion.

I would code it differently - if an image does not exist, don’t try to post the file.

1 Like

Hi,
in the Play store there is only version 2.57b available. I havent found any more newer anywhere.

  • Tommi S.

What is the error text for that block? Without knowing it’s difficult to give you further instructions.

Hi,
there is no error; the operation is just looping forever (progress bar).
I believer I will go basically the way suggested by ChrisWard;
I will recode in a way that data is sent first, and then if image exists then send the image.
Now it is vise versa, so it prevents the data sending as data needs to be sent in Web2_sendpic.GotText block.

  • Tommi S.

I found the problem too ...

I download a txt file from a server normal case and work with it.
if vpn not active a can not downoad it and i have to work with the saved one but the the WEB did not go to timeout ...

Yep and I have the same problem. The 'web timeout' block does not trigger.
To test I disable all wireless data on the phone and run my app. With phone data enabled the 'web get' block executes normally.

You would need to disable this too...

Read again. I am saying with Data on the get works correctly. With data off the web timeout block does not execute.

Hi,

The api I tried to connect is quite slow I set timeout of web component to 999999999 milliseconds but I still got timeout feedback. Is there anyway to remove this timeout temporarily?

From the documentation Connectivity

Timeout

Returns the number of milliseconds that each request will wait for a response before they time out. If set to 0, then the request will wait for a response indefinitely.

Taifun

1 Like

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