Automattic / Automattic/isolated-block-editor

Uncaught Error: Cannot unlock an object that was not locked before - with ASP.Net MVC

Open
#252 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
409
Forks
66
PR merge metrics
No merged PRs in 30d

Description

I am integrating Isolated Block Editor to my Asp.Net MVC application through React JS. I am getting the error:

**_Uncaught Error: Cannot unlock an object that was not locked before at unlock (implementation.js:141:1)_**

Dependencies information:

"dependencies": {
"babel-preset-env": "^1.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@automattic/isolated-block-editor": "^2.28.0",
"@wordpress/dependency-extraction-webpack-plugin": "^4.30.0",
"webpack": "^5.89.0",
}

**Editor.js:**
import React from 'react';
import '@automattic/isolated-block-editor/build-browser/core.css';
import IsolatedBlockEditor from '@automattic/isolated-block-editor';

const settings = {
iso: {
moreMenu: false,
},
};

const Editor = () => {
return (


{
console.log('parser: ', parser)
console.log('rawHandler: ', rawHandler)
}}
onSaveContent={(content) => {
console.log('onContentSave')
}}
onError={() => {
console.log('error')
}}
>

);
};

export default Editor;

**index.js:**
import React from 'react';
import { createRoot } from 'react-dom/client';
import Editor from './Editor';
const rootElement = document.getElementById('root');
const root = createRoot(rootElement);
root.render(
//Render Editor here
);

Can you please tell me what I am missing?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Editor.js and index.js, using the listed React, isolated-block-editor, and webpack dependencies, then reproduce the error in the ASP.Net MVC integration. Trace the reported failure at implementation.js:141; done means identifying the missing integration detail and documenting a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, webpack
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.