Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-93635

Confluence is throwing error about CSSParser in the logs while sharing a page

      Issue Summary

      After upgrading Confluence 8.5.X to 8.6.X, Confluence is throwing errors about "CSSParser" while a page is being shared automatically or manually.

      Despite the error message, the notification will still manage to reach the recipient. However, since the error is thrown every time "NotificationSender" picks up a page, Confluence logs will get filled up with similar error messages quickly and create unnecessary noise.

      This issue is not replicable on version 8.5.X

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Set up Confluence 8.6.x
      2. Set up an SMTP mail server
      3. Share any page in Confluence to a user or email address
        • The page can even be a blank page, or simply a page with 1 line of text.

      Expected Results

      Confluence will not return any error about the page share action, considering all the required fields are filled correctly.

      Actual Results

      Confluence returns errors about "CSSParser" about the page share action.

      The below exception is thrown in the atlassian-confluence.log file:

      2023-12-13 06:17:42,078 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSParser] noprop PARSING noprop ERROR | should be empty
       -- url: /rest/api/content/1703937 | userName: admin | referer: https://instenv-213827-pyco.instenv.internal.atlassian.com/pages/resumedraft.action?draftId=1703937&draftShareId=ee6ef3ab-cae0-41b9-a881-dfd38b9e0ecb& | traceId: ccf4291cfb3d4e9b
      2023-12-13 06:17:42,078 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSParser] declaration PARSING declaration ERROR | consume until SEMICOLON, RCURLY
       -- url: /rest/api/content/1703937 | userName: admin | referer: https://instenv-213827-pyco.instenv.internal.atlassian.com/pages/resumedraft.action?draftId=1703937&draftShareId=ee6ef3ab-cae0-41b9-a881-dfd38b9e0ecb& | traceId: ccf4291cfb3d4e9b
      

      Workaround

      To suppress the error messages:
      Via "Logging and Profiling"

      1. Go to "Logging and Profiling" in the admin menu
      2. Add "cz.vutbr.web" to the list via the text box under "Add New Entry"
      3. Set logging level to "FATAL"
      4. Click on "Add Entry"
      5. Click "Save" (bottom of the "Logging and Profiling" page)
      6. Refer Configuring Logging documentation for more details regarding logging configuration in Confluence

      Via "log4j.properties" file

      1. Open up the /confluence/WEB-INF/classes/log4j.properties file
      2. Add the following line to the file:
        log4j.logger.cz.vutbr.web=FATAL 
        
      1. Save the file
      2. Apply the same changes to the rest of the nodes
      3. Perform a rolling Confluence restart

          Form Name

            [CONFSERVER-93635] Confluence is throwing error about CSSParser in the logs while sharing a page

            Quan Pham added a comment -

            A fix for this issue is available in Confluence Server and Data Center 9.2.0. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment - A fix for this issue is available in Confluence Server and Data Center 9.2.0. Upgrade now or check out the Release Notes to see what other issues are resolved.

            This is still present in Confluence 9.0.3

            Francisco Villar Romasanta added a comment - This is still present in Confluence 9.0.3

            Similar error messages appear in the Confluence log when we send notification emails in our application through the notification component built into Confluence:

            [web.csskit.antlr4.CSSErrorListener] syntaxError CSSErrorListener syntaxError | extraneous input '$' expecting {INVALID_STRING, INVALID_STATEMENT, IDENT, ATKEYWORD, CLASSKEYWORD, STRING, UNCLOSED_STRING, HASH, NUMBER, PERCENTAGE, DIMENSION, URI, UNCLOSED_URI, UNIRANGE, ';', ':', ',', '?', '%', '=', '/', '>', '<', '{', '}', '(', '[', '!', '-', '+', '*', S, 'expression(', FUNCTION, '~=', '|='}
            

            We noticed that the problem is in templates/email/html/includes/constants.vm file, since it contains some syntax errors and a missing css variable (used by other vm files).

            We had to replace this line:

            #set ($menuSeparatorColour = "var(--ds-border, #bbb")

             to

            #set ($menuSeparatorColour = "var(--ds-border, #bbb)")

            and 

            #set ($auiWarningBorderColour = "var(--ds-border-warning, #f7df92"))

            to

            #set ($auiWarningBorderColour = "var(--ds-border-warning, #f7df92)")

            and add missing varible

            #set ($menuTxtColour = "var(--ds-text, #000000)")

             

            In our case, this helped and maybe also provides a guideline in uncovering the original problem.

            Gergely Juhász [Midori] added a comment - - edited Similar error messages appear in the Confluence log when we send notification emails in our application through the notification component built into Confluence: [web.csskit.antlr4.CSSErrorListener] syntaxError CSSErrorListener syntaxError | extraneous input '$' expecting {INVALID_STRING, INVALID_STATEMENT, IDENT, ATKEYWORD, CLASSKEYWORD, STRING, UNCLOSED_STRING, HASH, NUMBER, PERCENTAGE, DIMENSION, URI, UNCLOSED_URI, UNIRANGE, ';' , ':' , ',' , '?' , '%' , '=' , '/' , '>' , '<' , '{' , '}' , '(' , '[' , '!' , '-' , '+' , '*' , S, 'expression(' , FUNCTION, '~=' , '|=' } We noticed that the problem is in templates/email/html/includes/constants.vm file, since it contains some syntax errors and a missing css variable (used by other vm files). We had to replace this line: #set ($menuSeparatorColour = " var (--ds-border, #bbb" )  to #set ($menuSeparatorColour = " var (--ds-border, #bbb)" ) and  #set ($auiWarningBorderColour = " var (--ds-border-warning, #f7df92" )) to #set ($auiWarningBorderColour = " var (--ds-border-warning, #f7df92)" ) and add missing varible #set ($menuTxtColour = " var (--ds-text, #000000)" )   In our case, this helped and maybe also provides a guideline in uncovering the original problem.

            We have the same issue in Confluence DC 8.9.2

            serge calderara added a comment - We have the same issue in Confluence DC 8.9.2

            Shpio added a comment -

            it is also on 8.7.2.

            Shpio added a comment - it is also on 8.7.2.

            Our log is also full of these errors:

            2024-01-08 11:57:07,938 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAttemptingFullContext CSSErrorListener full context | 2024-01-08 11:57:07,939 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAmbiguity CSSErrorListener ambiguity | 2024-01-08 11:57:07,940 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAttemptingFullContext CSSErrorListener full context | 2024-01-08 11:57:07,941 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAmbiguity CSSErrorListener ambiguity | 2024-01-08 11:57:07,987 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSParser] noprop PARSING noprop ERROR | should be empty2024-01-08 11:57:07,988 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSParser] declaration PARSING declaration ERROR | consume until SEMICOLON, RCURLY 

            We are on Confluence 8.6.2

            Julian Bauer added a comment - Our log is also full of these errors: 2024-01-08 11:57:07,938 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAttemptingFullContext CSSErrorListener full context | 2024-01-08 11:57:07,939 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAmbiguity CSSErrorListener ambiguity | 2024-01-08 11:57:07,940 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAttemptingFullContext CSSErrorListener full context | 2024-01-08 11:57:07,941 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSErrorListener] reportAmbiguity CSSErrorListener ambiguity | 2024-01-08 11:57:07,987 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSParser] noprop PARSING noprop ERROR | should be empty2024-01-08 11:57:07,988 ERROR [NotificationSender:thread-1] [web.csskit.antlr4.CSSParser] declaration PARSING declaration ERROR | consume until SEMICOLON, RCURLY We are on Confluence 8.6.2

            Presumably we could hide the offending logging by setting the package 'web.csskit.antlr4' to OFF or FATAL?

            Simon Tost [TNG] added a comment - Presumably we could hide the offending logging by setting the package 'web.csskit.antlr4' to OFF or FATAL?

              a9c75a56733b Manonmani Muthukrishnan
              jwaihou Jonathan Soo
              Affected customers:
              17 This affects my team
              Watchers:
              22 Start watching this issue

                Created:
                Updated:
                Resolved: