segmentio / segmentio/analytics.js-integrations

TypeError Cannot read property 'getItem' of null with VWO integration

Open
#497 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Since enabling the VWO Segment integration, many days before creating any VWO experiments, I have noticed this error appear in Bugsnag for several users:

TypeError Cannot read property 'getItem' of null
https://dev.visualwebsiteoptimizer.com/web/djIkdGU6Ni4wOmFzeW5jJWdxdWVyeQ==/tag-9ccc69fb8de21986f87f9ea7553668ba.js:92:12 g._getWebStore
https://dev.visualwebsiteoptimizer.com/web/djIkdGU6Ni4wOmFzeW5jJWdxdWVyeQ==/tag-9ccc69fb8de21986f87f9ea7553668ba.js:92:457 get
https://dev.visualwebsiteoptimizer.com/web/djIkdGU6Ni4wOmFzeW5jJWdxdWVyeQ==/tag-9ccc69fb8de21986f87f9ea7553668ba.js:77:153 Object.setPastTriggers
https://dev.visualwebsiteoptimizer.com/web/djIkdGU6Ni4wOmFzeW5jJWdxdWVyeQ==/tag-9ccc69fb8de21986f87f9ea7553668ba.js:104:156 Object.setPastTriggers
https://dev.visualwebsiteoptimizer.com/web/djIkdGU6Ni4wOmFzeW5jJWdxdWVyeQ==/tag-9ccc69fb8de21986f87f9ea7553668ba.js:254:206 onUrlChange
https://dev.visualwebsiteoptimizer.com/web/djIkdGU6Ni4wOmFzeW5jJWdxdWVyeQ==/tag-9ccc69fb8de21986f87f9ea7553668ba.js:110:264 History.a.
node_modules/@bugsnag/browser/dist/bugsnag.js:2722:9 History.t.
https://connect.facebook.net/en_US/fbevents.js:25:31098 History.b. [as pushState]
node_modules/braintree-web/lib/destructor.js:19:23
node_modules/promise-polyfill/src/index.js:141:8 Object.confirmTransitionTo

Detailed stacktrace:
image

It always happens after a History pushState event in our React app:
image

It affects mostly the Chrome mobile web browser on Android.
Affected users can't change the page they are on (history.pushState no longer works). I have verified that this is the case using FullStory.

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.

Research direction

Start by reproducing the VWO integration in the React app on Chrome mobile for Android and follow the reported stack trace around History.pushState. Investigate why the VWO script receives a null web store after navigation. Done means the TypeError no longer occurs and affected users can change pages normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.