Can't edit credit card fields in my app with recent CEF

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.

Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Tue Jan 14, 2020 2:39 pm

With my app and CEF 77.1.13 you can enter stripe (i.e. stripe.com) credit card fields normally.
With my app and CEF 79.0.10 or CEF 79.1.10, you can't enter text in the credit card fields - like credit card number or ZIP code. You can't see any text or highlighting or cursor in the fields, but Tab and Alt-Tab still (invisibly) navigate between the fields.

cefclient doesn't have the problem.
Chrome doesn't have a problem.
Mimicking cefclient's user agent doesn't fix the problem.
Disabling my overridden CefResourceRequestHandler doesn't solve the problem.

Any ideas?

This picture shows some of the fields coming from stripe, which can't be edited.
Attachments
credit.png
credit.png (11.28 KiB) Viewed 7078 times
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby magreenblatt » Tue Jan 14, 2020 4:43 pm

Can any text fields be edited normally in your app? If not, you might have the wrong version of icudtl.dat next to your app.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Tue Jan 14, 2020 4:55 pm

Yeah, I can edit most fields. I use the correct iucdtl.dat.
With Chrome DevTools, I can see that my app is trying to get HTML for the credit card form and it's getting an HTTP response from stripe.com with some number of bytes but with a blank response. The HTTP requests may be stuck (Chrome DevTools says Waiting TTFB).
With cefclient, the responses look ordinary.
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Tue Jan 14, 2020 5:12 pm

For the URL that gets a blank response, if I try to intercept it and use a CefRequestHandler to supply valid data for it, it STILL shows up as a blank response in Chrome DevTools.
I use the same CefRequestHandler to supply local data for other kinds of requests (e.g. png / html / js), and it has no problems I'm aware of.
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Wed Jan 15, 2020 1:10 pm

I'm narrowing down the problem a little bit.
I'm afraid to give out the stripe.com URL, but when I open the HTML URL manually, my app gets CefLoadHandler::OnLoadError() invoked with errorCode == -2 and errorText == "ERR_FAILED".
The URL seems to work normally in every other browser and in cefclient.exe and in my app with older CEF versions.

If I open a copy of the file using file://, it progresses further and just runs into some ordinary JavaScript errors about missing dependencies, as expected. But no ERR_FAILED.
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Wed Jan 15, 2020 4:15 pm

I have a Javascript URL that loads as ordinary text in CEF Client, but it shows up blank in my app and causes Chrome DevTools to disconnect.

The URL is something like https://js.stripe.com/v3/fingerprinted/ ... 9abcdef.js with a GUID I'm not sure I should be sharing.

Is there some kind of session-fingerprinting feature that changed or was added recently to Chromium or CEF?
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby magreenblatt » Wed Jan 15, 2020 4:21 pm

Sounds like you might be crashing the renderer process. Try running with a debugger and attaching to all processes.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Wed Jan 15, 2020 4:39 pm

Yes, instead of seeing a white screen with black JavaScript text, I see a white screen flash briefly and then it turns to my default color specified in CefSettings.

With one of the renderer processes, I see this debug output

[0115/133442.687:FATAL:ng_line_breaker.cc(1909)] Check failed: item_index_ != last_rewind_from_item_index_ || new_end != last_rewind_to_item_index_. 0, 31710->0

and then it quickly crashes here

#if defined(OS_WIN)
sandbox::SandboxInterfaceInfo sandbox_info = {0};
if (windows_sandbox_info == NULL) {
content::InitializeSandboxInfo(&sandbox_info);
windows_sandbox_info = &sandbox_info;
}

content::ContentMainParams params(&main_delegate);
params.instance = args.instance;
params.sandbox_info =
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info);

return content::ContentMain(params)

There isn't much else interesting about the arguments, variables, or call stack.

Is it crashing because it's failing to parse a long line of JavaScript?
I do see some Unicode characters in the JavaScript like "01234567890123456789".
Why would it fail in my app but not in cefclient.exe?
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby magreenblatt » Wed Jan 15, 2020 4:42 pm

Are you using a Debug build of libcef for both your app and cefclient?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Wed Jan 15, 2020 4:49 pm

Yes I'm using the Debug CEF files.

Sometimes I'm able to get the JS file to appear as text depending on my window size. As I change my window size, it crashes and shows a blank.
So I think there are problems with wrapping long lines of text, possibly related to changes in this file: https://github.com/chromium/chromium/co ... 7319c1bbe2
I can change cefclient.exe's window size without crashes, so it may not be a problem with release CEF binaries.

I think the crash while rendering JS is a red herring and doesn't explain the ERR_FAILED happening in my app for a particular HTML file.
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 95 guests