firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Disabling warnings message in the console of emulators.

Open a-b-kudinov opened this issue 3 years ago • 1 comments

Issue: Too many warning messages in the function emulator console that occur when requesting external network resources. In projects where external requests are constantly used, this greatly complicates the debugging process.

External network resource requested!
URL: "https://api.***"
Be careful, this may be a production service.

It would be very convenient if there was some parameter when starting emulators that would disable the output of certain types of notifications. Or maybe there is already some other way to do this?

a-b-kudinov avatar Jun 20 '22 13:06 a-b-kudinov

Same issue here. Part of my test environment is, itself, a remote system, making this warning completely pointless log spam.

icopp avatar Jul 09 '22 07:07 icopp

Just in case. For now, you can turn off unnecessary notifications by the "surgical" method.

Find the file: find / -name emulatorLogger.js

Comment out the lines: // case "unidentified-network-access": // this.log("WARN", `External network resource requested!\n - URL: "${systemLog.data.href}"\n - Be careful, this may be a production service.`); // break;

a-b-kudinov avatar Nov 30 '22 11:11 a-b-kudinov