[FlowUI] Studio doesn't show the screen, component hierarch and inspectors in design mode

Thanks for the report!
We are working on the stability of the designer, it will be improved in the next release.
Does this problem persist when you reopen the project?

Hi Konstantin
Even after reopening, reloading the project from the disk or invalidating the cache, it is never showing those options anymore in my project. That means I am now working almost like a free version of the Studio for the last 1 month! Thanks for the fix and for releasing the new version soonest possible.

Then most probably something in the view breaks the designer. Could you attach the full source code of the view descriptor and controller?

Hi Konstantin
Please find below the view descriptor and controller of one screen. In fact, it is applicable to all screens in my project whether already created or I create a new one.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<view xmlns="http://jmix.io/schema/flowui/view"
      title="msg://colorDetailView.title"
      focusComponent="form">
    <data>
        <instance id="colorDc"
                  class="com.myproject.md.entity.mm.Color">
            <fetchPlan extends="_base"/>
            <loader/>
        </instance>
    </data>
    <facets>
        <dataLoadCoordinator auto="true"/>
    </facets>
    <actions>
        <action id="saveAction" type="detail_saveClose"/>
        <action id="closeAction" type="detail_close"/>
    </actions>
    <layout>
        <formLayout id="form" dataContainer="colorDc">
            <textField id="nameField" property="name"/>
            <textField id="pantoneCodeField" property="pantoneCode"/>
        </formLayout>
        <hbox id="detailActions">
            <button id="saveAndCloseBtn" action="saveAction"/>
            <button id="closeBtn" action="closeAction"/>
        </hbox>
    </layout>
</view>
import com.myproject.md.entity.mm.Color;
import com.vaadin.flow.router.Route;
import io.jmix.flowui.view.*;

@Route(value = "colors/:id", layout = DefaultMainViewParent.class)
@ViewController("md_Color.detail")
@ViewDescriptor("color-detail-view.xml")
@EditedEntityContainer("colorDc")
public class ColorDetailView extends StandardDetailView<Color> {
}

Then it’s a different cause. Could you attach your build.gradle?

Hi Konstantin
Here is the build.gradle file contents.

plugins {
    id 'io.jmix' version '1.4.2'
    id 'java'
}

apply plugin: 'org.springframework.boot'
apply plugin: 'com.vaadin'

jmix {
    bomVersion = '1.4.2'
    projectId = 'main'
}

group = 'com.myapp'
version = '0.0.1-SNAPSHOT'

repositories {
    mavenCentral()
    maven {
        url 'https://nexus.jmix.io/repository/public'
    }
}

dependencies {
    implementation 'io.jmix.core:jmix-core-starter'
    implementation 'io.jmix.data:jmix-eclipselink-starter'
    implementation 'io.jmix.security:jmix-security-flowui-starter'
    implementation 'io.jmix.security:jmix-security-data-starter'
    implementation 'io.jmix.localfs:jmix-localfs-starter'
    implementation 'io.jmix.flowui:jmix-flowui-starter'
    implementation 'io.jmix.flowui:jmix-flowui-data-starter'
    implementation 'io.jmix.flowui:jmix-flowui-themes'
    implementation 'io.jmix.datatools:jmix-datatools-starter'
    implementation 'io.jmix.datatools:jmix-datatools-flowui-starter'

    kit 'io.jmix.flowui:jmix-flowui-kit'

    implementation 'org.springframework.boot:spring-boot-starter-web'


    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    implementation 'com.myapp:inteaccmd-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteaccact-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteacccrm-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteaccgms-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteaccops-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteaccred-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteaccca-starter:0.0.1-SNAPSHOT'
    implementation 'com.microsoft.sqlserver:mssql-jdbc'
    implementation 'com.myapp:inteaccap-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteaccar-starter:0.0.1-SNAPSHOT'
    implementation 'com.myapp:inteacchr-starter:0.0.1-SNAPSHOT'
}

test {
    useJUnitPlatform()
}

As you can see this is a Composite project of FlowUI that I built based on your guidance here which is working perfectly except this studio issue lately.

I append below one of the add-ons’ gradle file too.

buildscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath "io.jmix.gradle:jmix-gradle-plugin:1.4.2"
    }
}

group = 'com.myapp'
version = '0.0.1-SNAPSHOT'

subprojects {
    apply plugin: 'java-library'
    apply plugin: 'maven-publish'
    apply plugin: 'io.jmix'

    repositories {
        mavenCentral()
        maven {
            url 'https://nexus.jmix.io/repository/public'
        }
    }

    jmix {
        bomVersion = '1.4.2'
        projectId = 'ops'
    }

    group = this.group
    version = this.version

    def props = new Properties()
    buildFile.withInputStream { props.load(it) }
    def subArchivesBaseName = props.getProperty('archivesBaseName')
    def archName = subArchivesBaseName.substring(1, subArchivesBaseName.length() - 1)

    java {
        withSourcesJar()
    }

    artifacts {
        archives sourcesJar
    }

    publishing {
        repositories {
            maven {
                url = 'https://myrepo/releases/'
                credentials {
                    username rootProject.hasProperty('uploadUser') ? rootProject['uploadUser'] : 'admin'
                    password rootProject.hasProperty('uploadPassword') ? rootProject['uploadPassword'] : 'admin'
                }
                allowInsecureProtocol = true
            }
        }
        publications {
            javaMaven(MavenPublication) {
                artifactId = archName
                from components.java
            }
        }
    }

    // remove after https://youtrack.jetbrains.com/issue/IDEA-227215 is fixed
    tasks.withType(GenerateModuleMetadata) {
        enabled = false
    }
}

Ah, it’s a composite project…
The FlowUI designer doesn’t work in composite projects yet. Will be implemented in v.1.5, see https://youtrack.jmix.io/issue/JST-3353/Composite-projects-with-FlowUI-subprojects

Oh…
While version 1.5 is planned to be released in Feb (I guess end of Feb), is it a good idea migrating the project to 1.5999 version in the nightly repository?

The problem is in Studio. And its nightly build is now from 1.4 branch. Will be switched to 1.5 when approximately in the middle of Feb. Then it will be a good idea to use the framework 1.5-RC and nightly Studio 1.5.

1 Like

Hi,
I have the same problems with jmix 1.5.1

IntelliJ IDEA 2023.1 (Community Edition)
Build #IC-231.8109.175, built on March 28, 2023
Runtime version: 17.0.6+10-b829.5 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true

Non-Bundled Plugins:
com.intellij.properties.bundle.editor (231.8109.91)
io.jmix.studio (1.5.3-231)

Kotlin: 231-1.8.20-IJ8109.175

=======
the IDE runs with
openjdk version “11.0.14” 2022-01-18 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.14+9-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.14+9-LTS, mixed mode)

rgds
guillaume

hi,
I tried with a new fresh jmix project. ==> same behavior
image

In the left part, we can see that bellow “layout”, no component apprear.

source code attached
temp-jmix.zip (107.5 KB)

hope it can help

rgds
Guillaume

I also have similar problems in my composite project again.

Hi

Actually, you have Classic UI in your project, not Flow UI, which the topic relates.
It seems that there is some issue with JCEF browser embedded in the IDE, so screen designer doesn’t work.
Please attach idea.log file (Help > Show Log in Explorer).

Hi, Mortoza
Could you attach a demo project where the problem is reproduced and give more information about the Jmix version and the Jmix Studio version that you use?

Also, you can attach ViewDesigner logs (placed in {moduleDir}/.jmix/screen-designer/tmp/{actualLogFile} where ‘moduleDir’ is root directory of module when ViewDesigner starts).

And one more thing: the Jmix ViewDesigner version 1.5.x requires some frontend files, which should be located in the root directory of the module on which the ViewDesigner runs. For composite projects, it can be an addon module (there were no frontend files in the addon before version 1.5.1. Files were added in this ticket).

Hi, here are the intellij logs.

idea.zip (345.3 KB)

Thanks for the log provided.
But unfortunately I see nothing helpful here.

Please add -Dide.browser.jcef.log.level=verbose to the Custom VM options. This should create jcef_.log file in the system disc root (I have this path on MacOS, not sure for Windows) after JCEF browser first usage, e.g. in Jmix Screen designer.
Please add the following lines to the Custom Debug Log Configuration (Help → Diagnostic Tools → Debug Log Settings…)
#com.haulmont.jmixstudio
#com.intellij.ui.jcef
After this setup please restart IDE, open Jmix project, open Screen designer. Attach jcef_.log file (if any) and the whole IDEA log folder.

Also JCEF browser used by Markdown plugin that is bundled with IDE. Could you please try to open any .md file preview?

Hi @m.fedoseev
Thanks for your reply. Generally a new project is Ok, shows the screen designer, therefore, it will be hard to reproduce with a new project. This project was created before Jmix v1.5 and as you mentioned there were no frontend files in the addon… and that could be the reason.

I have checked the folder .jmix/screen-designer/tmp unfortunately this folder has no files. in some add-on in my composite project, there is not even having tmp folder under the screen-designer folder. Is this the reason why my screen designer is not working? Thanks for suggesting what will be the fix for this.

If I copy the tmp folder from another project where the screen-designer is working, will that work and for composite project do I need to copy it in all the add-on projects?

I think that copying frontend files to all addons (to root directory, not .jmix/screen-designer) in the project should solve the problem.

In fact, in a composite project, it is not necessary to have frontend files in all addons, but we cannot know exactly which module will be selected to run ViewDesigner, so it is better to put files in all addons.

Do you mean the whole “frontend” folder to all add-on? and is this has to be a new composite or any new projects frontend? I have themes though. Moreover, I don’t see any special files in frontend folder other than themes and generated files.

By frontend files I mean the following files (placed in root project folder if you created a new project):

  • package.json
  • tsconfig.json
  • pnpm-lock.yaml
  • types.d.ts
  • vite.generated.ts
  • vite.config.ts
  • .pnpmfile.cjs
  • .npmrc