Mar 16, 2019 11:34 AM
(This post was last modified: Mar 16, 2019 11:44 AM by gua.)
Hello , i am making some sort of app that will open multiple web browser instances and refresh every instance after 60 seconds.
Problem is that i am not be able to open and render/see complicated web pages.
I can see google clearly :
https://imgur.com/g31NyRa
but when i navigate to page that i need to load i am getting all of this errors .
https://imgur.com/DIGNiqT
https://imgur.com/sGdcKy0
https://imgur.com/M1dmCQt
https://imgur.com/T5isUGm
No matter if i click yes or no or close popup on "x" i am not be able to fix this.
Also i tried with webbrowser.silent := true; but it will not work.
I tried to load some of my local html files that have some external JS in them ( wow.js -> https://wowjs.uk ) and i am getting similar errors .
I think that problem lays in external css, js scripts. I think webbrowser components dont know how to handle/save/render them and i have no clue how to fix that so maybe you guys can help me
thanks ✌
EDIT: i tried googling and tried to fix this using links :
https://jasontpenny.com/blog/2008/10/29/...om-delphi/
https://stackoverflow.com/questions/3237...-javascrip
but explanations are not that clear.
also i tried changing registry with help of this article : http://docwiki.embarcadero.com/Libraries...WebBrowser
but with no success
Proud to be 100.000 user on HF
Mar 16, 2019 12:26 PM
(This post was last modified: Mar 16, 2019 12:26 PM by tcsh.)
(Mar 16, 2019 11:34 AM)gua Wrote: also i tried changing registry with help of this article : http://docwiki.embarcadero.com/Libraries...WebBrowser
but with no success
I've used this in the past successfully for this error and it worked. The trick is to match the 11001 (v11) with the version of your IE browser on the pc you're executing the app.
There are other ways to take care of those errors also.
I'll come back later with a reply, I need to go check my solution I implemented (it was a while ago)
Mar 16, 2019 12:38 PM
(This post was last modified: Mar 16, 2019 12:40 PM by gua.)
(Mar 16, 2019 12:26 PM)tcsh Wrote: I've used this in the past successfully for this error and it worked. The trick is to match the 11001 (v11) with the version of your IE browser on the pc you're executing the app.
There are other ways to take care of those errors also.
I'll come back later with a reply, I need to go check my solution I implemented (it was a while ago)
https://stackoverflow.com/questions/3078...-localhost
you mean this :
PHP Code
<?php IE11_default = 11000; IE11_Quirks = 11001; IE10_force = 10001; IE10_default = 10000; IE9_Quirks = 9999; IE9_default = 9000;
maybe it didnt worked for me cuz i dont have ie 11 or something , i will experiment more tomorrow and post results here
btw , maybe there are some alpha controls browser components that can work out of the box ? i will try to find other components also
Proud to be 100.000 user on HF
(Mar 16, 2019 12:38 PM)gua Wrote: https://stackoverflow.com/questions/3078...-localhost
you mean this :
PHP Code
<?php IE11_default = 11000; IE11_Quirks = 11001; IE10_force = 10001; IE10_default = 10000; IE9_Quirks = 9999; IE9_default = 9000;
maybe it didnt worked for me cuz i dont have ie 11 or something , i will experiment more tomorrow and post results here
Indeed. You need to make sure the value you set in the registry matches that of your IE browser present on the PC the app is running on. For Windows 10 for example you should definitely have Edge - so version 11.
The code in stackoverflow link you provided is accurate and you could use it to change the registry value.
Quote:btw , maybe there are some alpha controls browser components that can work out of the box ? i will try to find other components also
Last time I needed to use a webbrowser in an app I had to choose either chromium, TWebBrowser default in delphi or EmbeddedBrowser.
The rest i've tried seemed to be shit compared to these. Ended up using EmbeddedBrowser as well as TWebBrowser and the Java errors went away with the silent option as well as the registry code.
The reply I was meaning to give back was containing that code and some links to related SO topics but since you found it before that, there is no need now. Re-check the TWebBrowser documention on the Silent and error handling features of the component to make sure you have all your settings right, use that registry tweak (making sure to match the version) and it should work without problems.
Meanwhile, for other TWebBrowser support and helpful things, check my thread: https://hackforums.net/showthread.php?tid=5733844
You can add proxies to it, proxies to individual (multiple) twebbrowsers on the same form and so forth, in case you need that. As well as a nice resource for cleaning everything once you're done.
🤝
Sorry for replying so late. I didnt have time for this but today i have and i was trying for the whole day to make this work.
i tried everything from here : https://hackforums.net/showthread.php?tid=5733844
I tried putting "11001" and "11011" .. 11011 is suggested here in step 6. http://docwiki.embarcadero.com/Libraries...WebBrowser
And it didnt want to work , idk why ur code is not working. I saw registry and it is editing registry with success but it is not working so i decided to go back to :
http://docwiki.embarcadero.com/Libraries...WebBrowser and to follow steps again. This time I manage it and it worked lol.
Anyway thanks for help , i will try to implement now proxies , let me see if i can do that , i will post again if i have some problems ✌ 🎉 🎉
Proud to be 100.000 user on HF
(Apr 2, 2019 06:18 AM)gua Wrote: Sorry for replying so late. I didnt have time for this but today i have and i was trying for the whole day to make this work.
i tried everything from here : https://hackforums.net/showthread.php?tid=5733844
I tried putting "11001" and "11011" .. 11011 is suggested here in step 6. http://docwiki.embarcadero.com/Libraries...WebBrowser
And it didnt want to work , idk why ur code is not working. I saw registry and it is editing registry with success but it is not working so i decided to go back to :
http://docwiki.embarcadero.com/Libraries...WebBrowser and to follow steps again. This time I manage it and it worked lol.
Anyway thanks for help , i will try to implement now proxies , let me see if i can do that , i will post again if i have some problems ✌ 🎉 🎉
It is the same code/solution.
It worked the 2nd time it means you didn't pay enough attention the 1st time you were trying it and most likely you were making a mistake somewhere. The same thing for the proxy solution, will work if you pay attention and do it right.
🤝
Apr 2, 2019 08:09 AM
(This post was last modified: Apr 2, 2019 08:20 AM by gua.)
(Apr 2, 2019 08:02 AM)tcsh Wrote: It is the same code/solution.
It worked the 2nd time it means you didn't pay enough attention the 1st time you were trying it and most likely you were making a mistake somewhere. The same thing for the proxy solution, will work if you pay attention and do it right.
🤝
After some testing it does not work 100% .
For example if i use "11011" it will not work with youtube but it will work for some other web sites.
If i use "11001" it will work for youtube but it wont work for some other sites LOL
When i put "11001" and click pop-up video player it opens new window but it is not in edge , it looks like that it is IE and video wont start : https://i.imgur.com/H8CxUTE.jpg
Strange 😧
EDIT i will try this and see if i get better results : https://www.youtube.com/watch?v=8ydn4bfOxqk
Proud to be 100.000 user on HF
Must be something else on you end (windows updates, other settings, etc)
It works fine for me.
Anyway ^_^
Apr 2, 2019 11:29 AM
(This post was last modified: Apr 2, 2019 01:13 PM by gua.)
(Apr 2, 2019 08:34 AM)tcsh Wrote: Must be something else on you end (windows updates, other settings, etc)
It works fine for me.
Anyway ^_^
Yeah , i filled up system partition with junk because i hate when Windows update itself without my knowledge .. now it cant update , there is no space left lol 😏
https://www.whatismybrowser.com
can u go on this site and tell me what version of edge u have ?
I have this one :
Your web browser is:
Edge 42 on Windows 10
I went to microsoft update and checked for updates but there are no fresh updates.
after that i went to Advanced tab and Checked on " Give me updates for other Microsoft products when I update Windows" and after that it listed milion new updates lol .. i will try downloading it all and see if i will get new verson of fucking edge browser ..
Proud to be 100.000 user on HF
Apr 2, 2019 01:47 PM
(This post was last modified: Apr 2, 2019 01:50 PM by tcsh.)
(Apr 2, 2019 11:29 AM)gua Wrote: Yeah , i filled up system partition with junk because i hate when Windows update itself without my knowledge .. now it cant update , there is no space left lol 😏
https://www.whatismybrowser.com
can u go on this site and tell me what version of edge u have ?
I have this one :
Your web browser is:
Edge 42 on Windows 10
I went to microsoft update and checked for updates but there are no fresh updates.
after that i went to Advanced tab and Checked on " Give me updates for other Microsoft products when I update Windows" and after that it listed milion new updates lol .. i will try downloading it all and see if i will get new verson of fucking edge browser ..
Just did. Same, Edge 42 on Windos 10. 🤝
Surely there's something else on your end messing stuff up or you're doing something wrong in the code / app / something interfering. Everything is working fine on my end. Can't do much without the full source to try it on this end so try to narrow it down yourself.
Use the debugger, see if any problems/warnings pop up. Make sure you have java and flash installed and latest versions to rule those out too. Also make sure you have all versions (for all years + 32 and 64 bits) of vcredist installed. The C++ ones from microsoft.
You can find them here: https://www.itechtics.com/microsoft-visu...oad-links/
These are usually the source of a lot of problems if you don't have them.
Apr 2, 2019 02:24 PM
(This post was last modified: Apr 3, 2019 05:12 AM by gua.)
I am slowly starting to loose my mind after whole day ...
I will post code , it is simple ..
just button and edit box for url. on button click i do WebBrowser1.Navigate(Edit1.Text);
On form create i do :
PHP Code
<?php SetPermissions; Edit1.Clear;
here is set permissions procedure, i copied from official docs : http://docwiki.embarcadero.com/Libraries...WebBrowser
PHP Code
<?php procedure TForm1.SetPermissions;
const cHomePath = 'SOFTWARE'; cFeatureBrowserEmulation = 'Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\'; cIE11 = 11001;
var Reg: TRegIniFile; sKey: string; begin
sKey := ExtractFileName(ParamStr(0)); Reg := TRegIniFile.Create(cHomePath); try if Reg.OpenKey(cFeatureBrowserEmulation, TRUE) and not(TRegistry(Reg).KeyExists(sKey) and (TRegistry(Reg).ReadInteger(sKey) = cIE11)) then TRegistry(Reg).WriteInteger(sKey, cIE11); finally Reg.Free; end;
end;
still dont want to load twitch for example... https://imgur.com/GDNWRzV
I tried changing 11001 to 11011 and 11000 but with no success ..
I was so mad that i went and booted up whole new fresh win 10 os in vmware and installed newest delphi version and everything else, and guess what , same program wont even load any page in wmvare .. lol
I have latest Microsoft Visual C++ Redistributable for Visual Studio versions , latest adobe flash latest everything ...
try by yourself to go on twitch and try to watch some live stream if u can ? maybe you get problems on that web site like me..
I also started deleting half of my partition cuz i wanted to install all latest updates and again , nothing changed ..
when i click debug and when i get error this is what it is displaying : https://imgur.com/cbauu3y
In this twitch app for desktop that i am making i want to be able to embed something like this " https://player.twitch.tv/?channel=Ninja "
also , i installed chromium but it wont work , it says on twitch page " browser outdated error #6000 "
EDIT: possible solution with chromium is this : https://support.streamelements.com/hc/en...hould-I-do- but i am really tired after whole day , i will test this tomorrow and post results
Afer hard few hours i finally found a solution.
on this link
http://www.cyberforum.ru/delphi-networks...48432.html
other helpful links :
https://stackoverflow.com/questions/1451...-component
https://groups.google.com/forum/#!topic/...4IKa4caVAU
I needed to add this code :
PHP Code
<?php procedure OnBeforeCommandLineProcessing(const processType: ustring; const commandLine: ICefCommandLine);
begin commandLine.AppendSwitch('enable-system-flash'); end;
INITIALIZATION
CefOnBeforeCommandLineProcessing := OnBeforeCommandLineProcessing;
end.
and in Uses section add ceflib.
After that everything worked. Chromium did not support flash enabled out of the box so we need to enable it in code , here on this link you can see other useful commands : https://peter.sh/experiments/chromium-co...-switches/
Now i can play twitch videos with no problem
Proud to be 100.000 user on HF
|