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 occurred while using emulator #170

Closed
btboy12 opened this issue Nov 17, 2023 · 2 comments
Closed

Error occurred while using emulator #170

btboy12 opened this issue Nov 17, 2023 · 2 comments

Comments

@btboy12
Copy link

btboy12 commented Nov 17, 2023

lib version

{
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "@worldcoin/idkit": "0.5.1",
}

I used vanilla js to integrate IDKit, as shown below

export const open = async ({ onSuccess }: WorldCoinArgs) => {
  const [{ createRoot }, React, { IDKitWidget, useIDKit }] = await Promise.all([
    import('react-dom/client'),
    import('react'),
    import('@worldcoin/idkit'),
  ]);
  const { useEffect } = React;

  const worldCoinEl = document.createElement('div');
  document.body.append(worldCoinEl);

  const root = createRoot(worldCoinEl);
  root.render(
    React.createElement(() => {
      const { setOpen } = useIDKit();
      useEffect(() => {
        setOpen(true);
      }, []);

      return React.createElement(IDKitWidget, {
        app_id: APP_ID,
        action: ACTION,
        onSuccess,
      });
    })
  );
};

But when I used the simulator to scan the QR code, it reported the following error

error
@Bazzeman
Copy link

❤️

@Yokymia32
Copy link

🖤

@0xPenryn 0xPenryn closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
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

4 participants