question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected yaml structure in UD devfile editor can cause internal server error

See original GitHub issue

Describe the bug

When editing a workspace’s devfile in the UD, certain errors in the yaml cause internal server error notifications and a stacktrace to be logged to console, e.g.:

2019-07-25 21:52:43,678[nio-8080-exec-1]  [ERROR] [c.a.c.r.RuntimeExceptionMapper 47]   - Internal Server Error occurred, error time: 2019-07-25 21:52:43
  | com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2136 path $.devfile.attributes[0]
  | at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
  | at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
  | at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
  | at com.google.gson.Gson.fromJson(Gson.java:927)

This occurs when entering an object in place of an array or vice-versa

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

Open workspace configuration to the devfile editor tab. Append the yaml

attributes:
  - persistVolumes: 'false'

(an array instead of an object), and the error appears.

Expected behavior

This type of error should at least not print a stacktrace.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sleshchenkocommented, Jan 27, 2020

it can be handled on Dashboard side within https://github.com/eclipse/che/issues/15654

1reaction
sleshchenkocommented, Jul 26, 2019

I think it duplicates the following issue https://github.com/eclipse/che/issues/3334

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Errors in YAML (.YML) Config Files - Knowledgebase
We have a video tutorial on fixing YAML (.yml) configuration errors: ... your server settings, plugins or mods you will typically be editing...
Read more >
Chapter 4. Configuring CodeReady Workspaces
The activity table can contain invalid or stale data if some unforeseen errors happen, as a server failure at a peculiar point in...
Read more >
Internal Server Error when deploying simple Flask app onto ...
Your code is producing a list and trying to return a list as you're doing in flask will lead to the error -....
Read more >
dvc.yaml Files | Data Version Control
The list of stages is typically the most important part of a dvc.yaml file, though the file can also be used to configure...
Read more >
Basic Structure - Swagger
You can write OpenAPI definitions in YAML or JSON. ... Internal staging server for testing ... default: description: Unexpected error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found