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

[react-use-intercom] onHide, onShow, onUserEmailSupplied, boot Intercom instance is not initalized yet (NextJS 15) #726

Open
maxaqquepucho opened this issue Nov 21, 2024 · 5 comments
Assignees

Comments

@maxaqquepucho
Copy link

Describe the bug
Este error aparece en Next JS 15. Estoy integrando la biblioteca como se muestra en la documentación.

To Reproduce
Steps to reproduce the behavior:

  1. Setup the intercom provider context.
  2. Use the hook useIntercom
  3. Call the function boot

Screenshots

image image

Desktop

  • OS: Mac
  • Browser: chrome

Additional context
To solve this issue. use a setTimeout function. This is not the perfect solution but it works
image

@devrnt
Copy link
Owner

devrnt commented Nov 21, 2024

Hi there!

Are you sure your app is wrapped in an <IntercomProvider>? If so, please provide a reproduction in StackBlitz or CodeSandbox so I can take a look

@VinceBT-BG
Copy link

I am having the same issue, I had autoBoot in the past but now I call boot manually and I have no way to know if Front is initialized before calling it, so I get many errors in the console. Is there a way to get this information ?

@mirus-ua
Copy link

mirus-ua commented Jan 28, 2025

Hey @devrnt. I have the same issue as well
I checked that the wrapper was in place

<IntercomProvider>
      <Index />
</IntercomProvider>

Inside the index components, I use only const { update, boot } = useIntercom(); to boot and/or update user instance over time.

We use "@tanstack/react-router": "^1.76.1" and heavily rely on laze routes. Could it be a reason?

@ArianHamdi
Copy link

Same here, everything was working fine on next.js 14

@devrnt
Copy link
Owner

devrnt commented Feb 8, 2025

Please provide a reproduction in StackBlitz so I can take a look

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

5 participants