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

Error: Custom driver not compliant when using minified offline integration #5527

Closed
3 tasks done
kevsturman opened this issue Aug 5, 2022 · 1 comment · Fixed by #5534
Closed
3 tasks done

Error: Custom driver not compliant when using minified offline integration #5527

kevsturman opened this issue Aug 5, 2022 · 1 comment · Fixed by #5534
Assignees

Comments

@kevsturman
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/browser

SDK Version

7.8.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

Followed the installation instructions to use the offline integration as a CDN

Expected Result

Sentry should be using the offline integration

Actual Result

Instead we get this error when trying to create a new Sentry.Integrations.Offline();

Uncaught (in promise) Error: Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver
    e localforage.js:2496
    defineDriver localforage.js:2496
    n localforage.js:2496
    b.exports<[4]< localforage.js:2496
    i stacktrace.js:85
    n stacktrace.js:85
    <anonymous> stacktrace.js:85
    <anonymous> misc.js:14

However I have managed to get the offline integration working by using the non minified offline.js bundle. I don't get the localForage error and it works as intended.

Note I have also managed to minify offline.js locally using terser. This minfied bundle does not error and works as intended. So I assume there might be something causing a problem during your bundling process?

@lforst
Copy link
Member

lforst commented Aug 8, 2022

Hi @kevsturman, thanks for reporting this!

I was able to reproduce this locally and found a fix. It will probably be included in the next release. The hint that the problem probably has to do with terser was great and helped a lot. Thank you!

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

Successfully merging a pull request may close this issue.

2 participants