Flash Player error with Browser widget

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: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Flash Player error with Browser widget

Post by Zax » Thu Nov 14, 2019 12:52 pm

Hello,

I sometimes encounter an error with a Browser widget. LC displays this modal dialog alert:
Capture d’écran 2019-11-14 à 12.47.24.jpg
First, I don't understand the reason of this alert, but maybe it's due to the loaded website.
The real problem is that this alert is modal. Is there another way to display this errors, non-blocking, in order to continue processes ?

I'm using LC Indy 9.04.

Thank you.

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Flash Player error with Browser widget

Post by Klaus » Thu Nov 14, 2019 1:20 pm

Hi Zax,

do you see the dialog(s) also when you go to these webites with e.g. "Safari"?
If yes, then you cannot do anything against this.


Best

Klaus

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Thu Nov 14, 2019 2:23 pm

Hello Klaus,

No, I never encounter this flash alert when using Firefox on MacOS Sierra and Windows 10.
Once again, this strange Flash error is not the real problem. My problem is how to continue process. Maybe I could use lock error dialogs?

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Flash Player error with Browser widget

Post by Klaus » Thu Nov 14, 2019 2:45 pm

Hm, sorry, no idea if "lock error dialogs" will work for the browser widget.

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Thu Nov 14, 2019 2:47 pm

Klaus wrote:
Thu Nov 14, 2019 2:45 pm
Hm, sorry, no idea if "lock error dialogs" will work for the browser widget.
I just tried: "lock error dialogs" *not* works for the browser widget. :(

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Tue Nov 19, 2019 1:05 pm

Well, I found a hack... in one of your old post, Klaus :)

https://forums.livecode.com/viewtopic.php?t=17860
Klaus wrote:
Wed Nov 06, 2013 7:12 pm

Code: Select all

on mouseUp

  ## Important part to send BEFORE the dialog ;-)
  send "closeit" to me in 2 secs
  answer "sfasdfasdfasdfasdf"
end mouseUp

command closeit
  close stack "Answer Dialog"
end closeit

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Flash Player error with Browser widget

Post by Klaus » Tue Nov 19, 2019 1:15 pm

HA! :D


Your message contains 6 characters.
You need to enter at least 10 characters.

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Tue Nov 19, 2019 1:45 pm

Klaus wrote:
Tue Nov 19, 2019 1:15 pm
Your message contains 6 characters.
You need to enter at least 10 characters.
sfasdfasdfasdfasdf

;)

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Tue Nov 19, 2019 4:28 pm

Bad news (for me):

Alerts sended by the Browser widget are not treated as "Answer" modal dialogs. It can be easily tested by adding a Javascript with "alert('JS alert');" to the widget.
Though "regular" answers are well dismissed with Klaus' script, modal dialogs sended by the widget are not.

Still looking for a way to dismiss these blocking modal dialogs...

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Flash Player error with Browser widget

Post by [-hh] » Wed Nov 20, 2019 10:06 am

The script below *disables* ALL alerts on the current page.

If you wish to show instead a LC non-modal warning write a javascriptHandler and insert it in the JS function below.

Code: Select all

on mouseUp
   do "window.alert=function(){};" in widget "browser"
end mouseUp
or (if you have full control about the content of the widget) add this as

Code: Select all

<script>window.alert=function(){};</script>
just before "</body>" to your htmltext/web page content.
shiftLock happens

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Wed Nov 20, 2019 2:16 pm

Thanks [-hh], I didn't know this way of trapping JS alerts.
Unfortunately, in my case, this strange "Flash" alert sent by the widget is not trapped and displays a modal dialog (though regular JS alerts are well trapped).

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Flash Player error with Browser widget

Post by Klaus » Wed Nov 20, 2019 2:48 pm

If you do not see this when going to that url in SAFARI, you should report this as a bug:
https://quality.livecode.com

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Wed Nov 20, 2019 3:11 pm

I think the alert came from nasty advertising, and it only happens some times, but I finaly encountered it with Safari :
Capture d’écran 2019-11-20 à 15.07.37.jpg
I don't understand why it is not trapped with JS, but I don't know how Chromium engine works.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Flash Player error with Browser widget

Post by [-hh] » Wed Nov 20, 2019 6:10 pm

This isn't an ordinary alert, you can see that from the "Annuler" option.
LC interprets that as "error/missing plugin". This isn't trappable in the widget, is part of libbrowser...
shiftLock happens

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Flash Player error with Browser widget

Post by Zax » Thu Nov 28, 2019 2:58 pm

[-hh] wrote:
Wed Nov 20, 2019 6:10 pm
This isn't an ordinary alert, you can see that from the "Annuler" option.
It's an ordinary JS confirm, screened form localized french Safari. So I extend your JS script in order to hack JS confirm and so far it seems to work :)
I think LC displays original JS confirms as LC alerts - see my first screen.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”