Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faro-web-sdk API calls are going in loop #663

Open
snehalk-mdsol opened this issue Aug 13, 2024 · 13 comments
Open

faro-web-sdk API calls are going in loop #663

snehalk-mdsol opened this issue Aug 13, 2024 · 13 comments

Comments

@snehalk-mdsol
Copy link

Facing a faro issue from quite a long now.
Please find below screenshots -
Screenshot 2024-08-13 at 1 57 48 PM
Screenshot 2024-08-13 at 1 57 38 PM
Screenshot 2024-08-13 at 1 57 18 PM
Screenshot 2024-08-13 at 1 56 12 PM

I tried updating faro libraries to the latest version 1.9.0 and added collector URLs in ignoreURLs while initializing a faro instance.
You can check the PR here - https://github.com/mdsol/platform-portal/pull/619/files

Can someone please help.
@codecapitano

@eskirk
Copy link
Collaborator

eskirk commented Aug 14, 2024

hi @snehalk-mdsol - @codecapitano is on PTO right now, but can you provide some more details regarding the issue you are facing? I am not fully understanding what the problem is.

@codecapitano
Copy link
Collaborator

Hi @snehalk-mdsol I can't access the PR you linked.

@codecapitano
Copy link
Collaborator

I have a suspicion.
The otlp-http-transport didn't consume the request body so didn't close the connection.
This can cause pending requests, memory leaks and other sorts of problems.

We'll release it soon.

Unfortunately I couldn't reproduce the issue so once released please let us know if the update fixed the problem.

@Shawns2759
Copy link

We are seeing this as well. It is a big problem causing lots of failed logs.

@codecapitano
Copy link
Collaborator

@Shawns2759 do you use the same setup with the otlp-http-transport?
What is the Faro version your are using?
Can you share you Faro config?
And do you use Faro in a microfrontend with multiple instances running simultaniously?

@Shawns2759
Copy link

   "@grafana/faro-react": "^1.5.1",
    "@grafana/faro-web-sdk": "^1.5.1",
    "@grafana/faro-web-tracing": "^1.5.1",

@Shawns2759
Copy link

Shawns2759 commented Sep 23, 2024

Things are set up very similarly to this PR.

open-sauced/app#3139

@codecapitano
Copy link
Collaborator

codecapitano commented Sep 24, 2024

Architecture is a monolith not a micro frontend right?
Means only a single Faro instance is running?

  • Are you using Grafana Cloud or do you send logs to Alloy?
  • Did you already update the Faro packages or are you still at 1.5.1?

@Shawns2759
Copy link

Shawns2759 commented Sep 24, 2024

Our application is a Capacitor application that is serving a nextJs frontend and a a mobile frontend for Android and Apple via Capacitor. We delineate between mobile and web using namespace.

We are using Grafana Cloud.

Faro is still at 1.5.1.

@codecapitano
Copy link
Collaborator

codecapitano commented Sep 25, 2024

Thank you @Shawns2759
Is it possible for you to upgrade Faro to the current version (currently 1.10.x)?

With Faro 1.8.0 we fixed an issue where session timings could drift between the faro receiver and faro itself which lead to
rejected sessions.
It may not be directly related but at least we can exclude that this is causing the issue in your case and then continue the investigation.

Enhancement (@grafana/faro-web-sdk): Auto extend a session if the Faro receiver indicates that a
session is invalid (#591).

@Shawns2759
Copy link

Interesting. Yes I will try that.

@Shawns2759
Copy link

@codecapitano I updated to 1.10.0 and I am still receiving this error here is what it looks like.

console error: Faro @grafana/faro-web-sdk:transport-fetch Failed sending payload to the receiver { "meta": { "sdk": { "version": "1.10.0" }, "app": { "name": "redacted", "version": "1.0.0", "environment": "production", "namespace": "web" }, "browser": { "name": "redacted", "version": "redacted", "os": "Windows 10", "userAgent": "redacted", "language": "redacted", "mobile": false, "brands": "unknown", "viewportWidth": "1651", "viewportHeight": "801" }, "page": { "url": "redacted" }, "session": { "id": "redacted", "attributes": { "previousSession": "redacted" } } }, "events": [ { "name": "faro.performance.resource", "domain": "browser", "attributes": { "name": "redacted", "duration": "45", "tcpHandshakeTime": "0", "dnsLookupTime": "0", "tlsNegotiationTime": "0", "responseStatus": "202", "redirectTime": "0", "requestTime": "0", "responseTime": "504819", "fetchTime": "45", "serviceWorkerTime": "504774", "decodedBodySize": "53", "encodedBodySize": "53", "cacheHitStatus": "cache", "renderBlockingStatus": "unknown", "protocol": "", "initiatorType": "xmlhttprequest", "faroNavigationId": "redacted, "faroResourceId": "redacted" }, "timestamp": "2024-09-26T18:35:45.594Z" } ] } TypeError: NetworkError when attempting to fetch resource.

@codecapitano
Copy link
Collaborator

Can you share a screenshot with the request response information, like request/response headers etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants