WalletConnect Mobile not executing functions

I’m having serious problems getting functions to execute with metamask… I get a transaction id

bsc testnet

https://testnet.bscscan.com/tx/0x52c11a9bd402139e863711fb74170665bbb307b3778bdd8d565ce4a384378414 (if you don’t want to click the link)

but nothing is stored when I call a function to update the state of the contract.
The same function call works fine on browser using remix.

That transaction that you pasted is a transaction that creates a smart contract, and it looks like it created a smart contract without code. You have to deploy first the smart contract properly in order to be able to interact with that smart contract.

the same deployed contract works fine on desktop. I tried Iphone and Android metamask with mobile connect, the transaction was successful, but the function to store a struct doesn’t get executed.

Can you paste a link to a transaction that you say that it works fine on desktop on bscscan? I still don’t understand what is with that transaction that you pasted initially.

I’m calling this function in the contract,

    struct PROFILE{

        address user;
        uint256 power;
        uint256 powerMultiplier;
        uint256 slaps;
        uint256 sneaks;
        uint256 grabs;
        uint256 blocks;
        uint256 avatar;
        uint256 cover;
        uint256[] collection;
        uint256[] nfteas;
        uint256[] sells;
        uint256[] auctions;
        uint256 active;

    }
    PROFILE[] internal profile;
    mapping(address=>PROFILE) public myProfile;
    function createProfile(uint256 avatar, uint256 cover) public returns(bool){
        
        require(!hasProfile[msg.sender],'profile already created');
        
        uint256[] memory collects;
        uint256[] memory nfteas;
        uint256[] memory sells;
        uint256[] memory auctions;
        PROFILE memory save = PROFILE({
          user: msg.sender,
          powerMultiplier: 0,
          power: 0,
          slaps: 0,
          grabs: 0,
          sneaks: 0,
          blocks: 0,
          avatar: avatar,
          cover: cover,
          collection: collects,
          nfteas: nfteas,
          sells: sells,
          auctions: auctions,
          active: 1            
        });
          profile.push(save);
          myProfile[msg.sender] = save;
          hasProfile[msg.sender] = true;
          return true;
    }

The function isn’t executing on walletconnect with metamask mobile

This transaction that you pasted here with transaction hash 0xf1db6dfea11c92ec0655e20ecf960f1f892044c8e7b21f23d9da291f82b51262 it doesn’t look like a transaction that calls a contract function, it looks like the previous transaction that you pasted, this is a transaction that tries to deploy a smart contract but it deployed a smart contract with no code, and that looks to be all that this transaction did.
This is the smart contract that was created: https://testnet.bscscan.com/address/0x09bd8cf6e76924f3c081a6317033e5c37364db4e#code

i am facing the same problem. I am calling the contract mint Function with data but its just making a transaction but not calling the specific contract function. any clue or any piece of code that show how to call the function of smart contract with walletconnect and metamask on RN mobile app. Thanks

Hmmm what do you mean by making tx but not calling contract function? coz making tx is calling a contract function

its mean that every time i tried to mint the NFT and call the NFT function like

let response=await connector.sendTransaction({
        data: data,
        from: connector.accounts[0],
        to: '0xB6bC279F161132AD54b5d524eD635a9e2c9524e2',
        value: '0x0',
      });
      console.log({response})

it only shows the transaction method called in testnetwork chain and doest not change the state of contract

What is the tx hash of one of your tries? What does data look like?

i have created the transaction with Moralis.executeFunction() . But now i am facing the strange behaviour like metamask appear with the popup that your transaction is unsuccessful but after some time when i review the transaction activity it shows the same transation as successful transaction. and some time an error " undefined object by executing f.transaction" something like that.

Can you post some examples e.g. tx hash(es), screenshots, and your code.

well i think the problem is with metamask. Metamask shows the failed transaction when immediately no response from chain. it happens when the transaction in pending mode

Now i am implementing same thing in another app but having issues and this time i have no clue. In package.json i just install the postscript and build fails with the error

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\blockchain\ReactNative\socialtokenapp\node_modules\react-native-os\android\build.gradle' line: 47

* What went wrong:
A problem occurred evaluating project ':react-native-os'.
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\blockchain\ReactNative\socialtokenapp\node_modules\react-native-os\android\build.gradle' line: 47

* What went wrong:
A problem occurred evaluating project ':react-native-os'.
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s

    at makeError (E:\blockchain\ReactNative\socialtokenapp\node_modules\execa\index.js:174:9)
    at E:\blockchain\ReactNative\socialtokenapp\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (E:\blockchain\ReactNative\socialtokenapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (E:\blockchain\ReactNative\socialtokenapp\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:192:9)