I have a Flutter Web project, up to version 12.4.0 by enabling web frameworks experiments I was able to deploy to Firebase hosting correctly.
By upgrading to 12.4.2 instead, the deploy or the firebase init with the same configuration gives me:
firebase deploy --only hosting
Could not determine the web framework in use.
Error: Unable to detect the web framework in use, check firebase-debug.log for more info.
I also tried with version 12.4.1 and it gives the same problem. By downgrading to 12.4.0 everything goes back to working properly.