TypeError: Cannot destructure property 'baseUrl' of 'e' as it is undefined.

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale

Research direction

Start by reproducing the failure on the deployed domain and inspect the TorusServiceProvider initialization shown in the issue, especially customAuthArgs and the production environment values. Done means the deployed application initializes without the destructuring TypeError while retaining the intended authentication redirect behavior.

Written by the indexing model from the issue text.

Description

Hey, i've been implement this code as well

import TorusServiceProvider from "@tkey/service-provider-torus";
const serviceProvider = new TorusServiceProvider({
        customAuthArgs:{
          baseUrl: `${window.location.origin}/login`,
          enableLogging: false,
          redirectPathName: "auth",
          uxMode: "redirect",
          redirectToOpener: true,
          //proxyContractAddress: "0x4023d2a0D330bF11426B12C6144Cfb96B7fa6183", // details for test net
          network: REACT_APP_TORUS_NETWORK,
          networkUrl: REACT_APP_TORUS_NETWORK_URL
        }
});

then i got this:
image
on my local it was working fine, but error on production (deployed on domain)

Dominant language
TypeScript
Stars
181
Forks
53
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MetaMask/tkey

All issues in MetaMask/tkey

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.