Skip to Content

Troubleshooting

Container element not found

Cause:

  • containerElement selector is wrong
  • Container is not mounted when init() runs

Fix:

  • Ensure DOM element exists before creating TaskOnEmbed
  • Delay init until component/page mount lifecycle

Invalid baseUrl / protocol errors

Cause:

  • baseUrl is empty or malformed
  • Unsupported protocol (non http/https)

Fix:

  • Use a valid URL or host, for example https://taskon.xyz or taskon.xyz
  • For local development, use host like localhost:5173

Not initialized, please call .init() first

Cause:

  • Calling login, logout, setRoute, setLanguage, or isAuthorized before init

Fix:

  • Always await embed.init() before calling runtime methods

Wallet Login Error: provider required

Cause:

  • Login type is WalletAddress, but provider is missing

Fix:

await embed.login({ type: "WalletAddress", account: address, provider: window.ethereum, });

Signature Validation Fails

Common causes:

  • Timestamp converted to seconds instead of milliseconds
  • Signature generated on client instead of server
  • Wrong signing payload order

Fix:

  • Use @taskon/embed/node signMessage
  • Keep timestamp as 13-digit millisecond value

Route Sync Not Working

Cause:

  • No subscription to routeChanged
  • Host app not updating URL/history

Fix:

embed.on("routeChanged", (fullPath) => { window.history.replaceState(null, "", `/taskon${fullPath}`); });

OAuth Uses Wrong Environment

Cause:

  • Missing isDev in local/staging integration

Fix:

const embed = new TaskOnEmbed({ baseUrl: "https://your_embed_domain.com", containerElement: "#taskon-embed", isDev: true, });
Last updated on