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

Fetch interceptor causing error in development when using an ad blocker #220

Open
meandillar opened this issue May 25, 2023 · 3 comments
Open
Assignees

Comments

@meandillar
Copy link

meandillar commented May 25, 2023

When a google ad pixel fires we get the error Uncaught (in promise) TypeError: Failed to fetch if using Adblock Plus extension. I'm using Chrome on mac.

The ad pixel request looks something like this:

    fetch("https://some-google-ad-url.com/some-url-slug", {
        browsingTopics: true,
        keepalive: true
    })

The error occurs in recipeImplementation.js here:

Screenshot 2023-05-26 at 8 14 58 AM

I can disable the ad blocker and the problem disappears but this error doesn't occur when not using supertokens so I thought I should report the bug.

EDIT: happens both in development and production

@rishabhpoddar
Copy link
Contributor

Thanks for raising this issue. We will have a look.

@porcellus
Copy link
Collaborator

I've started investigating this problem, and I have a few questions:

  • Does this cause any issues besides being logged into the console? The Failed to fetch and BLOCKED_BY_CLIENT exceptions being thrown are the expected behaviour as far as I can see.
  • Are there errors logged to the console with supertokens disabled?
  • Could you add a screenshot of the console contents with and without supertokens?

@meandillar
Copy link
Author

@porcellus sorry for taking a while to reply.

In development, rather than just a "failed to fetch" error we also get an error popup (we're using nextjs) like this:

Screenshot 2023-07-04 at 2 09 33 PM

The error that is causing problems still gets logged to the console without supertokens but is smaller and doesn't trigger the nextjs error popup. Here are screenshots with and without supertokens initialised:

Screenshot 2023-07-04 at 2 10 15 PM Screenshot 2023-07-04 at 2 11 34 PM

Hope that helps :)

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

No branches or pull requests

3 participants