Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Why i can't load this page ?

Post Reply
thefunkyjoint
Posts: 458
Joined: Thu Aug 10, 2017 12:40 pm

Why i can't load this page ?

Post by thefunkyjoint »

Hi,

When i try to load the page below on Chrome , it loads succesfully :

https://api.whatsapp.com/send?phone=551 ... &text=test

When i try to load the same page on CEF4Delphi, it only gives me a blank page. Actually, the content is loaded for a fraction of second, then the page goes blank.

Any hints ?

Thanks !
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: Why i can't load this page ?

Post by dilfich »

Error loading whatsapp://send?phone=551199996024&text=test
ERR_UNKNOWN_URL_SCHEME
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Why i can't load this page ?

Post by salvadordf »

dilfich is right. That web page is trying to open a resource in a URL with an unknown "whatsapp" scheme.

This known CEF3 issue might be related :
https://bitbucket.org/chromiumembedded/ ... on-changes

If you need to block those requests you can use the workaround described in the comments of that issue.

These are the code comments for the TChromium.OnProtocolExecution event :

Code: Select all

  ///
  // Called on the UI thread to handle requests for URLs with an unknown
  // protocol component. Set |allow_os_execution| to true (1) to attempt
  // execution via the registered OS protocol handler, if any. SECURITY WARNING:
  // YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR
  // OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
  ///
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: Why i can't load this page ?

Post by dilfich »

Official chrome also does not ship to this address, so this is not the problem of CEF3 itself..
You do not have the required permissions to view the files attached to this post.
thefunkyjoint
Posts: 458
Joined: Thu Aug 10, 2017 12:40 pm

Re: Why i can't load this page ?

Post by thefunkyjoint »

Thanks for the info ! ;)
ericktux
Posts: 18
Joined: Thu Oct 29, 2020 10:11 am

Re: Why i can't load this page ?

Post by ericktux »

hello friends, this way it works for me

Code: Select all

procedure TMiniBrowserFrm.Chromium1ProtocolExecution(Sender: TObject;
  const browser: ICefBrowser; const frame: ICefFrame;
  const request: ICefRequest; var allowOsExecution: Boolean);
begin
  //allowOsExecution:=true;
  //ShowMessage('test');
  Chromium1.StopLoad;
end; 
Post Reply