Search code examples
ethereumsolidityremix

Getting error "creation of HelloWorld errored: TypeError: Cannot convert undefined or null to object"


Pretty new to Solidity and just tried the first HelloWorld smart contract in Remix IDE and stumbled upon this error, while trying to deploy the smart contract.

creation of HelloWorld pending...
creation of HelloWorld errored: TypeError: Cannot convert undefined or null to object

My code:

pragma solidity ^0.5.16;

contract HelloWorld {
    string public greet = "Hello World!";
}

The Compiler version is set to 0.5.16+commit.9c3226ce

Not sure what I am missing, hence any all help and guidance is highly appreciated.


Solution

  • I think the problem is with your browser. Reload remix and paste the code back in. No issue with the code itself.