My Remix has started to throw out this error as of recently, I'm not really sure what it is as the code didn't trigger it previously only as of recently, and all other code is triggering it as well.

Failed to decode output: TypeError: Cannot read property 'length' of undefined
  • Seems like you should share the relevant code which causes this error. Commented May 22, 2018 at 0:06

1 Answer 1


This is an issue with Remix.
The error that you're seeing is basically caused by a failed contract creation (most likely due to the gas being too low, so try increasing this first and foremost.) However, remix still seems to return the contract functionality as if the contract was successfully deployed, so basically you're dealing with a 'phantom' contract, it's not really deployed so the functionality doesn't work.

  • 2
    increasing the gas fixed the problem, cheers
    – NowsyMe
    Commented May 22, 2018 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.