CefURLRequests Failing After Upgrade

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefURLRequests Failing After Upgrade

Postby kvnl » Mon Nov 11, 2019 6:41 pm

OS: Windows
Branch: 3904

Hi,
After upgrading my app from cef-75.0.11 to cef-78.2.9, I've noticed that all my CefURLRequests are now failing with net::ERR_INVALID_ARGUMENT. I suspect this is due to the Network Service changes but I've yet to figure out a relevant solution or root cause for this.

Cef is built with these flags
Code: Select all
set CEF_USE_GN=1
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
python ..\automate\automate-git.py --download-dir=C:\cef\chromium_git --depot-tools-dir=C:\cef\depot_tools --branch=3904


Could anyone shed some light on what might be happening?
Thanks
kvnl
Newbie
 
Posts: 2
Joined: Thu Nov 07, 2019 2:12 pm

Re: CefURLRequests Failing After Upgrade

Postby magreenblatt » Mon Nov 11, 2019 8:11 pm

How are you creating the CefURLRequests? What values are you setting on the CefRequest?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CefURLRequests Failing After Upgrade

Postby kvnl » Tue Nov 12, 2019 11:22 am

This is the general format for my cefrequests.

Code: Select all
CefRefPtr<CefRequest> createCefRequest ( const CefString& url, int flags, const CefString& method )
{
    CefRefPtr<CefRequest> cefRequest = CefRequest::Create ();

    cefRequest->SetURL ( url );
    cefRequest->SetMethod ( method );
    cefRequest->SetFlags ( flags );

    CefRequest::HeaderMap headers;
    cefRequest->GetHeaderMap(headers);
    headers.insert(std::pair<CefString, CefString>("Content-Type", "application/json; charset=UTF-8"));
    ... /// add a bunch of headers
    cefRequest->SetHeaderMap(headers);

    return cefRequest;
}


This is for making the request.
Code: Select all
CefRefPtr<URLRequest>
URLRequest::Create( const CefRefPtr<CefRequest>& request, const CefRefPtr<URLRequestClient>& client)
{
    CefRefPtr<URLRequest> urlRequest( new URLRequest( request, client ) );
    mUrlRequest = CefURLRequest::Create( urlRequest, CefRefPtr<CefURLRequestClient>( this ), nullptr );
    return urlRequest;
}
kvnl
Newbie
 
Posts: 2
Joined: Thu Nov 07, 2019 2:12 pm

Re: CefURLRequests Failing After Upgrade

Postby magreenblatt » Tue Nov 12, 2019 11:59 am

Please provide an example of a fully-qualified CefRequest that results in ERR_INVALID_ARGUMENT.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 33 guests