Help: failed to execute 'drawimage' on 'canvasredenderingcontext2d': the HTMLimageelement provided is in the 'broken' state

Hello guys, I need help!

An year ago I started to create a new game on RPG MAKER MV, then, 6 months later, I bought RPG MAKER MZ and just copy and paste my files from MV to a new project on MZ. And it worked perfectly.

I noticed that some features on MZ was not there, it was showing like in MV style on the database for example.

Everything fine so far...

Then, 6 months later creating on MZ (today), I decided to deploy the game and send to my friends to test it.
But when I deploy it for windows,
I came across this error when running the game:
issue1.png


Some very important information that I could test already:

- If I deploy the game without encrypt it, the game works PERFECTLY xDDD (very strange)

- I already tried to copy and paste the files encrypted on a not encrypted project to see what happens and the error came out.

- If I copy and paste the ''img'' file from my project folder, to the encrypted project, another error comes out:
issue2.jpg

But, if I put the encrypt file IconSet.png, or/and the PNG IconSet.png, the same error occurs XDD (crazy)

issue3.jpg


- Only changing the ''img'' folder changed this ''failed to execute 'drawimage'...'' error. I tried change the other folders as well to see what happens and nothing happened.

- I already deployed it with all the plugins turned off and nothing changed.

Remember that I cant open the f8 window because the error only occurs when the game is already deployed.

Well this is it. Its very strange that only happens when I deploy encrypted.
I would be very happy for help, I dont know what to do anymore.

My MZ version is 1.6.1.


Thank you very very much in advance!
In my experience this error typically occurs when a plugin attempts to load images without going through the default image loaders. Doing so is generally bad practice, since it bypasses the core script image decryption and caching methods.

Maybe share screenshot(s) of your Plugin Manager?
Hello! Thank you so much for answer!
Sure thing!

Here you go:
issue4.jpg

I already tried to deploy this way, and the same error happened:

issue5.jpg


if you have any ideas to solve the problem, even if it's unlikely to fix it, let me know all, I'm open to testing ALL of them haha

Thanks in advance! 😀
keep in mind that your plugins are MV, so supertools engine might
not work in MZ.

MV plugins are rendered differently, specially images.
so I think you need to add FOSSIL on top of it if you want to run it
correctly, but I doubt SRD will work though.

some are ported over, some have alternative, so I dont know
how exactly you can pinpoint the other issues.
Hello @ShadowDragon! Thank you so much for answer!

very interesting this FOSSIL plugin! But I tried to open their download page but it's showing that it doesn't exist ;/

This is where I found the link:

This is the link Im trying to reach:
Download


But Im affraid this is not a plugin issue you know... since the game works perfectly if I deploy it without encrypting it. Maybe is somenthing to do with the encrypting thing. Maybe the way files are decrypted in MV is different the way they are decrypted on MZ. As I brought the files from MV, it is happening something wrong I dont know XD
But I have no idea why, where to look, how it works...
A quick reminder: keep backup copies before making potentially-breaking changes to your project!

OK, so I re-read your post and noticed this:
An year ago I started to create a new game on RPG MAKER MV, then, 6 months later, I bought RPG MAKER MZ and just copy and paste my files from MV to a new project on MZ. And it worked perfectly.
Exactly which files did you copy? You should generally not have copied the following:
  • The game's index.html.
  • Anything in the js folder except plugins.js (Plugin Manager settings) and the plugins subfolder.
Suggestion:
  • If you're trying to deploy a project that doesn't use any in-game features from MZ (e.g. different tile size, Attack Skill trait, etc), then you should deploy it through MV.

  • Otherwise, make sure your game is running on the MZ core scripts, i.e. make sure the files I mentioned above are all there, or replace them from a new MZ project. Yes, this may break MV plugins that you are using. Then try deploying via MZ again.
I.e. match your game's core scripts to the editor you're using.
Hello!
A quick reminder: keep backup copies before making potentially-breaking changes to your project!
Good tip, Im very careful about this haha!

Exactly which files did you copy? You should generally not have copied the following:
  • The game's index.html.
  • Anything in the js folder except plugins.js (Plugin Manager settings) and the plugins subfolder.
I dont remember anymore actually :/ but if I were to guess I would say maybe I should have copied everything XD

If you're trying to deploy a project that doesn't use any in-game features from MZ (e.g. different tile size, Attack Skill trait, etc), then you should deploy it through MV.

Yaaaaay!!
In fact I don't use any MZ resources, I just downloaded it to use more common events hahaha

Sooo I did what you told and it WORKED!! When I deploy using MV it works perfectly even encrypted.
Thank you sooo much you saved me haha 😀

Im going to keep creating on MZ, then everytime I need to deploy I will use MV. Awesome.
Problem solved!
Great! Happy RPG Making~ 👋

Original thread: https://forums.rpgmakerweb.com/threads/help-failed-to-execute-drawimage-on-canvasredenderingcontext2d-the-htmlimageelement-provided-is-in-the-broken-state.155191/