[Archive] "Custom require either serviceProvider or priv key..." error

:classical_building: Archived Content from Web3Auth Community

This topic was originally posted by satyam.r on 2/28/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.


I am getting this error when I host the react app build.

everything works fine on local.
{“name”:“CoreError”,“code”:1000,“message”:“Custom require either serviceProvider or priv key in getGenericMetadataWithTransitionStates”}

If it works well in local, can you share the code here?
Btw, there is a guide for using tKey with React at Using Web3Auth Core Kit tKey SDK in a React Application | Web3Auth

Hi,

The issue was resolved by placing service worker file in public directory.

Thanks