coral-xyz / backpack

🎒 Next level crypto wallet
https://backpack.app
GNU General Public License v3.0
1.39k stars 825 forks source link

"ERROR: backpack: common/request-manager: unexpected event" when calling solana.customSplTokenAccounts #1366

Open ph101pp opened 2 years ago

ph101pp commented 2 years ago

Testing an iFrame xNft locally via xnft dev --iframe

When interacting with the blockchain via window.xnft.solana.connection an unexpected event is received and throws and uncaught error: "ERROR: backpack: common/request-manager: unexpected event"

However, transactions and requests are successful.

Observed when calling window.xnft.solana.connection.customSplTokenAccounts and window.xnft.solana.connection.sendAndConfirm

Screen Shot 2022-10-31 at 6 28 20 PM
Vicky88844 commented 6 months ago

Hey there, @armaniferrante! I'm eager to jump in and help you out with this issue. Would you mind assigning it to me? I appreciate your time and consideration. Thanks a lot!

Vicky88844 commented 6 months ago

Check Dependencies: Ensure that all necessary dependencies are correctly installed and up-to-date. Verify that the required Solana libraries and modules are properly imported. Confirm that the backpack package is correctly configured and compatible with your project.

Review Connection Initialization: Double-check how you initialize the Solana connection using window.xnft.solana.connection. Ensure that the connection is established correctly. Look for any asynchronous operations or race conditions that might lead to unexpected events.

Debugging: Inspect the specific event that triggers the error. Use debugging tools (such as console.log) to track the flow of execution and identify the root cause. Consider logging relevant information (e.g., event details, connection status) to gain insights into what’s happening during the interaction.

Hey there! I've got some great solutions to share with you. Take a look and let me know what you think!