FlowUI view stopped display in Studio 1.5.0

FlowUI view stopped display in Studio 1.5.0

Here is the error message:

HTTP ERROR 500 javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
URI:	/flow_ui_designer-GNNRZpZ5ANIO
STATUS:	500
MESSAGE:	javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
SERVLET:	com.haulmont.jmixstudio.flowui.server.FlowVaadinServlet-239950a9
CAUSED BY:	javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
CAUSED BY:	com.vaadin.flow.server.ServiceException: elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
CAUSED BY:	elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
Caused by:
javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:371)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:230)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.vaadin.flow.server.ServiceException: elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
	at com.vaadin.flow.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1613)
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1576)
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:369)
	... 33 more
Caused by: elemental.json.JsonException: Cannot parse package file '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/.jmix/screen-designer/package.json'
	at io.jmix.flowui.devserver.frontend.NodeUpdater.getJsonFileContent(NodeUpdater.java:304)
	at io.jmix.flowui.devserver.frontend.NodeUpdater.getPackageJson(NodeUpdater.java:252)
	at io.jmix.flowui.devserver.frontend.TaskGeneratePackageJson.execute(TaskGeneratePackageJson.java:54)
	at io.jmix.flowui.devserver.frontend.NodeTasks.execute(NodeTasks.java:988)
	at io.jmix.flowui.devserver.startup.DevModeInitializer.runNodeTasks(DevModeInitializer.java:465)
	at io.jmix.flowui.devserver.startup.DevModeInitializer.lambda$initDevModeHandler$0(DevModeInitializer.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

Hi, Mortoza
It looks like some unexpected error in the dev-server code when reading(parsing) or searching the package.json file.
Does this problem always occur or with some specific actions? Does the problem go away when the designer restarts (the “Restart” button in View Designer)
Thank you for your feedback,
Mikhail

The studio was working fine but suddenly started that behaviour. This problem doesn’t go away when I click on the restart button in view designer and it is always showing like this.

image

You can just try to delete all the files from the folder .jmix/screen-designer/* and click “Restart”. All files will be generated by dev server.
Also, please note that at the moment the Studio cannot start the designer in a composite project in which only addon modules are added, as well as in a single addon project. (will be fixed in ServletException. Cannot parse package file. Preview does not work · Issue #1400 · jmix-framework/jmix · GitHub)

Hi Mikhail
I’ve done according to your instruction but it didn’t resolve the issue. See below the exception report after deleting that folder:

## TTP ERROR 500 javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.io.UncheckedIOException: java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/package.json'

|URI:|/flow_ui_designer-f5U73k4uvcn7|
| --- | --- |
|STATUS:|500|
|MESSAGE:|javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.io.UncheckedIOException: java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/package.json'|
|SERVLET:|com.haulmont.jmixstudio.flowui.server.FlowVaadinServlet-182cdca3|
|CAUSED BY:|javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.io.UncheckedIOException: java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/package.json'|
|CAUSED BY:|com.vaadin.flow.server.ServiceException: java.io.UncheckedIOException: java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/package.json'|
|CAUSED BY:|java.io.UncheckedIOException: java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/package.json'|
|CAUSED BY:|java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1.5/inteaccfa/inteaccfa/package.json'|

Is there a package.json file on the path specified in the error? And what is its content, if any?
Can you please attach your project (or example project with the same problem) to investigate the problem?
Perhaps this problem may be related to path processing to ‘package.json’ file and be dependent on the operating system.

Hi
Tha package.json file is empty

inteaccfa/inteaccfa/package.json
package.json

If I create a new project I believe that will work fine as this project was also working normally. I can’t send you the whole project (huge) but if you may please be specific, I can send you that.

BTW, I am working in MacOS

If this problem does not occur on a new project, then you can try to create a new project on the same version as used in the main project and copy the generated frontend files from the new project (from .jmix/screen-designer folder) to the main one.
Without testing on a problematic project, it’s hard for me to say what could be the reason, because I can’t reproduce it on my projects.