Errored: TypeError: Cannot convert undefined or null to object

Earlier HelloWorld contract worked fine but now it’s not getting deployed.


can someone please help me with this?

1 Like

@sgphule i copy your code in Remix and was able to execute the contract without problems.

pragma solidity 0.5.12;

contract HelloWorld{
    
    string public message = "hello Changed World";
    
    function getMessage () public view returns(string memory){
        return message;
    }
    
}
1 Like

Yes now I restarted browser and the Remix IDE. It works fine now don’t know what was the problem. But thanks for your reply :slight_smile:

2 Likes

@sgphule
Good! Make your to refresh your browser and even use some other browser, if need be
Keep on working.

You can reach out for queries anytime :slight_smile:

1 Like