Skip to content

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

Description

@FatmaMahmoud698

✅ 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 |

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions