Log in on Android does not go through

When asking for help in this category, please make sure to provide the following details:

So I am trying to integrate login via gmail, and simple email for now. I have followed the docs completly but seem to be stuck as nothing happens when i call my button click. I believe the problem may line in the SDK URL to be provide. But dont know what the url should be and where should i get it from. Also I am completly new to blockchain so please pharse your replies accordingly.

Hey @brezhnev.br, I checked your codebase. You should not pass anything in the sdkUrl. It’s usually used for internal testing purposes and to hit the Web3Auth APIs for specified buildEnv. You can also check our sample, for a easy quick start for Android. Let me know if it works for you.

I have already ready through these docs and quick start guides and also have gone through some git repos. I dont seem to find any problem with the code. Even the logs dont print anything for the when complete litseners. What is the normal flow i should be expecting if things were going smoothly like should i be redirected to some place etc.

As I already mentioned, you don’t need to pass the sdkUrl in Web3AuthOptions. It’s used for internal testing purposes. We’ll generate the SDK Url for you internally. Please, don’t pass the empty string "" as it’s visible in the screenshot you have shared. Please share the repo if the issue still persist after removing sdkUrl parameter in Web3AuthOptions initialisation, so we can have a look at the codebase.

Yea so the problem then would be that the sdk url is a non nullable field so if I try to try to pass null the app crashes.
Here is my repo for reference. Kindly go through the Login package.

Ok so I figured it out, since u mentioned that the sdk url will be provided by Web3auth. There is a function Web3AuthOptionsKt.getSdkUrl() which provides the necessary url. Thank you so much for your help.

Glad to know it’s working, but you don’t even need to pass null or use getSdkUrl, the constructor appends a default value if you don’t pass anything.

The Java complier forces me to pass some value there or else I get expected N arguments got M. I think what ur saying is only supported on kotlin.

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