question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need to diagnose Hosted Fields / Client initialization problems as they occur

See original GitHub issue

General information

  • SDK version: 3.68.0
  • Environment: Production
  • Browser and OS: Several (here’s just 3 exanples)

Mozilla/5.0 (iPad; CPU OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPad7,2;FBMD/iPad;FBSN/iOS;FBSV/13.7;FBSS/2;FBID/tablet;FBLC/en_US;FBOP/5]

Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBAV/293.0.0.45.117;FBBV/252184617;FBDV/iPhone9,4;FBMD/iPhone;FBSN/iOS;FBSV/13.7;FBSS/3;FBID/phone;FBLC/en_US;FBOP/5;FBRV/253288080]

Mozilla/5.0 (Linux; Android 9; LM-Q720) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.110 Mobile Safari/537.36

Note: We do most advertising on Facebook, and the Facebook browser normally works fine so that’s not the issue.

Issue description

We are getting quite a few emails from customers saying they couldn’t enter their credit cards. These are turning out to be the dreaded HOSTED_FIELDS_TIMEOUT error. I have tried both ways of client creation (standalone and internally to hosted fields) and don’t see any difference. I cannot reproduce on my machine.

I expect the failure reasons would be in these sort of categories:

  • Firewall issue
  • Connectivity issue.
  • Slow connection. Our site is loading fast even on users with issues (I log the DOMComplete time).
  • Issue your end with creating a client that never returns.
  • Weird browser plugin issues. We get errors on mobile and desktop and obviously plugins are less prevalent on mobile.

Based on my detailed logging the errors are not occurring after the user has navigated away - since I don’t log in that case.

I have just about exhausted the debugging I am able to do myself and our customers are external so I cannot reproduce. It seems that looking at data for the past month we sometimes are getting 5-10% of customers with timeouts.

I’ve also seen cases where the customer has tried refreshing the page themselves (so they definitely have connectivity) and tried 2-5 times they’re still getting the hosted fields error each time.

What I really need is some combination of the following:

  • A way to send a correlation ID (UID) when I create hosted fields that I could submit to support to look for analytics events. I see there’s an existing ‘sessionId’ but I don’t seem to be able to access that.

  • A way to set shorter timeouts for hosted fields. Expecting a user to wait 60 seconds is crazy. Of course this doesn’t help my problem unless the rejected promise has useful information.

  • Logging of internal events for client and hosted field setup that I could access any time after attempting to create an instance of the iframe. I think this is the only way I could truly find the problem.

For example this is the sort of thing I would like to see in a log. The idea being you would be able to see where it got stuck:


{
  log: [
    {
      date: 'Thu Oct 29 2020 11:34:02 GMT-0700 (Pacific Daylight Time)',
      desc: 'Create iframe'
    },
    {
      date: 'Thu Oct 29 2020 11:34:03 GMT-0700 (Pacific Daylight Time)',
      desc: 'Iframe created OK'
    },
    {
      date: 'Thu Oct 29 2020 11:34:04 GMT-0700 (Pacific Daylight Time)',
      desc: 'Graph QL Sent',
      data: {
        sessionID: '3649b9fb-9936-4adf-934e-555cb79ab537',
        operation: 'ClientConfiguration'
      }
    },
    {
      date: 'Thu Oct 29 2020 11:34:06 GMT-0700 (Pacific Daylight Time)',
      desc: 'Graph QL Received',
      data: {
        requestID: 'trOsRnXvk97FTdTaQ9q734dYoBEHbH0SwBrFQojtZsp8iVUj3_TMvg',
        operation: 'ClientConfiguration'
      }
    }]
}

Having access to this would make it far easier to diagnose. Right now it’s almost impossible. Let’s say if hosted fields is still not set up after 15 seconds I could call hostedFields.log and be able to access the log (even before the timeout). I don’t want to wait a whole minute, in which time the user may have already given up.

I was also wondering if would help for me to call the ‘ping’ service on your graphql to confirm connectivity is available? I just don’t know who would be blocking your domain unless it’s a really strict government or internal network.

Yes I did submit a support request but I only asked for our analytics to be looked at - perhaps you are already recording something that could help find the root cause. And yes I’ve seen other similar issues, but those seem to have been resolved.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
crookedneighborcommented, Nov 17, 2020

I’m going to close this issue then, but feel free to comment again if there’s more info for us to investigate.

1reaction
crookedneighborcommented, Nov 13, 2020

Nothing intentional. I wouldn’t expect the update to Framebus v5 to resolve anything regarding this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Need to diagnose Hosted Fields / Client initialization problems as ...
I have just about exhausted the debugging I am able to do myself and our customers are external so I cannot reproduce. It...
Read more >
HOSTED_FIELDS_TIMEOUT in SPA · Issue #403 · braintree ...
I've made some investigation and find the following scenario when this error occurs: User opens payment form popup. Braintree client and hosted ......
Read more >
Braintree Hosted Fields not rendering on Polymer
I'm attempting to use braintree's hosted fields on a polymer application and am running into an issue where the input boxes representing the ......
Read more >
Some Known Issues in Business Central On-premises
When you install Business Central on premises, installation may fail with the error Package Microsoft .NET Core Windows Server Hosting failed ...
Read more >
Overview | Docker Documentation
Select the Docker menu whale menu and then Troubleshoot; Select the Troubleshoot icon from the Docker Dashboard. Troubleshoot Docker Desktop. The Troubleshoot ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found