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

Failed to unmarshal rdjson on version 1.20.0 #112

Closed
taltcher opened this issue Feb 4, 2024 · 10 comments · Fixed by #114 or #115
Closed

Failed to unmarshal rdjson on version 1.20.0 #112

taltcher opened this issue Feb 4, 2024 · 10 comments · Fixed by #114 or #115

Comments

@taltcher
Copy link
Contributor

taltcher commented Feb 4, 2024

After upgrading to version 1.20.0 we have started to receive:

reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 2:1): unexpected token
@haya14busa
Copy link
Member

Can you work on it? @bert-mccutchen

@bert-mccutchen
Copy link
Contributor

bert-mccutchen commented Feb 4, 2024

Yep , @taltcher do you have a full stack trace?

Ok so the error seems to stem from Stylelint failing to run. @taltcher is there any error printed to your logs from Stylelint prior to Reviewdog attempting to run, that would be helpful for debugging.

@taltcher
Copy link
Contributor Author

taltcher commented Feb 4, 2024

Hi @bert-mccutchen -
This is the full error that I'm seen:

  TypeError: Cannot read properties of undefined (reading 'CssSyntaxError')
      at /home/runner/work/_actions/reviewdog/action-stylelint/v1/stylelint-formatter-rdjson/index.js:36:40
      at Array.forEach (<anonymous>)
      at /home/runner/work/_actions/reviewdog/action-stylelint/v1/stylelint-formatter-rdjson/index.js:17:21
      at Array.forEach (<anonymous>)
      at module.exports (/home/runner/work/_actions/reviewdog/action-stylelint/v1/stylelint-formatter-rdjson/index.js:14:35)
      at prepareReturnValue (/home/runner/work/frontend/frontend/node_modules/stylelint/lib/prepareReturnValue.js:51:23)
      at standalone (/home/runner/work/frontend/frontend/node_modules/stylelint/lib/standalone.js:281:17)
  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 2:1): unexpected token 
Error: Process completed with exit code 1.

Which logs do you want me to find?

@bert-mccutchen
Copy link
Contributor

Ahh, that's actually perfect, thank you.

@th0th
Copy link

th0th commented Feb 5, 2024

Hey, I am not sure if it is the same problem, but I didn't want to create a new issue in case it is.

I am getting this in the Github action log (with debug enabled):

##[debug]Evaluating condition for step: 'Run stylelint'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run stylelint
##[debug]Loading inputs
##[debug]Evaluating: secrets.GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GITHUB_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run reviewdog/action-stylelint@v1.[2](https://github.com/th0th/repo/actions/runs/x/job/x#step:10:2)0.1
##[debug]Evaluating: inputs.github_token
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'github_token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: inputs.level
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'level'
##[debug]=> 'error'
##[debug]Result: 'error'
##[debug]Evaluating: inputs.fail_on_error
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'fail_on_error'
##[debug]=> 'true'
##[debug]Result: 'true'
##[debug]Evaluating: inputs.filter_mode
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'filter_mode'
##[debug]=> 'nofilter'
##[debug]Result: 'nofilter'
##[debug]Evaluating: inputs.name
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'name'
##[debug]=> 'stylelint'
##[debug]Result: 'stylelint'
##[debug]Evaluating: inputs.packages
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'packages'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.reporter
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'reporter'
##[debug]=> 'github-pr-review'
##[debug]Result: 'github-pr-review'
##[debug]Evaluating: inputs.stylelint_input
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'stylelint_input'
##[debug]=> '**/*.scss'
##[debug]Result: '**/*.scss'
##[debug]Evaluating: inputs.stylelint_config
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'stylelint_config'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.stylelint_ignore
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'stylelint_ignore'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.workdir
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'workdir'
##[debug]=> 'frontend'
##[debug]Result: 'frontend'
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Loading env
Run $GITHUB_ACTION_PATH/script.sh
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/work/_temp/4f52ba87-8411-4590-aa4e-6a8bb5a[3](https://github.com/th0th/repo/actions/runs/repo/job/x#step:10:3)e7b9.sh
::group:: Installing reviewdog 🐶 ... https://github.com/reviewdog/reviewdog
 Installing reviewdog 🐶 ... https://github.com/reviewdog/reviewdog
1[6](https://github.com/th0th/repo/actions/runs/x/job/x#step:10:6).2.1
stylelint version: [16](https://github.com/th0th/repo/actions/runs/x/job/x#step:10:16).2.1
::group:: Running stylelint with reviewdog 🐶 ...
 Running stylelint with reviewdog 🐶 ...
  {"source":{"name":"stylelint","url":"https://stylelint.io/"},"diagnostics":[]}reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 2:1): unexpected token 
  ::endgroup::
Error: Process completed with exit code 1.
##[debug]Finished: run
##[debug]Finishing: Run stylelint

@bert-mccutchen
Copy link
Contributor

@th0th is that pre-1.20.1 release or post-1.20.1 release?

@th0th
Copy link

th0th commented Feb 5, 2024

I get this with uses: reviewdog/[email protected].

@bert-mccutchen
Copy link
Contributor

bert-mccutchen commented Feb 5, 2024

@th0th you don't by any chance happen to be using Stylelint 16, eh?

Ignore me, I see the stylelint version: [16] hidden in that wall of text.

@bert-mccutchen bert-mccutchen linked a pull request Feb 5, 2024 that will close this issue
@taltcher
Copy link
Contributor Author

taltcher commented Feb 5, 2024

Hi @haya14busa @bert-mccutchen - seems like there is still an issue... Tried to run the action with the updated version - and receive the next error:

  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:4259): invalid escape code "\\." in string

I don't see know any stackstrace... Just this error

@taltcher taltcher reopened this Feb 5, 2024
@gjoremilevsk1
Copy link

Hi all, any progress or time estimate for a fix here? We're facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants