Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Missing or mis-indented '}'" #99

Open
mrRosset opened this issue Jun 20, 2023 · 0 comments
Open

Error "Missing or mis-indented '}'" #99

mrRosset opened this issue Jun 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mrRosset
Copy link

Environment

  • ACC Version: 1.24.0
  • AS3 Version: 3.40.0
  • BIG-IP Version: Not relevant

Summary

When trying to convert the bigip.conf or the archive.ucs, an error is produced.
The error complains about missing a "}" or a misaligned "}" when the irule is perfectly valid.
This does not seem to be related to #90 as its not linked to the cert-order-manager

Steps To Reproduce

Steps to reproduce the behavior:

  1. Convert following config:
ltm rule /Common/log_ws {
when WS_CLIENT_FRAME {
    switch -glob [WS::frame type] {
        "0" {log local0. "Type     : Continuatoin frame - 0" }
    }
}
when WS_SERVER_FRAME {
    switch -glob [WS::frame type] {
        "0" { log local0. "Type     : Continuatoin frame - 0" }
    }
}
}
  1. Observe the following error message:
Error: Error parsing input file. Please open an issue at https://github.com/f5devcentral/f5-automation-config-converter/issues and include the following error: 
Missing or mis-indented '}' for line: '    switch -glob [WS::frame type] {'
    at orchestrate (/app/src/engines/parser.js:65:31)                                                                                                                                                                                            
    at /app/src/engines/parser.js:275:65                                                                                                                                                                                                                     
    at Array.map (<anonymous>)                                                                                                                                                                                                                       
    at /app/src/engines/parser.js:275:52                                                                                                                                                                                                         
    at Array.forEach (<anonymous>)                                                                                                                                                                                                                
    at module.exports (/app/src/engines/parser.js:204:28)                                                                                                                                                                                        
    at mainRunner (/app/src/main.js:98:18)                                                                                                                                                                                                       
    at main (/app/src/main.js:187:30)         

Expected Behavior

The conversion continues.

Actual Behavior

An error is produced:

Error: Error parsing input file. Please open an issue at https://github.com/f5devcentral/f5-automation-config-converter/issues and include the following error: 
Missing or mis-indented '}' for line: '    switch -glob [WS::frame type] {'
    at orchestrate (/app/src/engines/parser.js:65:31)                                                                                                                                                                                            
    at /app/src/engines/parser.js:275:65                                                                                                                                                                                                                     
    at Array.map (<anonymous>)                                                                                                                                                                                                                       
    at /app/src/engines/parser.js:275:52                                                                                                                                                                                                         
    at Array.forEach (<anonymous>)                                                                                                                                                                                                                
    at module.exports (/app/src/engines/parser.js:204:28)                                                                                                                                                                                        
    at mainRunner (/app/src/main.js:98:18)                                                                                                                                                                                                       
    at main (/app/src/main.js:187:30)         
@mrRosset mrRosset added the bug Something isn't working label Jun 20, 2023
zdrouse added a commit to zdrouse/f5-automation-config-converter that referenced this issue Feb 7, 2024
sometimes nested objects in the config file are not indented and this causes the parser to break because the while loop doesn't exit and we reach the end of the object with no closing bracket detected.

the behavior can be observed in issue 99:
f5devcentral#99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant