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

Issues with keys - Something's gone wrong - how to debug? #110

Open
strrife opened this issue Oct 21, 2024 · 0 comments
Open

Issues with keys - Something's gone wrong - how to debug? #110

strrife opened this issue Oct 21, 2024 · 0 comments

Comments

@strrife
Copy link

strrife commented Oct 21, 2024

Describe the bug
I'm having issues with the Intercom integration for the Capacitor app that I work on. Calling await Intercom.displayMessenger(); shows a screen with "Something's gone wrong. Content could not be loaded" message.

Looks like the issue is with they keys because registering a clean account and using its keys works fine.

I understand that the main issue is not with the capacitor intercom plugin. My questions are:

  • How can this be debugged?
  • Any ideas what this might be?

To Reproduce
Unfortunately I can not share the actual keys, but the setup is extremely basic. This is the repo that the issue can be reproduced on. Bug again, the issue is not with the integration.

import { SplashScreen } from '@capacitor/splash-screen';
import { Intercom } from '@capacitor-community/intercom';

Intercom.registerUnidentifiedUser()

window.customElements.define(
  'capacitor-welcome',
  class extends HTMLElement {
    constructor() {
      super();

      SplashScreen.hide();

      const root = this.attachShadow({ mode: 'open' });

      root.innerHTML = `
      <main>
        <div style="margin: 100px">
          <button class="button" style="width: 100%; height: 100px;" id="take-photo">Open Intercom</button>
        </div>
        <p>
          <img id="image" style="max-width: 100%">
        </p>
      </main>
    `;
    }

    connectedCallback() {
      const self = this;

      self.shadowRoot.querySelector('#take-photo').addEventListener('click', async function (e) {
        try {
          await Intercom.displayMessenger();
        } catch (e) {
          alert(e.toString())
          console.error(e);
        }
      });
    }
  },
);

Expected behavior

An error thrown by the Intercom.displayMessenger(); or something in the logs?

Screenshots

New account iosApiKey and iosAppId Company account iosApiKey and iosAppId
image image

Desktop (please complete the following information):

  • OS: iOS

Smartphone (please complete the following information):

  • Device: iPhone 13 Pro Max, various iPhone simulators
  • OS: iOS 17.5.1

Additional context
Add any other context about the problem here.

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

1 participant