pwndoc / pwndoc

Pentest Report Generator
https://pwndoc.github.io/pwndoc
MIT License
2.29k stars 426 forks source link

[bug]tiptap-extensions throw error "Duplicate use of selection JSON ID cell" #325

Open Monyer opened 2 years ago

Monyer commented 2 years ago

When running "docker-compose -f frontend/docker-compose.dev.yml up -d --build" at the first time, then visit https://127.0.0.1:8081/vulnerabilities , browser throw an error and the page keep blank :

vue-router.esm.js?85f8:2314 RangeError: Duplicate use of selection JSON ID cell
    at Function.jsonID (index.es.js?ed9c:188:1)
    at eval (index.es.js?d5b1:582:1)
    at ./node_modules/tiptap-extensions/node_modules/prosemirror-tables/dist/index.es.js (vendor.js:6908:1)
    at __webpack_require__ (app.js:854:30)
    at fn (app.js:151:20)
    at eval (extensions.esm.js?6301:1:1)
    at ./node_modules/tiptap-extensions/dist/extensions.esm.js (vendor.js:6896:1)
    at __webpack_require__ (app.js:854:30)
    at fn (app.js:151:20)
    at eval (index.js?!./node_modules/@quasar/app/lib/webpack/loader.auto-import-client.js?kebab!./node_modules/vue-loader/lib/index.js?!./src/components/editor.vue?vue&type=script&lang=js&:15:75)

This error was talked at: https://github.com/ueberdosis/tiptap/issues/316

The reason is : Folder .../node_modules/ contains subfolder '/prosemirror-tables' (version 1.1.1) Folder .../node_modules/tiptap-extensions/node-modules/ contains subfolder '/prosemirror-tables' (version 1.0.0) Loading duplicated modules with different versions raises the error.

So my temporary way to fix it was rename .../node_modules/tiptap-extensions/node-modules to .../node_modules/tiptap-extensions/node-modules--

I didn't find a normal way to fix it.

ismail-raslan commented 2 years ago

Kindly modify those 2 lines to be: "tiptap": "^1.32.2", "tiptap-extensions": "^1.35.2", and add those to you package.json file, "@tiptap/core": "^2.0.0-beta.182", "@tiptap/starter-kit": "^2.0.0-beta.191", rebuild and Voalaaa

Mikaleb commented 2 years ago

And it doesn't work in v1 !

yeln4ts commented 2 years ago

I could not reproduce this issue when building from scratch. When inspecting the container I only have one prosemirror-tables module installed. image image

nobox910 commented 2 years ago

@Monyer : I fixed issues by switching to yarn (frontend/docker-compose.dev.yml)

Monyer commented 2 years ago

@Monyer : I fixed issues by switching to yarn (frontend/docker-compose.dev.yml)

This issue can be fixed.

yeln4ts commented 2 years ago

I would need to be able to reproduce in order to fix the issue. I don't know the impact of switching from npm to yarn. Can you tell what OS you use ? Did you try to delete your docker containers and images and retry from scratch ?

nobox910 commented 2 years ago

Here is error message from browser console, I've run docker system prune -a -f before docker-compose -f frontend/docker-compose.dev.yml up -d --build

tamqm@runner:~/pwndoc$ cat /etc/issue Ubuntu 18.04.6 LTS \n \l

tamqm@runner:~/pwndoc$ docker --version Docker version 20.10.16, build aa7e414

2022-08-10_16-26-26

2022-08-10_16-27-40

yeln4ts commented 2 years ago

I installed a fresh Ubuntu system, cloned the repo and built the containers and did not have that error (tried both prod and dev) image

Can you try using a fresh cloned repository of pwndoc ? Maybe it's an issue with a package.json lock file