How to make an external call to a clone?

Im trying to deploy a contract that uses AccessControlUpgradeable.sol as base. I have defined an interface for this new contract so that I can make cheap external calls from external contracts into an instance of this newly designed People.sol. Here are both contracts:

:1234: Code to reproduce

//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;

import "./PeopleLibrary.sol";

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol";
import "./IPeople.sol";

contract People 
is 
Initializable, 
AccessControlUpgradeable, ERC165StorageUpgradeable, IPeople

{
    function people_init() public initializer {
        __AccessControl_init();
      _grantRole(AccessControlUpgradeable.DEFAULT_ADMIN_ROLE, tx.origin);
    }

  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(
      ERC165StorageUpgradeable,
      AccessControlUpgradeable
    )
    returns (bool)
  {
    return super.supportsInterface(interfaceId);
  }
}

And its interface:

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;

interface IPeople {

  function People_init() external;
}

Now this is the contract making the external call:

import "@openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol";
import "./IPeople.sol";

contract MyInsideCaller {
...
function initialize(address PeopleContract ) public payable initializer {
    try IPeople(PeopleContract).People_init()  {
        } catch Error(string memory reason) {
        revert(reason); 
        }
...

But the contract that actually triggers the call initially is this one:

contract TheTrigger {
  address PeopleTemplate;
  function initialize(address _template) {
    PeopleTemplate = _template;
}


...
function createManyStuff()
    public
    payable
  {
    ...
    address peopleContract = ClonesUpgradeable.clone(PeopleTemplate); 

    ERC1967Proxy myInsideCallerProxy = new ERC1967Proxy(
      MyInsideCallerTemplate,
      abi.encodeWithSelector(
        MyInsideCaller(address(0)).initialize.selector,
        ...args,
        peopleContract
      )
    );

So basically a main contract has a function which creates and initializes a proxy, this step creates a clone of a People contract and initializes it internally, but for some reason the external call fails. Any ideas?

:computer: Environment

The funny thing is that this works well on Remix but not on my local environment and I have literally the same code :frowning: but on remix I go through the initializers manually while on local I have a script that does it all in one way.

Are you sure the code is the same on Remix and your local dev env?

I can spot an error right away in the code you posted. IPeople declares People_init and in MyInsideCaller you are calling staff_init

It was a typo on the code shared. Yes, its exactly the same code

is your script waiting for all transactions it sends (to be mined) ? can you post it? which errors are you getting ?

Thank you for the reply @helio.rosa ! I realized the mistake was inside my script. The code up is good. Thank you for the heads up!