Cannot read properties of undefined (reading 'match')

what is the error that you get? what cause that error?

match undefined
MoralisWeb3.js:1681 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘match’)
at Function. (MoralisWeb3.js:1681:1)
at tryCatch (runtime.js:63:1)
at Generator.invoke [as _invoke] (runtime.js:294:1)
at Generator.next (runtime.js:119:1)
at asyncGeneratorStep (asyncToGenerator.js:5:1)
at _next (asyncToGenerator.js:27:1)
at asyncToGenerator.js:34:1
at new Promise ()
at new Wrapper (export.js:18:1)
at Function. (asyncToGenerator.js:23:1)
(anonymous) @ MoralisWeb3.js:1681
tryCatch @ runtime.js:63
invoke @ runtime.js:294
(anonymous) @ runtime.js:119
asyncGeneratorStep @ asyncToGenerator.js:5
_next @ asyncToGenerator.js:27
(anonymous) @ asyncToGenerator.js:34
Wrapper @ export.js:18
(anonymous) @ asyncToGenerator.js:23
(anonymous) @ MoralisWeb3.js:1849
main @ CreateProduct.js:201
await in main (async)
callCallback @ react-dom.development.js:3945
invokeGuardedCallbackDev @ react-dom.development.js:3994
invokeGuardedCallback @ react-dom.development.js:4056
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4070
executeDispatch @ react-dom.development.js:8243
processDispatchQueueItemsInOrder @ react-dom.development.js:8275
processDispatchQueue @ react-dom.development.js:8288
dispatchEventsForPlugins @ react-dom.development.js:8299
(anonymous) @ react-dom.development.js:8508
batchedEventUpdates$1 @ react-dom.development.js:22396
batchedEventUpdates @ react-dom.development.js:3745
dispatchEventForPluginEventSystem @ react-dom.development.js:8507
attemptToDispatchEvent @ react-dom.development.js:6005
dispatchEvent @ react-dom.development.js:5924
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
discreteUpdates$1 @ react-dom.development.js:22413
discreteUpdates @ react-dom.development.js:3756
dispatchDiscreteEvent @ react-dom.development.js:5889

for authentication I was using web3-react but It wasnt working properly on mobile

are you sure this is the syntax with Params instead of params?

ok Ill try Thank you I will disturb you after :smiley: :smiley: :smiley:

changed the syntax but still getting same error

sytax seem to be fine

this seems to work:

abi = [
          {
            "inputs": [
              {
                "internalType": "string",
                "name": "_tokenURI",
                "type": "string"
              }
            ],
            "name": "createCollectible",
            "outputs": [
              {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
              }
            ],
            "stateMutability": "nonpayable",
            "type": "function"
          }
        ]

        options = {
        
        contractAddress: "0xaa462106dA447C0440a4bE29614c19387a59A331",
        functionName: 'createCollectible',
        abi: abi,
        params: {_tokenURI: "32423" },
      };

      mint =await Moralis.executeFunction(options)

You could try to read documentation to see the exact parameters.

https://v1docs.moralis.io/moralis-dapp/web3/web3#example-of-calling-a-write-contract-method

I was putting (function_name )instead of functionName: ‘createCollectible’,

again saying uri is requried but Im passing uri in string format

I didn’t get any error with the code that I tested

yes your code was correct Now can I use same code with wallet connect provider

with wallet connect I always get the same Chain Id 1 But Im using mumbai 80001

you could try to set the chain at authentication time or when enableWeb3 is used

how I can Do that could you please elaborate with an example

you can try to check the documentation:

https://v1docs.moralis.io/moralis-dapp/users/web3-login/walletconnect#3.-specify-the-chainid

thanks man stay fit and fine