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.

NPE when a devfile command references theia

See original GitHub issue

Hello! I had two components in my devFile and a lot of commands. I used minikube and chectl to start workspace from the devfile. My workspace was stuck every time and I couldn’t understand what’s the problem with my devfile. workspace_fail

The problem was solved when I replaced the value of the component field theia-editor by che-dev for one of the commands.

So, my question is: can I define theia-editor as component for commands? If no, can we display some warning message for user for this case? For example, I get error: start_workspace_error when I just miss some letter for component field. So, maybe we can do something similar for described case.

Maybe something wrong with my devfile, please take a look (I simplified the devfile as possible and left only two commands and two components - for example):

apiVersion: 1.0.0
metadata:
 name: che
projects:
  - name: che-theia
    source:
      type: git
      location: 'https://github.com/eclipse/che-theia.git'
components:
  - 
    alias: che-dev
    type: dockerimage
    image: eclipse/che-theia-dev:next
    mountSources: true
    endpoints:
      - name: "theia-dev"
        port: 3130
        attributes:
          protocol: tcp
          public: 'true'
    memoryLimit: 4Gi
  - 
    alias: theia-editor
    reference: >-
      https://raw.githubusercontent.com/eclipse/che-plugin-registry/master/v3/plugins/eclipse/che-theia/next/meta.yaml
    type: cheEditor

commands:
- name: theia:build
  actions:
  - type: exec
    component: che-dev
    command: >
              yarn
    workdir: /projects/theia

- name: theia:run:watch
  actions:
  - type: exec
    component: theia-editor
    command: >
              yarn watch
    workdir: /projects/theia

Thanks in advance!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
sleshchenkocommented, Jul 15, 2019

@RomanNikitenko

So, my question is: can I define theia-editor as component for commands?

It should work and I see no reason why we should deny it.

I debugged a workspace start with your Devfile and the reason of failing is NPE Screenshot_20190715_144120

The actual cause is hidden here https://github.com/eclipse/che/blob/f601f1652795048641001387c1ef13192f38a224/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/wsplugins/model/ExtendedPluginFQN.java#L38

It’s related to https://github.com/eclipse/che/pull/13297

0reactions
sparkoocommented, Jul 26, 2019

I’m working on this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to Devfile - GitHub Pages
A list of commands: actions to manage the workspace components like running the dev tools, starting the runtime environments etc… Example of the...
Read more >
CHANGELOG.md ... - GitLab
Create method for waiting Theia IDE into iframe for cypress tests #12912 (Ohrimenko1988); Add new codeowners to properties files #12907 (garagatyi); Update ...
Read more >
Chapter 2. Che-Theia IDE basics - Red Hat Customer Portal
The Che-Theia IDE allows users to define custom commands in a devfile that are then available when working in a workspace. This is...
Read more >
Planet Eclipse
Any reference to a Qute template file from a Java file show the option to generate ... It has been an amazing year...
Read more >
keycloak provider cannot create filesystem aerogear metrics spi
ExecutionExceptionHandler] (main) For more details run the same command passing the ... NullPointerException at org.wildfly.extension.microprofile.metrics.
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