Back

Could not register user using web SDK.

  • 0
  • Accounts
  • Web
ashuvssut (ashu)
29 May, 2023, 09:12

I think it is an issue with Appwrite SDK issue when working** on React Native Web**

I used Accounts API to create a user. This is the error:- (see screenshot too)

TypeScript
AppwriteException: Failed to execute 'fetch' on 'Window': Illegal invocation
    at Client.<anonymous> (...

At the same time this works fine on the Android App (I am not developing for android but just thought stating this might help)

TL;DR
User is experiencing an issue when trying to register a user using the web SDK. They have already tested the REST API and it worked fine. The issue only occurs on the web app, but the code is the same as the Android app where it works. The user is developing in React Native. They are using the Accounts API to create a user and receiving the error "AppwriteException: Failed to execute 'fetch' on 'Window': Illegal invocation". They have included a screenshot of the error. They are wondering if they should open a GitHub issue. Solution: It appears to be an issue with the Appwrite SDK when working with
ashuvssut (ashu)
29 May, 2023, 09:16

Should I open a GH issue?

Bouahaza
29 May, 2023, 09:18

Don't you forgot arguments on your call ?

safwan
29 May, 2023, 12:25

Can you share your code?

ashuvssut (ashu)
29 May, 2023, 16:21

I have tested this in the Android app. It worked fine. This error shows up for web app only

(I am developing in React Native. So, the code for android and web is the same. If it works for android, shows error for web)

ashuvssut (ashu)
29 May, 2023, 16:26
TypeScript
const session = await account.createEmailSession(email, password);

I am using account API only

ashuvssut (ashu)
29 May, 2023, 21:25

Using REST instead of web sdk 👍

No issues with REST

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more