I don't understand the coffee demo initialization sequence. #78
-
Based on what I see in run.sh, running the demo first executes 'yarn start' in the web/browser-app directory, and yarn's 'start' script invokes 'theia start' passing in a root-dir parameter of ../../backend/examples/SuperBrewer3000. What I don't understand, due to my complete lack of knowledge of Theia internals at this point, is what happens next (I can't find anything online explaining 'theia start'). What steps does Theia perform as a result of this command to get the demo going, and where does it get the information it needs to actually launch the demo application? To extend this question a little, the reference to 'theia' in yarn's start script is referring to exactly what executable? Would it be perhaps web/node_modules/@theia/cli/lib/theia.js? I do have a specific problem during initialization. An exception is thrown (three similar ones actually, just pasting one of them) -- 'org.eclipse.glsp.server.protocol.GLSPServerException: Could not process action message 'ActionMessage [action=requestModel, clientId=workflow-diagram-notation:file:///undefined/superbrewer3000.coffeenotation]'. The server has not been initalized yet'. I believe the 'undefined' is the resolution of the expression ${this.workspaceService.workspace?.uri}. Yes, I have made some experimental modifications to the demo, so I am certain I have caused this problem. But due to my inexperience with the EMF.cloud environment I don't have a clue how to approach finding out where I screwed up. Can anyone give me some pointers? BTW, is there a way I can get debug-level logging out of the application including the internals of Theia and GLSP? That might give me some clues. Any and all help will be greatly appreciated! original thread by GaryKopp |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
HI @GaryKopp(garykopp) , |
Beta Was this translation helpful? Give feedback.
-
[GaryKopp] Thanks Eugen. I have resolved that problem. I had a stupid typo in the theia start script line setting the root-dir option. I swear I looked at that line many times suspecting it was the culprit, but kept missing the obvious error. But expect a query on the next problem I encountered... |
Beta Was this translation helpful? Give feedback.
HI @GaryKopp(garykopp) ,
so the initialization happens just as you describe it, yarn start executes the command defined in package.json -> scripts -> start which is
theia start ...
theia is the theia.js that you found.
The error you see can only happen if you changed something on how the workspace is set. Without knowing what you changed it is hard to give you more precise pointers. But I would start by checking changes which modify how the path of the file to use is calculated. As you have the same error multiple times, I would check also calls to the workspace provider.