-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
React Vite custom build - CKEditorError: e10 is null #14824
Comments
Maybe related to #14084. But there's something odd happening here – the error code seems to be obfuscated. It's possible that the obfuscator that we use became too greedy. We had to fine-tune its options in the past, AFAIR. Maybe we broke something upon recent repository migration. cc @ckeditor/ckeditor-5-devops The other thing to investigate is – what is that error and why it's happening. |
It looks like the editor crashed after trying to restart itself.
Recent changes in the watchdog feature somehow impact here. |
What about the error message? |
My editor (IDE) found no obfuscated symbols from the stack trace. I installed all private packages listed in the Installed CKEditor plugins point in the latest version ( I think it requires deeper analysis from somebody who knows what |
I asked the CF team to look into this. |
A few things got me thinking (apart from the weird error leaking), and I wonder @AngusParsonson if these could be tested to unblock you:
|
Thanks for all the responses. @Witoso, by build step, do you mean explicitly running I can give the experimental plugin a go, but as I said, most of the editor functionality appears to be working from my end; it's just those particular plugins, so I thought there might be a deeper issue at play here. Are you guys able to reproduce the errors? Coincidentally it seems the features that break are all premium features, not sure if that is just a coincidence. My license key is valid (if I remove it, I get a license error). |
Do I understand correctly that when you do use those plugins, everything works correctly? I haven't seen this in your description on GH, so double-checking. One last thing, could you show the line with the |
Sorry if I wasn't clear. All of the regular plugins work e.g. I can highlight text, make it bold etc. But when I try to use comments, track changes, or upload docx I get the aforementioned error. These are my imports: import { useRef } from "react"; |
This:
Plus:
Should actually yield a duplicated modules error because both import paths contain the same modules (e.g. ckeditor5-utils) and we intentionally disallow this because it's evidence of an incorrect setup. If a build is used it's meant to be the only "entry point" to the CKEditor 5 realm. All things should be bundled into that build and accessed via it. So, I do wonder how it's possible that you don't see that error :O Maybe what you import from ckeditor5-custom-build isn't actually a bundle but it reexports the source of the build. Any chance you could publish your setup? You got me curious :D |
Hey @Reinmar, interesting. I think the docs for setting up a React/TypeScript/Vite project with an online build are out of date, I did have to do a few workarounds, perhaps I've messed it up somewhere. Here is a minimal reproduction: https://github.com/AngusParsonson/CKEditorDemo Notable changes are in App.tsx, index.css, and vite.config.ts I use that DecoupledEditor import so that I have access to the TypeScript editor type. |
Hey @AngusParsonson, I was able to reproduce the issue you mentioned. In your editor, I didn't find the integration with the The plugin is loaded, but it needs to be configured manually:
Otherwise, when creating a new suggestion (track changes) or adding a new comment, the editor does not know the change's author and emits an error. Please follow the Integrating comments with your application guide to read more about the comments integration. |
This error must come from the minified code. I had a readable stack trace when I skipped using Vite in the example app. |
@pomek Is it possible for me to see the unminified errors? I am also getting an error for the import word plugin Uncaught (in promise) TypeError: t3 is null I think it is something to do with my tokenUrl EDIT: I'm actually getting t3 is null elsewhere as well, would be really great if there was a way for me to actually see the error message. |
I can speak only for the CKEditor 5 project. You can rebuild the build produced by Online Builder. Please comment out the Terser plugin and run webpack in the development mode. To disable/remove: To add in the configuration:
Them, As for the React app, I am not an expert so I would search in the Vite docs or StackOverflow for related topics. Ultimately, you can skip using any framework for testing purposes and build a simple HTML page containing the editor only on your own. |
OK, so to conclude:
|
📝 Provide detailed reproduction steps (if any)
✔️ Expected result
Comment plugin, upload docx, track changes should work.
❌ Actual result
Error:
❓ Possible solution
If you have ideas, you can list them here. Otherwise, you can delete this section.
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: