question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No requests made to self hosted instance

See original GitHub issue

Thank you for this cool Next.js adaptation 👍

I tried to configure it globally on my _app.tsx file:

<PlausibleProvider
      domain="typebot.io"
      selfHosted={true}
      customDomain="https://my-selfhosted-plausible-domain.com"
    >
      <Component {...componentProps} />
    </PlausibleProvider>

And then my next.config.js:

const { withSentryConfig } = require("@sentry/nextjs");
const { withPlausibleProxy } = require("next-plausible");

const withBundleAnalyzer = require("@next/bundle-analyzer")({
  enabled: process.env.ANALYZE === "true",
});

const moduleExports = {};

const SentryWebpackPluginOptions = {};

module.exports = withPlausibleProxy()(
  withBundleAnalyzer(
    withSentryConfig(moduleExports, SentryWebpackPluginOptions)
  )
);

But it doesn’t fire anything in prod, no error, no request, nothing. Am I missing something? How can I debug this?

Next.js version: 11.1.0 Package version: 3.0.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
4lejandritocommented, Nov 5, 2021

Oh I think I know what’s going on!

When you have a self hosted instance you must set the customDomain property to the withPlausibleProxy function too so that the rewrites can use it:

module.exports = withPlausibleProxy({customDomain: "https://plausible.baptistearno.com"})(
  withBundleAnalyzer(
    withSentryConfig(moduleExports, SentryWebpackPluginOptions)
  )
);

Please let me know if that works.

1reaction
xLarrycommented, Nov 25, 2021

@4lejandrito I can confirm that this fixes the issue for me.

It’s a shame I didn’t see this issue before spending an hour trying to fix it by myself 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self-hosted instance should not make requests to app.posthog ...
Bug description When the Toolbar is opened, I see several (15+) network requests being made to https://app.posthog.com/e/?ip=1&_= &v=0.0.3.
Read more >
Self-hosted instance does not load files on some repos, MRs ...
Files do not load on specific repositories, neither do merge requests. When going into the repository settings, Unable to load the merge request...
Read more >
Solved - Migrating to Self-Hosted | 3CX Forums
I need a bit of guidance on how to migrate from a 3CX hosted instance to a self-hosted instance. I am aware of...
Read more >
Dealing with concurrent requests in self hosted WCF web ...
1 Answer 1 · Single: Each instance context is allowed to have a maximum of one thread processing messages in the instance context...
Read more >
Troubleshoot self-hosted integration runtime - Azure
Log viewing and uploading requests are executed on all online self-hosted IR instances. If any logs are missing, make sure that all the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found