missing uvw - how to get rid of this ?

Is there some way to check which objects have missing uvw and then fix it.
There is tons of "missing uvw" topics but lead nowhere. After I checked all scripts which supposed to detect and fix "missing uvw" I found not even one works.

Often is caused by map channel and uvw or uv channel are different so maybe is good approach to check map id on object and set this same id on uv channel(in case there is many map channels in materials object just match theirs map id to object uvw modyfier id)like:

for o in geometry do (
take all materials id from o, if all are set in this same value use this value in uvw id modyfier or unvarp uvw id.
If there is many id map channels match them to uvw modyfier.

But still I don't know what in case when object modyfier stack was collapsed or we have multimaterial. Can somebody help with this, this missing uvw popups are really annoying and there is no way to get rid of them.