New issue
Advanced search Search tips

Issue 792779 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Mojo enum message validation error should say what enum and value

Project Member Reported by lucmult@chromium.org, Dec 7 2017

Issue description

As part of crrev.com/c/784372 I got an invalid message error when trying to serialize/deserialize an enum (see below).

I only had 2 enums that could be at fault, so wasn't hard to figure out, however the error message should try to help by saying (if possible):
- What enum or message was invalid.
- What was the invalid value.

For the record, the error was due to a bitfield enum missing "Extensible]" on mojo module. 

Error message:
Note: Google Test filter = SitePerProcessBrowserTest.ActiveSandboxFlagsCorrectWhenCleared                                                   
[==========] Running 1 test from 1 test case.                                                                                               
[----------] Global test environment set-up.                                                                                                
[----------] 1 test from SitePerProcessBrowserTest, where TypeParam =                                                                       
[ RUN      ] SitePerProcessBrowserTest.ActiveSandboxFlagsCorrectWhenCleared                                                                 
                                                                                                                                            
DevTools listening on ws://127.0.0.1:34405/devtools/browser/b7e20ed9-8fd9-4479-890e-8a6f0a2c12f4                                            
[35911:35935:1207/132402.575010:ERROR:instance.cc(49)] Unable to locate service manifest for metrics                                        
[35911:35935:1207/132402.575132:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics                                      
[35939:35939:1207/132403.005453:WARNING:gpu_info.cc(103)] No active GPU found, returning primary GPU.                                       
[35911:35935:1207/132403.178776:ERROR:instance.cc(49)] Unable to locate service manifest for metrics                                        
[35911:35935:1207/132403.178881:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics                                      
[35911:35911:1207/132403.442489:ERROR:validation_errors.cc(87)] Invalid message: VALIDATION_ERROR_UNKNOWN_ENUM_VALUE                        
[35911:35911:1207/132403.442590:ERROR:render_process_host_impl.cc(4143)] Terminating render process for bad Mojo message: Received bad user 
message: Validation failed for FrameHost RequestValidator [VALIDATION_ERROR_UNKNOWN_ENUM_VALUE]                                             
[35911:35911:1207/132403.442636:ERROR:bad_message.cc(23)] Terminating renderer for bad IPC message, reason 123                              
[35911:35911:1207/132403.442822:ERROR:validation_errors.cc(87)] Invalid message: VALIDATION_ERROR_UNKNOWN_ENUM_VALUE                        
[35911:35911:1207/132403.442890:ERROR:render_process_host_impl.cc(4143)] Terminating render process for bad Mojo message: Received bad user 
message: Validation failed for FrameHost RequestValidator [VALIDATION_ERROR_UNKNOWN_ENUM_VALUE]                                             
[35911:35911:1207/132403.442935:ERROR:bad_message.cc(23)] Terminating renderer for bad IPC message, reason 123                              
[35911:35911:1207/132403.462030:FATAL:web_contents_observer_sanity_checker.cc(303)] Check failed: is_loading_.                              
#0 0x7facf052bdad base::debug::StackTrace::StackTrace()                                                                                     
#1 0x7facf052a1dc base::debug::StackTrace::StackTrace()                                                                                     
.....


Suggested error msg:
[35911:35911:1207/132403.442489:ERROR:validation_errors.cc(87)] Invalid message: VALIDATION_ERROR_UNKNOWN_ENUM_VALUE for EnumTypeNameHere value "XXX".
                       

 
Status: Available (was: Untriaged)
Not for production due to code size. But we could enable it in debug builds.

Sign in to add a comment