agent-js icon indicating copy to clipboard operation
agent-js copied to clipboard

v2.1 having issues with "unhandled rejection" (on case of Result.Result<Text, Text> and old way of agent constructor)

Open tiagoicp opened this issue 1 year ago • 0 comments

Describe the bug On v2.0.0 no issue happens, but when I upgrade to v2.1.0 or v2.1.1, a strange exception happens when it receives the response back. It is only happening to this response, if the response is an array of ints for example, it works fine.

To Reproduce Steps to reproduce the behavior:

  1. Try to figure it out just by the screenshots. If not, then...
  2. Using Plug to authenticate and a backend in motoko with a Result.Result<Text,Text>, I suspect you will face the same error.

Expected behavior To behave as it was on v2, without any exception.

Screenshots Screenshot 2024-09-17 at 22 00 10 Screenshot 2024-09-17 at 22 01 37

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome
  • Version: 128

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Original repo where the incident happened (for more context on dependencies, sequence of code, etc.): https://github.com/obsidian-tears/obsidian_tears_frontend_backend/tree/c27b4552b1f1a33eb47c1afde3262b62b3f984d5

tiagoicp avatar Sep 18 '24 05:09 tiagoicp