Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinity warring logs in nextjs project <Third-party cookie will be blocked in future Chrome versions as part of Privacy Sandbox.> #779

Open
FatmaMahmoud698 opened this issue Aug 10, 2024 · 2 comments

Comments

@FatmaMahmoud698
Copy link

FatmaMahmoud698 commented Aug 10, 2024

✅ Prerequisites

  • [ done] Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
  • [ "magic-sdk": "^28.3.0",] Are you running the latest SDK version?
  • [yes ] Are you reporting to the correct repository (magic-sdk)?

🐛 Description

I had nextjs project and I integrate XDC network with magic-sdk
everything is working fine but I face infinity warring logs Third-party cookie will be blocked in future Chrome versions as part of Privacy Sandbox.
nextjs version 13.4.19
magic-sdk: 28.3.0
when deploy project on ec2 aws it crashed because of infinity warring logs

💻 Code Sample


const { Web3 } = require("web3")
import { Magic } from "magic-sdk"
my function is 
      try {
        const magic = new Magic(process.env.NEXT_PUBLIC_MAGIC_API_KEY || "", {
          network: {
            rpcUrl: process.env.NEXT_PUBLIC_RPCURL,
            chainId: process.env.NEXT_PUBLIC_CHAINID,
          }
        });
        const web3 = await new Web3(magic.rpcProvider)
        const accounts = await web3?.eth.getAccounts()
        const contract = new web3.eth.Contract(murabhaContractABI.abi, murabhaContractABI.address);
        const gasPrice = await web3.eth.getGasPrice();
        const tx = await contract.methods.createToken(data.name, data.symbol).send({ from: accounts[0], gasPrice: gasPrice, });;
      } catch (error) {
        console.error('Error creating tokens', error.message);
      }
    } catch (error: any) {
      /// update error message
    }
  };

🌎 Environment

| Software | Version(s) |
| nextjs | 13.4.19 |
| magic-sdk | 28.3.0 |
| Browser | chrome and firefox |
| yarn | 1.22.17 |
| Operating System | windows |

@CryptoGraffe
Copy link

We are hitting this as well and it is pretty crazy! Struggling to get magic working with rainbowkit.

@Adebesin-Cell
Copy link

@CryptoGraffe Can you state your issue? I'm having pretty same issues, can't seem to get it working, my wagmi.store states keep getting refreshed on page load, using dedicatedWalletConnector approach tho :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants