Re: Time-outs in LC Server?

2019-07-19 Thread Alex Tweedly via use-livecode



On 19/07/2019 14:28, Rick Harrison via use-livecode wrote:

The following is a link to the javascript stuff I had referred
to before.  I just want a clean LC way to do the same thing.

https://stackoverflow.com/questions/9564602/how-to-know-browser-idle-time?noredirect=1=1

Sorry to be the bearer of bad news, but there is no such thing, and 
indeed, there cannot be!


That javascript code runs *in the user's browser", and so can easily 
keep track of idle time. or remaining time


Your LC code can only run on the server. And on the server, all you can 
do is - at the start of responding to a request - check how long it has 
been since the previous request from same user.


So that requires some storage between requests - whether in a database, 
or via cookie / session variable.


Alex.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Quote for Signing & Notarizing a LC built application for Windows & Apple

2019-07-19 Thread Tom Glod via use-livecode
Hey,

Would love to know what it will cost me to sign an notarize my windows and
apple standalone.

I will provide application files and digital signature certificate from:

https://www.ksoftware.net/code-signing-certificates/

You do the rest, and return signed and submitted applications.
Please divide quote into Windows (codesign) and Apple (codesign & notarize)

My email is tom at makeshyft.com

Thanks,

Tom
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Downloading apk

2019-07-19 Thread J. Landman Gay via use-livecode
Thanks, that settles it. I'll just direct the user to the web site where 
they can click a link and it installs.


After I posted I did find the download in Chrome's download folder but I 
think that would generate too many support calls, especially since I 
couldn't find it immediately myself.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On July 19, 2019 4:51:46 PM Ralph DiMola via use-livecode 
 wrote:



This is harder than I thought.. You need to create intents(different ones
for various Android OS versions), add REQUEST_INSTALL_PACKAGES in your
manifest and make sure you have permission to external storage.

The Browser method will only allow you to download the apk to the download
folder and the user will have to browse to it with a file manager and click
on it to start the install.

Why your browser is not starting the download might be Chrome trying to save
you from malicious apps? I can download an apk if I type a url into Chrome.
Maybe you can get around this with a page redirect?

All in all to make this automatic will be a process.

Maybe a stub stack and downloading a new main stack to update might be
easier?

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of J. Landman Gay via use-livecode
Sent: Friday, July 19, 2019 5:16 PM
To: LiveCode Mailing List
Cc: J. Landman Gay
Subject: Downloading apk

I'm trying to download an apk update from a server without success. What is
the correct URL format? This fails:

  launch url ("https://www.mydomain.com/myapp.apk;)

This launches Chrome but stops at whatever web page was previously open.
It doesn't even go to the designated domain. The goal is to have Android
recognize the file type and offer to install/update.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Downloading apk

2019-07-19 Thread Ralph DiMola via use-livecode
This is harder than I thought.. You need to create intents(different ones
for various Android OS versions), add REQUEST_INSTALL_PACKAGES in your
manifest and make sure you have permission to external storage.

The Browser method will only allow you to download the apk to the download
folder and the user will have to browse to it with a file manager and click
on it to start the install.

Why your browser is not starting the download might be Chrome trying to save
you from malicious apps? I can download an apk if I type a url into Chrome.
Maybe you can get around this with a page redirect?

All in all to make this automatic will be a process.

Maybe a stub stack and downloading a new main stack to update might be
easier?

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of J. Landman Gay via use-livecode
Sent: Friday, July 19, 2019 5:16 PM
To: LiveCode Mailing List
Cc: J. Landman Gay
Subject: Downloading apk

I'm trying to download an apk update from a server without success. What is
the correct URL format? This fails:

   launch url ("https://www.mydomain.com/myapp.apk;)

This launches Chrome but stops at whatever web page was previously open. 
It doesn't even go to the designated domain. The goal is to have Android
recognize the file type and offer to install/update.

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Downloading apk

2019-07-19 Thread J. Landman Gay via use-livecode
I'm trying to download an apk update from a server without success. What 
is the correct URL format? This fails:


  launch url ("https://www.mydomain.com/myapp.apk;)

This launches Chrome but stops at whatever web page was previously open. 
It doesn't even go to the designated domain. The goal is to have Android 
recognize the file type and offer to install/update.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: New lesson about codesigning an app, creating codesgined DMG and Notarize it for distribution outside of the Mac App Store

2019-07-19 Thread scott--- via use-livecode
Matthias,

Thank you so much for this timely work!

Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web   http://elementarysoftware.com/
email sc...@elementarysoftware.com
booth 1-800-615-0867
mobile   360-920-0715
--

> On Jul 19, 2019, at 12:24 PM, Matthias Rebbe via use-livecode 
>  wrote:
> 
> Hi,
> 
> some days ago i´ve published a lesson to Livecode´s Lesson area.
> The lesson can be found here 
> .
> 
> The lesson covers how to prepare an app/dmg for distribution outside the Mac 
> Appstore for the upcoming Mac OS 10.15 Mojave.
> - codesigning an app using shell
> - creating DMG using hdiutil or the dropdmg command line tool
> - codesigning dmg using shell
> - notarizing and stapling the DMG using the shell
> - there are also all needed prerequisites described including how to create 
> certificates and app-specific passwords and so on.
> 
> I´ve also added a stack which does the basic steps like app codesgning 
> (including some preparations before the signing) and creating and codesigning 
> the DMG. So with the stack only notarizing and stapling has to be done 
> manually.
> 
> I am currently working on a stack which will do also the complete 
> notarizing/stapling process.
> 
> I tried to describe all the needed steps as detailed as possible. 
> 
> Maybe this lesson is useful for the one or other.
> 
> Regards,
> 
> Matthias Rebbe
> 
> free tools for Livecoders:
> https://instamaker.dermattes.de 
> https://winsignhelper.dermattes.de 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SE crash possible vector

2019-07-19 Thread Bob Sneidar via use-livecode
The question then becomes, does the SE populate all the tabs even if they are 
not showing or are not currently selected? For example, when does the 
Documentation tab populate? If it does so whenever a dev clicks a command or 
keyword, regardless whether or not it is visible, then any bug present when 
visible will be present when not. 

Bob S


> On Jul 19, 2019, at 12:57 , J. Landman Gay via use-livecode 
>  wrote:
> 
> I thought I'd narrowed it down to the tree view in the variable watcher pane. 
> I've been leaving LC set to show the Documentation tab just in case, but that 
> doesn't help because when you debug, LC switches to the Variables tab 
> automatically.
> 
> So I tried pulling down the divider until the debugging panes didn't show at 
> all. That makes debugging difficult but I can point to variables to see the 
> values, though I can't examine arrays very well. I'm still crashing, I just 
> haven't uploaded my current collection of logs yet. I'm not sure LC needs 
> more than 30 logs anyway.
> 
> On 7/19/19 1:04 PM, Bob Sneidar via use-livecode wrote:
>> I may have a possible vector for the script editor crash bug. I was editing 
>> a script but had the Documentation tab open. I clicked somewhere at or 
>> towards the end of a line and it immediately crashed to the desktop. I'm 
>> wondering if the dictionary lookup is getting some bad data at the click?
>> Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: New lesson about codesigning an app, creating codesgined DMG and Notarize it for distribution outside of the Mac App Store

2019-07-19 Thread Rick Harrison via use-livecode
Hi Matthias,

I did the first cursory look at your lesson.

Nicely done!

It really is starting to make me dread
writing any future macOS apps though.
What a pain in the …!

I miss the good old days when I could
finish my program, zip it, and upload it.
Life was so easy by comparison then.
Oh well…

Thanks again for the lesson!

Rick

> On Jul 19, 2019, at 3:24 PM, Matthias Rebbe via use-livecode 
>  wrote:
> 
> Hi,
> 
> some days ago i´ve published a lesson to Livecode´s Lesson area.
> The lesson can be found here 
>   
> >.
> 
> The lesson covers how to prepare an app/dmg for distribution outside the Mac 
> Appstore for the upcoming Mac OS 10.15 Mojave.
> - codesigning an app using shell
> - creating DMG using hdiutil or the dropdmg command line tool
> - codesigning dmg using shell
> - notarizing and stapling the DMG using the shell
> - there are also all needed prerequisites described including how to create 
> certificates and app-specific passwords and so on.
> 
> I´ve also added a stack which does the basic steps like app codesgning 
> (including some preparations before the signing) and creating and codesigning 
> the DMG. So with the stack only notarizing and stapling has to be done 
> manually.
> 
> I am currently working on a stack which will do also the complete 
> notarizing/stapling process.
> 
> I tried to describe all the needed steps as detailed as possible. 
> 
> Maybe this lesson is useful for the one or other.
> 
> Regards,
> 
> Matthias

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SE crash possible vector

2019-07-19 Thread J. Landman Gay via use-livecode
Oh, and btw, I haven't crashed while editing a script. Only when 
debugging and stepping through one. But yours may be related. The editor 
seems fragile right now.


On 7/19/19 1:04 PM, Bob Sneidar via use-livecode wrote:

I may have a possible vector for the script editor crash bug. I was editing a 
script but had the Documentation tab open. I clicked somewhere at or towards 
the end of a line and it immediately crashed to the desktop. I'm wondering if 
the dictionary lookup is getting some bad data at the click?

Bob S
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: SE crash possible vector

2019-07-19 Thread J. Landman Gay via use-livecode
I thought I'd narrowed it down to the tree view in the variable watcher 
pane. I've been leaving LC set to show the Documentation tab just in 
case, but that doesn't help because when you debug, LC switches to the 
Variables tab automatically.


So I tried pulling down the divider until the debugging panes didn't 
show at all. That makes debugging difficult but I can point to variables 
to see the values, though I can't examine arrays very well. I'm still 
crashing, I just haven't uploaded my current collection of logs yet. I'm 
not sure LC needs more than 30 logs anyway.


On 7/19/19 1:04 PM, Bob Sneidar via use-livecode wrote:

I may have a possible vector for the script editor crash bug. I was editing a 
script but had the Documentation tab open. I clicked somewhere at or towards 
the end of a line and it immediately crashed to the desktop. I'm wondering if 
the dictionary lookup is getting some bad data at the click?

Bob S



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: New lesson about codesigning an app, creating codesgined DMG and Notarize it for distribution outside of the Mac App Store

2019-07-19 Thread Tom Glod via use-livecode
Thank you  Matthias I will be checking that out very soon.

On Fri, Jul 19, 2019 at 3:24 PM Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi,
>
> some days ago i´ve published a lesson to Livecode´s Lesson area.
> The lesson can be found here <
> http://lessons.livecode.com/m/4071/l/1120307-codesigning-and-notarizing-your-lc-standalone-as-dmg-for-distribution-outside-the-mac-appstore
> >.
>
> The lesson covers how to prepare an app/dmg for distribution outside the
> Mac Appstore for the upcoming Mac OS 10.15 Mojave.
> - codesigning an app using shell
> - creating DMG using hdiutil or the dropdmg command line tool
> - codesigning dmg using shell
> - notarizing and stapling the DMG using the shell
> - there are also all needed prerequisites described including how to
> create certificates and app-specific passwords and so on.
>
> I´ve also added a stack which does the basic steps like app codesgning
> (including some preparations before the signing) and creating and
> codesigning the DMG. So with the stack only notarizing and stapling has to
> be done manually.
>
> I am currently working on a stack which will do also the complete
> notarizing/stapling process.
>
> I tried to describe all the needed steps as detailed as possible.
>
> Maybe this lesson is useful for the one or other.
>
> Regards,
>
> Matthias
>
>
>
>
>
>
>
> Matthias Rebbe
>
> free tools for Livecoders:
> https://instamaker.dermattes.de 
> https://winsignhelper.dermattes.de 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

New lesson about codesigning an app, creating codesgined DMG and Notarize it for distribution outside of the Mac App Store

2019-07-19 Thread Matthias Rebbe via use-livecode
Hi,

some days ago i´ve published a lesson to Livecode´s Lesson area.
The lesson can be found here 
.

The lesson covers how to prepare an app/dmg for distribution outside the Mac 
Appstore for the upcoming Mac OS 10.15 Mojave.
- codesigning an app using shell
- creating DMG using hdiutil or the dropdmg command line tool
- codesigning dmg using shell
- notarizing and stapling the DMG using the shell
- there are also all needed prerequisites described including how to create 
certificates and app-specific passwords and so on.

I´ve also added a stack which does the basic steps like app codesgning 
(including some preparations before the signing) and creating and codesigning 
the DMG. So with the stack only notarizing and stapling has to be done manually.

I am currently working on a stack which will do also the complete 
notarizing/stapling process.

I tried to describe all the needed steps as detailed as possible. 

Maybe this lesson is useful for the one or other.

Regards,

Matthias







Matthias Rebbe

free tools for Livecoders:
https://instamaker.dermattes.de 
https://winsignhelper.dermattes.de 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: source of a socket error message

2019-07-19 Thread Douglas Ruisaard via use-livecode
I *REALLY* appreciate the responses!  Beyond where (exactly) LC actually 
generates this message (I can see it in the LC executable in a large "look-up" 
table), I was hoping I could find it in a "read-able" script so I could trace 
the logic.

I'm trying NOT to exceed the scope of a subject related to this list-group and 
do not expect an actual solution to the issue.  By the way, there REALLY are 
5,000+ installations of the remote LC app spread all across the province of 
Ontario... which, if you're unfamiliar with Canada is worth look at on a map to 
see the geographic distribution "scope".  It's taken over 10 years to implement 
that number of sites for the very large medical information provider I contract 
to.

That's why Bob's "heebie jeebies" comment is SO relevant!  But, to wrap up the 
"story"... my ultimate goal, in regard to this request, is to avoid "allowing" 
my customer to dismiss the issues (which occur on a regular but erratic basis) 
as a remote ISP/DNS cause ... if at all possible.  I'd like them to exhaust any 
in-house possibilities or causes before they (and I) concede that the events 
are beyond their control or influence.  By eliminating any possibility that the 
connection issues are LC-related, I can honestly push the problem back into the 
customer's lap.

I will request that they now "map" even some of the affected sites with regard 
to the remote sites' ISP's.  One other relevant piece of information.. when 
this situation occurs... only a small percentage of the connecting sites are 
affected.  In the last incident (a few days ago)... over 1,000 site 
successfully connected in the same 1 hour time-window as the 50 site which 
exhibited the error!  "Normally" (however), any 1 hour period of time has fewer 
than 5 sites which may have encounter this "can't resolve hostname" error... 
THAT's acceptable... 50 in 1 hour is NOT.

Again.. thanks so much ... as always I can depend on this group for a very 
informed and helpful set of responses.

Cheers!

Douglas Ruisaard
Trilogy Software
(250) 573-3935

> Date: Thu, 18 Jul 2019 15:37:23 +
> From: Bob Sneidar 
> To: How to use LiveCode 
> Subject: Re: source of a socket error message
> Message-ID: 
> Content-Type: text/plain; charset="us-ascii"
> 
> Not to put too fine a point on it but that gives me the heebie jeebies. There 
> are ~5000 instances of
> the app. The dev can't control what the ISP of the server does, or if the 
> hosting company goes out of
> business or gets bought out. Although rare, an ISP CAN alter the public IP 
> subnet. It happened to me
> twice, a long time ago admittedly. Once for my homw ISP and one for a 
> business ISP.
> 
> Using IP addresses is like using pointers in app development.
> 
> Bob S
> 
> 
> > On Jul 18, 2019, at 08:11 , dsc--- via use-livecode 
> >  wrote:
> >
> > If you have control over the server and know the IP address will never 
> > change, you can skip the name
> lookup and just use the IP address.
> 
> 
> 
> 
> --
> 
> Message: 3
> Date: Thu, 18 Jul 2019 08:46:05 -0700
> From: Mark Wieder 
> To: dsc--- via use-livecode 
> Subject: Re: source of a socket error message
> Message-ID: 
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> On 7/18/19 8:11 AM, dsc--- via use-livecode wrote:
> > Also...
> >
> > If you have control of these sites and even if you use an ISP DNS service, 
> > you can add a secondary
> DNS IP address, perhaps a public recursive name server such as the Google 
> Public DNS (8.8.8.8).  This
> will add a robustness without upgrading the software.
> >
> > If you don't manage those, you can you can upgrade the software to access a 
> > public name server
> directly with TLS, or use DNS over HTTPS. DNS over HTTPS is not as easy as it 
> sounds, but should be
> doable. It is available without filtering from Google, Quad9 (use 9.9.9.10 
> for no filtering), or (if
> you don't use Cisco) Cloudflare 1.1.1.1.
> 
> DoH is getting easier to use all the time but still hasn't reached a level of 
> plug-and-play
> availability. I set up a Raspberry pi on our LAN running a DoH service that 
> hooks into Cloudflare on
> the backend and it's transparent and painless (if I'm allowed to mix 
> metaphors).
> 
> Normally I'd agree with you on this, but what has me worried about the 
> problem situation is
> "occasionally I get a "mass" of errors (50 or 60) within a 1 hour period of 
> time from a large variety
> of different external sites". So it's not a DNS outage from a single location,
> 
> That said, last week I had a maddeningly similar thing occur here... I 
> suddenly couldn't resolve
> addresses, and worse, couldn't even ping numeric addresses outside our ISP's 
> gateway. After working
> with our ISP's tech support, rebooting our router got us a new IP address in 
> the router's routing
> table and that fixed the problem. Possibly some problem with fiber DHCP 
> refreshing, and I hesitate to
> suggest that something similar is at work 

SE crash possible vector

2019-07-19 Thread Bob Sneidar via use-livecode
I may have a possible vector for the script editor crash bug. I was editing a 
script but had the Documentation tab open. I clicked somewhere at or towards 
the end of a line and it immediately crashed to the desktop. I'm wondering if 
the dictionary lookup is getting some bad data at the click?

Bob S
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: source of a socket error message

2019-07-19 Thread Dar Scott via use-livecode
It might be we are overcomplicating things. Maybe this just needs a support 
note to check the Internet connection.

I am having a little trouble picturing the situation here. And like you, I 
wonder about the description. Since one city was mentioned, I thought there was 
a possibility of a single ISP having trouble with DNS. I can't tell if this is 
WAN or Internet, controlled sites or customer devices, ...

Filtering...

Another thing I thought about is filtering. I have seen evil filtering based on 
the URL that returns an IP address that returns a page with ads based on the 
contents of the URL. That would not return an error, but could mess up code 
trying to parse the result. I suppose that a filtering name server might return 
a lookup error for either a URL or an IP. The latter is goofy, but if that 
happens, bad neighbors could cause a loss of name service for the app's server. 
Or if the URL is accidentally, temporarily or maliciously put on Santa's 
naughty list for an hour, DNS for it might be unavailable. Quad9 (9.9.9.9) will 
reply with a NXDOMAIN (non-existent domain) if a site is blocked. The solution 
might be a support note to avoid filtering if it is not otherwise needed.

(Long ago, before we had our own LiveCode function, I made a small DNS client 
library. About the same time I got a new DSL router. The library was 
inconsistent in getting a lookup error. I was frustrated trying to debug this, 
but I figured it out. At boot, the router kept changing the name service IP 
address to one that pointed a site that returned an IP that generated ads, even 
though I had saved a different IP. I don't remember how I fixed that.)

> On Jul 18, 2019, at 9:46 AM, Mark Wieder via use-livecode 
>  wrote:
> 
> On 7/18/19 8:11 AM, dsc--- via use-livecode wrote:
>> Also...
>> If you have control of these sites and even if you use an ISP DNS service, 
>> you can add a secondary DNS IP address, perhaps a public recursive name 
>> server such as the Google Public DNS (8.8.8.8).  This will add a robustness 
>> without upgrading the software.
>> If you don't manage those, you can you can upgrade the software to access a 
>> public name server directly with TLS, or use DNS over HTTPS. DNS over HTTPS 
>> is not as easy as it sounds, but should be doable. It is available without 
>> filtering from Google, Quad9 (use 9.9.9.10 for no filtering), or (if you 
>> don't use Cisco) Cloudflare 1.1.1.1.
> 
> DoH is getting easier to use all the time but still hasn't reached a level of 
> plug-and-play availability. I set up a Raspberry pi on our LAN running a DoH 
> service that hooks into Cloudflare on the backend and it's transparent and 
> painless (if I'm allowed to mix metaphors).
> 
> Normally I'd agree with you on this, but what has me worried about the 
> problem situation is "occasionally I get a "mass" of errors (50 or 60) within 
> a 1 hour period of time from a large variety of different external sites". So 
> it's not a DNS outage from a single location,
> 
> That said, last week I had a maddeningly similar thing occur here... I 
> suddenly couldn't resolve addresses, and worse, couldn't even ping numeric 
> addresses outside our ISP's gateway. After working with our ISP's tech 
> support, rebooting our router got us a new IP address in the router's routing 
> table and that fixed the problem. Possibly some problem with fiber DHCP 
> refreshing, and I hesitate to suggest that something similar is at work here, 
> but strange things happen.
> 
>> You might want to add some network diagnostics, where you can log or 
>> otherwise report the results. This will help solidify your analysis.
>> If you have control over the server and know the IP address will never 
>> change, you can skip the name lookup and just use the IP address.
> 
> That or your excellent suggestion of cacheing the address once it's 
> originally resolved.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Time-outs in LC Server?

2019-07-19 Thread Rick Harrison via use-livecode

Hi Alex,

> On Jul 18, 2019, at 6:55 PM, Alex Tweedly via use-livecode 
>  wrote:
> 
> You should never use 'send in time' or 'wait with messages' in LCServer.
> 
> Each http request starts up your LC server script anew - and you need that 
> request to be handled and the server-instance shut down as quickly as 
> possible. And the next http request will start up another, entirely separate, 
> instance; so you need to be storing some status info between requests.
> 
> If a user doesn't do anything on the site for a few minutes, then you can use 
> a flow something (vaguely) like :
> 
> (at start of the script):
> 
>  - check if user is logged in (if not, prompt them to login / register / …)

I already check if the user is logged in so that part isn’t an issue.

> 
>  - check a database entry for when they were last active (up to you whether 
> that's per-user, per user/per-IP address, or per-some-cookie, or ...)
> 
>  - if time-since-last-action is too long - log them out, and as appropriate, 
> either
>   a.  apologise :-), and go to login screen
>   b. return a "not logged in" error
> 
>  - if it is still within time, then update the "last active" database entry
> 
>  - then do the rest of the current request


I was hoping there was some global server value I could check
or if there was an LC message like “on Idle” that would work.

Perhaps setting a session variable and the sessionLifetime
to a particular duration.  When the variable expires log the
show a sorry message due to timeout and have the
next button shown with the message log them out.

The following is a link to the javascript stuff I had referred
to before.  I just want a clean LC way to do the same thing.

https://stackoverflow.com/questions/9564602/how-to-know-browser-idle-time?noredirect=1=1

Thanks,

Rick
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode