Failed to connect with Auth Provider

I’ve been trying to migrate from the pre-v9 OpenLoginAdapter to the new AuthAdapter and ran into some issues, some of which have been referenced in this ticket.

First, I was getting the issue described at the beginning of the referenced ticket (Cannot read properties of undefined…) but was able to solve that by using https in my dev environment with ngrok… (not sure why that became necessary all of a sudden, but a fairly simple change)

After fixing the initial problem, I’m receiving the following error when trying to log in.

The only thing I could think of is that functionality for the Auth adapter is being limited due to my plan, but I’m on sapphire devnet, so that shouldn’t be an issue.

Here is a link to the code:

Hi PJ,

Thank you for reaching out! I can see you’re facing some challenges while migrating to the new AuthAdapter.

Here’s what I gathered from your message for our support team:

  • SDK Details: Plug n Play
  • SDK Version Number: Not specified (please clarify if available)
  • Platform: Not specified (please clarify if available)

Issue Details:

  • Initial Problem: Encountered “Cannot read properties of undefined…”
  • Current Error: Failed to connect with Auth Provider as shown in the screenshot you provided.
  • Link to Code: GitHub - Hooks.js

Additional Notes:

  • You solved the initial issue by using HTTPS with ngrok.
  • You mentioned you might be limited by your plan, but you’re on sapphire devnet.

Proposed Solutions:

  1. Ensure your AuthAdapter setup aligns with the documentation for the latest SDK.
  2. Double-check if there are any required permissions or functionalities that might be restricted on your current plan.

If you could provide any further information regarding the SDK version and platform, that would be great!

Feel free to let me know if there’s anything else you need or if you have additional questions. We’re here to help!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

EDIT:

After some experimentation, I realized that the issue is likely caused by the endpoint my app is trying to hit in order to set its session… for the “set” request within my app, it makes a POST request to this endpoint:
https://api.web3auth.io/session-service/v2/store/set

Whereas in the quickstart example, the POST request is being sent to this endpoint:
https://session.web3auth.io/store/set

Not sure why this behavior differs, but I’ll update in this thread again if I figure anything out.

Thanks GOD you posted this, such a relief.

I’ve been facing the same issue since yesterday. My setup was absolutely working fine till yesterday and all of a sudden I started facing this issue and ever since I’m debugging exactly what could be the issue.

Hey @peej,

I checked out the web3auth-error branch in your repo (let me know if it’s not the right one).

Could you try a couple of things:

  1. Ensure that await web3auth.init() is only called when web3auth.status === "not_ready".
  2. Only call await web3auth.connect() when web3auth.status === "ready".

Let me know if the error still occurs after these adjustments, and we can dive deeper if needed.

Hey @vishnukumawat0950,

I understand you’re facing a similar issue, but let’s open a new thread so we can provide you with personalized assistance for your specific implementation. This way, we can address your needs more effectively.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.