Open Sebastian-ubs opened 2 days ago
Fatal: when the extension breaks platform you cannot disable the app through the marketplace, because it won't run
Another way to crash the whole app is requesting a webview that has undefined content. E.g. when they are defined through webview options, which are an optional parameter and undefined otherwise. See (Discord)
papi.webViews.getWebView("myExtension.webView");
The problem is not that such request can be done, but that platform does not catch and handle the error gracefully without crrashing itself.
[start:core] [1] 11:35:18 [start:core] [1] [extension host error] [start:core] [1] C:\code\paranext-core\src\shared\services\network.service.ts:210 [start:core] [1] if (!response.success) throw new Error(response.errorMessage); [start:core] [1] ^ [start:core] [1] [/extension host error] [start:core] [1] 11:35:18 [start:core] [1] [extension host error] [start:core] [1] Error: Input must be a string [start:core] [1] at requestUnsafe (C:\code\paranext-core\src\shared\services\network.service.ts:210:32) [start:core] [1] at processTicksAndRejections (node:internal/process/task_queues:95:5) [start:core] [1] [/extension host error] [start:core] [1] 11:35:18 Client 1 disconnected! Unregistering [...]
[start:core] [1] 11:35:18 [extension host] [nodemon] app crashed - waiting for file changes before starting...
(but I have not seen the app to recover from this state. When removing the bad code, the app won't come up again, so the whole app has to be shut down and started fresh)
Describe the bug When an extension works improperly it can break the whole app. ~Maybe here it is caused by a bad
d.ts
file provided, not sure.~ According to the error message the problem is registering the same command multiple times.Logs logs.txt
Expected behavior In case of errors in the extension, the app should continue to run and only trow out the extension's functionality.
Environment Dev, Windows