react-json-editor-ajrm icon indicating copy to clipboard operation
react-json-editor-ajrm copied to clipboard

Uncaught TypeError: Cannot read property 'string' of undefined

Open GregLafranceBG opened this issue 4 years ago • 1 comments

  1. What version of RJEA are you using (react-json-editor-ajrm version)? "react-json-editor-ajrm": "^2.5.13"

  2. What operating system and processor architecture are you using? Ubuntu 18.04.5 LTS x86_64

  3. What did you do? *REQUIRED Paste this JSON twice into input:

{ sameple: 'enter / paste Wave JSON', test: "this is a test", another: "another test" }

First time you paste it is ok, second time invalid JSON so error:

{ sameple: 'enter / paste Wave JSON', test: "this is a test", another: "another test" }{ sameple: 'enter / paste Wave JSON', test: "this is a test", another: "another test" }

  1. What did you expect to see? Validation error in the json component, but no console errors.

  2. What did you see instead? *REQUIRED Uncaught TypeError: Cannot read property 'string' of undefined at JSONInput.tokenize (:3000/static/js/bundle.js:37842) at JSONInput.update (:3000/static/js/bundle.js:37060) at JSONInput.onPaste (:3000/static/js/bundle.js:37158) at HTMLUnknownElement.callCallback (:3000/static/js/bundle.js:5764) at Object.invokeGuardedCallbackDev (:3000/static/js/bundle.js:5813) at invokeGuardedCallback (:3000/static/js/bundle.js:5868) at invokeGuardedCallbackAndCatchFirstError (:3000/static/js/bundle.js:5882) at executeDispatch (:3000/static/js/bundle.js:5965) at executeDispatchesInOrder (:3000/static/js/bundle.js:5990) at executeDispatchesAndRelease (:3000/static/js/bundle.js:8854) at executeDispatchesAndReleaseTopLevel (:3000/static/js/bundle.js:8863) at forEachAccumulated (:3000/static/js/bundle.js:8835) at runEventsInBatch (:3000/static/js/bundle.js:8880) at runExtractedPluginEventsInBatch (:3000/static/js/bundle.js:9090) at handleTopLevel (:3000/static/js/bundle.js:9134) at batchedEventUpdates$1 (:3000/static/js/bundle.js:27447) at batchedEventUpdates (:3000/static/js/bundle.js:6371) at dispatchEventForLegacyPluginEventSystem (:3000/static/js/bundle.js:9144) at attemptToDispatchEvent (:3000/static/js/bundle.js:9843) at dispatchEvent (:3000/static/js/bundle.js:9765) at unstable_runWithPriority (:3000/static/js/bundle.js:43195) at runWithPriority$1 (:3000/static/js/bundle.js:16615) at discreteUpdates$1 (:3000/static/js/bundle.js:27463) at discreteUpdates (:3000/static/js/bundle.js:6382) at dispatchDiscreteEvent (:3000/static/js/bundle.js:9744)

GregLafranceBG avatar Apr 08 '21 00:04 GregLafranceBG

I have the exact same problem: errors in the json string result in crashing of the component instead of showing as errors in the editor

ramsinitus avatar Apr 18 '21 12:04 ramsinitus

I no longer intend to update this project. I am working instead on a complete rewrite.

I'd like to thank you for using and taking interest in this project.

I also would like to apologize for not following up sooner. However, do realize for the most part this has been a one-man show, and the occasional contributions I used to receive. What I am saying is, I am in dire need of volunteers.

If this is something you would be interested in participating in, you can join in the discussion.

I've taken note of this thread, and I'll keep this under consideration for the new project.

AndrewRedican avatar Jan 29 '23 03:01 AndrewRedican