UI Widgets/FAQ

Frequently Asked Questions

Common issues and troubleshooting tips for UI Widgets integration

Installation & Setup

Q: The SDK fails to load. What should I check?

Verify the following:

  • Check that both JSEncrypt and Agent SDK script tags are included in your HTML
  • Ensure scripts are loaded in the correct order (JSEncrypt first, then Agent SDK)
  • Verify the SDK URL is correct and accessible from your environment
  • Check browser console for any loading errors

Q: How do I verify the SDK is loaded correctly?

Open your browser console and check for the global object:

console.log(window.PatsnapAgentSDK);

If the SDK is loaded, you should see an object with AgentNewTab, AgentIframe, and AGENT_NAME properties.

Authentication Issues

Q: I'm getting authentication failure errors. What's wrong?

Common causes:

  • Your IP address is not in the Eureka whitelist - contact Eureka to add it
  • Incorrect public key or company ID - verify these values with Eureka
  • Invalid email format - ensure you're using a valid email address
  • JWT authentication not enabled for your tenant - contact Eureka support

Q: Should I hardcode the user email in my code?

No. Always retrieve the currently logged-in user's email dynamically from your authentication system. Example:

const userEmail = getCurrentUser().email;

Hardcoding emails will cause authentication to fail for other users.

iframe Integration

Q: iframe mode login fails in incognito/private browsing mode. Why?

Private browsing modes often block third-party cookies and cross-origin storage, which are required for iframe authentication.

Solution: Use normal browsing mode for iframe integration, or switch to new window mode which doesn't have this limitation.

Q: I'm getting CSP (Content Security Policy) blocking errors. How do I fix this?

You need to add Eureka domains to your CSP whitelist. Update your CSP headers to include:

frame-src 'self' *.patsnap.com;

If CSP configuration is not possible in your environment, use new window mode instead.

Q: The iframe appears blank or doesn't load content. What should I check?

Troubleshooting steps:

  • Verify the iframe element exists in the DOM before initializing
  • Check that login() completed successfully before calling init()
  • Ensure the iframe has appropriate width and height styles
  • Check browser console for CSP or CORS errors
  • Verify your IP is whitelisted with Eureka

Advanced Features

Q: Export events are not firing. What's wrong?

Check the following:

  • Export configuration is only supported for PATENT_DISCLOSURE agent
  • Ensure behavior is set to EXPORT_BEHAVIOR.EVENT_ONLY
  • Verify the exportReport listener is registered in eventListeners
  • Check that the configuration is passed when calling openAgent() or init()

Q: How do I download the report after receiving an export event?

The export event provides a taskId. Use this ID to call the OpenAPI endpoint for report download:

exportReport: (eventData) => {
  fetch(`/api/reports/${eventData.taskId}`)
    .then(res => res.blob())
    .then(blob => /* download */)
}

Q: Question configuration doesn't work. Which agents support it?

Not all agents support question configuration. Supported agents include:

  • TECHNICAL_QA, RESEARCH, FIND_SOLUTION
  • NOVELTY_SEARCH, PATENT_DISCLOSURE, SEMANTIC_SEARCH
  • MATERIAL_TECHNICAL_QA, MATERIAL_SCOUT

Check the API Reference in the agent integration documentation for the complete list.

General Questions

Q: Which integration mode should I choose?

Choose based on your use case:

  • New Window Mode: Best for standalone workflows, complex analysis tasks, or when CSP configuration is difficult
  • iframe Mode: Best for seamless integration within existing UI, maintaining user context, or embedded workflows

Q: Can I customize the widget appearance to match my brand?

Yes. The SDK supports complete removal of Eureka branding elements. Contact Eureka support to discuss customization options for your integration.

Q: How many widgets can I use simultaneously?

You can open multiple widgets, but usage limits depend on your OpenAPI capacity configuration. Contact Eureka to adjust limits based on your purchased package.

Q: Where can I find the complete list of available agents?

The complete agent list with descriptions, use cases, and feature support is available in the API Reference section of the agent integration documentation. You can also check the AGENT_NAME constants in the SDK.

Still Need Help?

If your question isn't answered here, please contact Eureka support for assistance.

For technical issues, include your browser console logs, SDK version, and a description of the problem.