Failed to get content from the web in Windows 10

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
gilar
Posts: 82
Joined: Sat Sep 26, 2015 12:59 pm

Failed to get content from the web in Windows 10

Post by gilar » Sun Feb 03, 2019 8:47 am

I'm following this lesson....
to get conten from the web
http://lessons.livecode.com/m/4071/l/75 ... o-livecode
Download the sample of the stack Get contents of web page.livecode
Open the file with Livecode 8.1 and running it.
But i can not get the content of the web.
I got and error The handler: ulGetHttp has reached the recursion limit of 400000. Execution will be terminated to prevent hang

I'm curious, then i installed another version of livecode, 7, 9
In livecode 7
I got and error An error occurred: invalid host address.

In livecode 9
I got and error ... same as Livecode 8

FYI, i use Windows 10.
I thought it is about firewall in windows 10 then i follow this step
https://www.youtube.com/watch?v=KpZPKtF ... e=youtu.be
And the result still no luck

Hope someone here knows what it is all about.
Comment and help wold be appreciate




Best Regards



Gilar Kadarsah

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5043
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Failed to get content from the web in Windows 10

Post by jacque » Sun Feb 03, 2019 4:43 pm

Something is wrong with the URL. Can you post the lines of script you are using to get the content? Also try a test using a different URL, like www.google.com to see what happens.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

gilar
Posts: 82
Joined: Sat Sep 26, 2015 12:59 pm

Re: Failed to get content from the web in Windows 10

Post by gilar » Sun Feb 03, 2019 5:04 pm

jacque wrote:
Sun Feb 03, 2019 4:43 pm
Something is wrong with the URL. Can you post the lines of script you are using to get the content?

Hi jacque ... this the code
Actually it is livecode sample (it is not my code),
I download it from here http://lessons.livecode.com/m/4071/l/75 ... o-livecode
Then i beleave there is not wrong with the code.

Code: Select all

on mouseUp
   put the text of field "URL" Into theURL
   put URL theURL into theWebPageContent
   put the result into theError
   	
   if theError is empty then
      set the text of field "Result" to theWebPageContent
   else
      set the text of field "Result" to "An error occurred:" && theError & "."
   end if
end mouseUp
jacque wrote:
Sun Feb 03, 2019 4:43 pm
Also try a test using a different URL, like www.google.com to see what happens.

1. this is what happen when i intput "www.google.com".
An error occurred: invalid URL: "www.google.com".

2. This is what happend when i input "https://www.google.com/"
The handler: ulGetHttp has reached the recursion limit of 400000. Execution will be terminated to prevent hang

2. This is what happend when i input "https://forums.livecode.com/posting.php ... 77#preview"
An error occurred: error 502 Fiddler - Connection Failed.


Best Regards


Gilar Kadarsah

bogs
Posts: 3556
Joined: Sat Feb 25, 2017 10:45 pm

Re: Failed to get content from the web in Windows 10

Post by bogs » Sun Feb 03, 2019 6:01 pm

Hm. jacque, the url is right, I downloaded the stack (on linux) and it opened and downloaded googles page correctly.

@gilar, I don't know what to tell you, I don't have a win10 box to experiment with, but I can tell you on 'nix it works correctly in vers. 7, 8, and 9, I would assume it also works on mac. If I had to guess, I would point (as you first suspected) to the firewall. In fact, that is where I would still point to.
Image

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5043
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Failed to get content from the web in Windows 10

Post by jacque » Sun Feb 03, 2019 6:58 pm

What happens if you use http://www.google.com/? That is, omit the "s" to make it an insecure URL. This worked for someone else I know who was using the community edition. It isn't a good solution but it worked around the problem.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 3556
Joined: Sat Feb 25, 2017 10:45 pm

Re: Failed to get content from the web in Windows 10

Post by bogs » Sun Feb 03, 2019 10:38 pm

@Jacque,
The stack the lesson posted by default uses that url already.
Selection_001.png
Download me a page...
I really suspect this has something to do with Windows, and not Lc in this case, probably a firewall, or possibly an a/v setting.

Of course, if someone is actually on Win10 and can test that lessons stack out, that would be the best solution.

@Gilar,
Just out of curiosity, what happens if you bypass that lesson altogether? i.e., open the message box, and in the line type

Code: Select all

put url "http://www.google.com"
You should see something like this if it is working correctly -
Selection_002.png
Put me baby!
Image

gilar
Posts: 82
Joined: Sat Sep 26, 2015 12:59 pm

Re: Failed to get content from the web in Windows 10

Post by gilar » Mon Feb 04, 2019 3:53 am

bogs wrote:
Sun Feb 03, 2019 10:38 pm
@Jacque,
The stack the lesson posted by default uses that url already.
Selection_001.png

I really suspect this has something to do with Windows, and not Lc in this case, probably a firewall, or possibly an a/v setting.

Of course, if someone is actually on Win10 and can test that lessons stack out, that would be the best solution.

I just ask my frend to check it on Mac and Windwos 7 ..... it works fine.
Now ... i'm looking for another Windows 10 machine to check it.

@Gilar,
Just out of curiosity, what happens if you bypass that lesson altogether? i.e., open the message box, and in the line type

Code: Select all

put url "http://www.google.com"
You should see something like this if it is working correctly -
Selection_002.png
The result is empty ....


Note.
- My Windows 10 Machine has no problem to connect internet.
- Also i check it on livecode ... it works fine (firefox open with the link)

Code: Select all

on mouseUp pMouseButton
     launch "http://www.google.com"
on mouseUp 

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5043
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Failed to get content from the web in Windows 10

Post by jacque » Mon Feb 04, 2019 5:45 am

I don't use Windows often, but does it require you to give permission for LC to access the internet?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 1985
Joined: Sun Sep 23, 2007 4:58 pm

Re: Failed to get content from the web in Windows 10

Post by SparkOut » Mon Feb 04, 2019 8:31 am

Do you have a proxy set up (fiddler?) at all?
Disable the proxy for testing and see if that explains the problem.

bogs
Posts: 3556
Joined: Sat Feb 25, 2017 10:45 pm

Re: Failed to get content from the web in Windows 10

Post by bogs » Mon Feb 04, 2019 11:57 am

gilar wrote:
Mon Feb 04, 2019 3:53 am
bogs wrote:
Sun Feb 03, 2019 10:38 pm
I really suspect this has something to do with Windows, and not Lc in this case, probably a firewall, or possibly an a/v setting.
<join>
@Gilar,
Just out of curiosity, what happens if you bypass that lesson altogether? i.e., open the message box, and in the line type

Code: Select all

put url "http://www.google.com"
You should see something like this if it is working correctly -
Selection_002.png
[1] - The result is empty ....
Note.
[2] - My Windows 10 Machine has no problem to connect internet.
[3] - Also i check it on livecode ... it works fine (firefox open with the link)

Code: Select all

on mouseUp pMouseButton
     launch "http://www.google.com"
on mouseUp 
Your friend testing it on Win7 tells us the code works on Windows, but we all knew that already. Despite what Ms might try to get you to believe, there isn't that large a difference between 7 and 10, >90% of it is cosmetic.
[1] - the result being empty instead of an error says to me that Lc executed the line, and the result was empty (no information). It is the simplest line of code to test in this situation. That it is empty tells me something on Windows isn't letting the code reach the destination.
[2] - I didn't believe your machine had any problem reaching the network, otherwise your browsers wouldn't connect and windows update for instance would tell you it is having problems.
[3] - The line you are using, "launch "http:// address" is the same as opening firefox manually and typing in an address. This is not the same as having Lc get a page internally, but does confirm that it is a setting in the Os blocking Lc from doing so.

In cases like this, the single most likely suspect is going to be a firewall, which controls the level of access of various programs, followed by a proxy as SparkOut suggests.
Proxies are a little less likely because I don't think windows sets them up automatically (although I could be wrong, I haven't used a win box in over a decade for anything). At least, on the win10 vm I run (which doesn't connect to the internet), there was no proxy.
Having said that, though, there are a/v and security products which will setup proxies, as well as other software that may (like file sharing programs).

As Jacque mentions, *usually* (but not always) if it is a firewall, then you will be asked in a dialog if you want program x to have access to the internet. The way to fix that is to go through the firewall and either :
Turn it off temporarily, then test the line in Lc (usually test 1 to determine if it is the actual cause) -or-
go through the settings of the firewall looking specifically for settings related to Lc and the method of transport Lc uses.

Proxies can be a whole other can of worms, but work similarly. If you have a proxy, simply bypass it to test if that is the issue.
Image

AxWald
Posts: 361
Joined: Thu Mar 06, 2014 2:57 pm

Re: Failed to get content from the web in Windows 10

Post by AxWald » Mon Feb 04, 2019 12:43 pm

Hi,

reporting from a Win10 machine:

Downloaded the stack:
http://lessons.livecode.com/m/4071/l/75 ... o-livecode.
And run it with LC 9.02 Comm. Gives correct results both for google (as is predefined) as well as for the lessons.livecode URL from OP.

My machine is "as it comes", no additional snake oil (only defender), direct connection via router/ LAN, no special firewall settings for LC.

Is there any dubious "security" software running on this machine (McAffee, Kaspersky etc.)? As bogs remarks this is the common reason for problems like this.

Another reason could be invisible chars pasted into field "URL". Check "theURL" for a trailing CR, and always be cautious before using the contents of a user-modified field (they love to paste the strangest things ...)

Have fun!
Livecode programming until the cat hits the fan ...

gilar
Posts: 82
Joined: Sat Sep 26, 2015 12:59 pm

Re: Failed to get content from the web in Windows 10

Post by gilar » Fri Feb 08, 2019 2:31 am

Sorry for late respond, ....
here i did some experiment
1. Connect PC with Mobile Phone Data, and running livecode script ----> Still no luck
2. Try with Windows 10 on Laptop (Other Machine) in the same network - Work fine
(so i guess this is Windows 10 Problem).
Then i look out about Proxy ... i found some people have problem with proxy virus.
Then follow this instruction http://mejadata.blogspot.com/2018/04/ca ... 18080.html
And all work fine like a charm

Thanks @jacque, @bogs , @SparkOut, @AxWald
Thank you Livecode Forum

bogs
Posts: 3556
Joined: Sat Feb 25, 2017 10:45 pm

Re: Failed to get content from the web in Windows 10

Post by bogs » Fri Feb 08, 2019 11:07 am

Congratulations on figuring it out gilar!
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”