[bing-ads] Uncaught TypeError: window.UET is not a constructor

Open
#342 12 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start at lib/index.js line 40 and reproduce initialization in Brave when Bing is blocked. Trace the window.UET access and add a guard before initialization; done means analytics.js initialization no longer throws an uncaught TypeError when Bing fails to load.

Written by the indexing model from the issue text.

Description

Migrated from #5 by @samkessaram

OS: Mac OS X 10.14.1
Browser: Brave 0.56.15

Getting this error on initialization of Segment.

The error is throwing on this line:
https://github.com/segment-integrations/analytics.js-integration-bing-ads/blob/master/lib/index.js#L40

Brave is blocking Bing from loading, but not analytics.js. So when it tries to initialize the Bing integration, it fails.

Some sort of check before attempting to initialize would be good.

Dominant language
JavaScript
Stars
125
Forks
136
Avg merge
2h 45m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from segmentio/analytics.js-integrations

All issues in segmentio/analytics.js-integrations

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.