Skip to content

Social Login Sdk Provider is Null #4

@KarthickSakthi

Description

@KarthickSakthi

I tried my own and also used : nextjs-biconomy-web3Auth/components/scw.tsx code

but when:

 const sdk = new SocialLogin();
 await sdk.init();
 setSocialLoginSDK(sdk);

sdk instance was created but in the response of the sdk instance provider is getting null, even after called await sdk.init(); also getting provider as null.

I can't able to call the Google Login , Facebook login and Continuew with email options
when I trigger any of these options, getting error as:

WalletLoginError: Failed to connect with walletWallet adapter is not ready yet, Please wait for init function to resolve before calling connect/connectTo function
    at Function.fromCode (base.esm.js:375:1)
    at Function.connectionError (base.esm.js:381:1)
    at OpenloginAdapter.checkConnectionRequirements (base.esm.js:497:1)
    at OpenloginAdapter._callee2$ (openloginAdapter.esm.js:163:37)
    at tryCatch (regeneratorRuntime.js:44:1)
    at Generator.eval (regeneratorRuntime.js:125:1)
    at Generator.eval [as next] (regeneratorRuntime.js:69:1)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at _next (asyncToGenerator.js:22:1)
    at eval (asyncToGenerator.js:27:1)
    at new Promise (<anonymous>)
    at OpenloginAdapter.eval (asyncToGenerator.js:19:1)
    at OpenloginAdapter.connect (openloginAdapter.esm.js:195:1)
    at Web3AuthCore._callee2$ (core.esm.js:145:1)
    at tryCatch (regeneratorRuntime.js:44:1)
    at Generator.eval (regeneratorRuntime.js:125:1)
    at Generator.eval [as next] (regeneratorRuntime.js:69:1)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at _next (asyncToGenerator.js:22:1)
    at eval (asyncToGenerator.js:27:1)
    at new Promise (<anonymous>)
    at Web3AuthCore.eval (asyncToGenerator.js:19:1)
    at Web3AuthCore.connectTo (core.esm.js:157:1)
    at SocialLogin.socialLogin (SocialLogin.js:185:1)
    at onClick (UI.js:65:67)
    at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
    at invokeGuardedCallback (react-dom.development.js:4277:1)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
    at executeDispatch (react-dom.development.js:9041:1)
    at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)
    at processDispatchQueue (react-dom.development.js:9086:1)
    at dispatchEventsForPlugins (react-dom.development.js:9097:1)
    at eval (react-dom.development.js:9288:1)
    at batchedUpdates$1 (react-dom.development.js:26140:1)
    at batchedUpdates (react-dom.development.js:3991:1)
    at dispatchEventForPluginEventSystem (react-dom.development.js:9287:1)
    at dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay (react-dom.development.js:6465:1)
    at dispatchEvent (react-dom.development.js:6457:1)
    at dispatchDiscreteEvent (react-dom.development.js:6430:1)
console.error @ client.js:1
window.console.error @ next-dev.js:27
overrideMethod @ react_devtools_backend_compact.js:2367
socialLogin @ SocialLogin.js:201
await in socialLogin (async)
onClick @ UI.js:65
callCallback @ react-dom.development.js:4164
invokeGuardedCallbackDev @ react-dom.development.js:4213
invokeGuardedCallback @ react-dom.development.js:4277
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291
executeDispatch @ react-dom.development.js:9041
processDispatchQueueItemsInOrder @ react-dom.development.js:9073
processDispatchQueue @ react-dom.development.js:9086
dispatchEventsForPlugins @ react-dom.development.js:9097
eval @ react-dom.development.js:9288
batchedUpdates$1 @ react-dom.development.js:26140
batchedUpdates @ react-dom.development.js:3991
dispatchEventForPluginEventSystem @ react-dom.development.js:9287
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465
dispatchEvent @ react-dom.development.js:6457
dispatchDiscreteEvent @ react-dom.development.js:6430

but when I trigger Continue using metamask, again connectWeb3() method is called now I am getting provider in sdk instance, So I can able to logged in and its Smart account also created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions