faro-web-sdk
faro-web-sdk copied to clipboard
TypeError undefined is not an object (evaluating 'lr.api.pushEvent')
Description
I am using the Grafana Faro Web Tracing library for tracing activity on my site. The script is loaded from https://unpkg.com/@grafana/[email protected]/dist/bundle/faro-web-tracing.iife.js. Additionally, I use Sentry for error tracking in my project. Sentry regularly reports the following error for iOS devices, mostly on iOS 17.5:
undefined is not an object (evaluating 'lr.api.pushEvent')
The context from Sentry is provided in the attached JSON file: data.json.
Steps to Reproduce
- Use a device with iOS 17.5.1.
- Open Mobile Safari 17.5.
- Navigate to any page that includes the Grafana Faro Web Tracing script from this URL.
Expected Behavior
The application should function normally without any JavaScript errors.
Actual Behavior
A TypeError appears in the console:
undefined is not an object (evaluating 'lr.api.pushEvent')
Environment
- @grafana/faro-web-sdk: v1.7.3
- PHP: 8.2.0
- Laravel: 10
- OS: iOS 17.5.1
- Browser: Safari 17.5
- Device: iPhone, iPad, Mac (macOS >= 10.15.7)
Demo
Context
Detailed error context and logs can be found in the attached JSON file: data.json.