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.

Secondary hub does not send useragent and breadcrumbs

See original GitHub issue

Package + Version

  • @sentry/browser

Version:

5.18.0

Description

Main angular application + angular widgets app and there are no breadcrumbs and useragent info for widgets app errors.

Main app sentry is inited like this

const integrations: any[] = [
  // ...
  new Sentry.Integrations.Breadcrumbs({ console: false }),
  new Sentry.Integrations.UserAgent(),
];

const client = new BrowserClient({
  enabled: this.enabled,
  dsn: sentryConfig.dsn,
  release,
  defaultIntegrations: false,
  integrations: () => integrations,
  beforeSend: this.beforeSend,
});

this.hub = new Hub(client);

makeMain(this.hub);

same for the widgets app, but without makeMain call and global integrations (GlobalHandlers and CaptureConsole).

We have breadcrumbs/useragent info for main app errors, but not for widgets app. After more debugging it looks like useragent is only sent when makeMain was called for secondary app (widgets). But as i understand there should be only one main hub on page, so how should we solve this and have breadcrumbs/useragent for each app on page?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
BenBachcommented, Jun 11, 2021

Also having the same issue. Using micro frontends with Sentry is currently very difficult.

8reactions
oleksandr-yefremovcommented, Feb 4, 2021

Still see this issue in

"@sentry/browser": "6.0.3",
"@sentry/tracing": "6.0.3",

So did this fix make it to v6 or not? I am struggling with Sentry for couple of days now and find it really frustrating that documentation says “all good, you can use Hub with Client for modular reporting”, but then it does not work at all and I have to dig into issues on github to find out that I have to call makeMain (not even mentioned in documentation). But then it only works for reported issues, not uncaught exceptions.
This ticket is open without milestone or update. Current ticket has milestone v6 which was not achieved and again no update. And there are many other issues which are hanging high and dry.
I can understand that your architecture was not meant for this use case, but the issues are open for more than a year and it’s time to put some commitment and announcement. If you are not gonna fix it, my team will consider moving to another error reporting tool, because Sentry just does not work in non-SPA case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Secondary hub does not send useragent and breadcrumbs
Description. Main angular application + angular widgets app and there are no breadcrumbs and useragent info for widgets app errors. ... const integrations:...
Read more >
Ecommerce SEO, Part 7/8: Product Listing Pages (PLP ...
In this sixth part of the 400 pages Ecommerce SEO guide you will learn how to build the most successful category (CAT) and...
Read more >
Unable to access outlook.com when browser doesn't send ...
Hi, I noticed a problem when trying to access Outlook webmail at https://outlook.live.com/owa/ If the web browser doesn't sent a User-Agent: ...
Read more >
Portal Technology - PeopleTools 8.58 - Oracle Help Center
Oracle Corporation and its affiliates are not responsible for and expressly disclaim ... Overriding Default Breadcrumbs Using Content Reference Attributes.
Read more >
Untitled
userAgent )}(navigator);const B={};const G=new Set(["www.youtube.com" ... toString)throw w("toString is not a function");if("string"!=typeof(e=e.
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