-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileService dies during execution #13892
Comments
Hello, Theia team, I am following up on Barry's query. We are still having the same issue. We would appreciate any suggestions or pointers. Thank you |
What kind of crash are we talking about here? Does the error crash the whole tab/browser window? Aside from that, I'm not aware of any breaking changes in that area of Theia. Do you have reproduction steps for the issue? |
@msujew I have an iframe for my JSE extension that I invoke from one of my parent pages outside of Theia. When the following line is executed: The iframe disappears, and throws me back to the parent page. Nothing in my code has been changed in this area since I upgraded Theia. I did however upgrade to nodejs version 20 from 18. |
@msujew I have traced the problem to file-service.ts: FileService.doReadAsFileStream (line 955). Any idea what this means? |
@BarryDrez I see, thanks. Looking into the code, we do something weird that might cause this error: Even though it shouldn't happen, there might be cases where a promise rejects before its Nevertheless, vscode does something different there see this code which is a bit safer. A fix for this issue might attempt to do the same. |
@msujew Thank you! I tried removing @theia/task from my package.json since I don't need tasks, but that didn't help. In the call stack, I can see that the problem stems from theia\packages\preferences\src\browser\abstract-resource-preference-provider.ts: AbstractResourcePreferenceProvider.readPreferencesFromFile Line 154. const content = await this.fileService.read(this.toFileManager().getConfigUri()) |
@msujew Are there any updates on this? Should I apply the fix that you suggest, or is someone else working on it? |
@BarryDrez I don't think anyone else is working on this right now. Feel free to contribute a fix for this :) |
@msujew OK, thanks :) We will look into becoming contributors. |
Hi @msujew, we are still investigating this. It turns out that readFileUnbuffered is not being called in our scenario. The failure is happening in the Theia class: In the stat function (line 216). When this.server.stat(resource.toString()); is called, the application just fails with no exception. Is there anything we need to be aware of with RemoteFileSystemServer as far as upgrading from Theia 1.40 to 1.51 is concerned? |
@msujew - It turned out that the root of the problem was caused when upgrading from 1.40 - 1.52. We have some views that extend AbstractViewContribution. They were importing Widget from '@phosphor/widgets', and they have the withWidget functions. This is what was causing the error, but I do not understand why the problem manifested itself in remote-file-system-provider.ts. We have changed the views to import Widget from '@theia/core/lib/browser'. This resolved the issue. You may want to mention this in the relevant Breaking Changes. |
@BarryDrez I'm confused on how a change in the frontend has the ability to literally crash the backend - this generally shouldn't be possible. However, it's good to hear that the issue has been resolved :) |
I have a Theia extension that has been working perfectly fine with Theia 1.40.0. I recently upgraded to Theia 1.50.1, and the FileService.exists (@theia/filesystem/lib/browser/file-service) is causing my extension to crash without throwing any kind of exception. I went through all of the breaking changes since 1.40.0 and fixed a couple that were required.
Any ideas what this could be? Could there be a dependency I am missing or need to upgrade?
The text was updated successfully, but these errors were encountered: