DevToys-app / DevToysMac

DevToys For mac
MIT License
9.2k stars 354 forks source link

[BUG] Stops responding when trying to format a big JSON #96

Open tonylook opened 2 years ago

tonylook commented 2 years ago

Application stops to respond when I paste a large JSON to format (the output of an Elasticsearch insert), in addition I'm not able to use the application anymore, because when I force close it and reopen it, the application starts with the same thing I pasted before force closing it, and it stops to respond again. Here a brief sample of the json:

{
  "took": 4095,
  "errors": true,
  "items": [
    {
      "index": {
        "_index": "stores",
        "_type": "_doc",
        "_id": "1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 2,
          "failed": 0
        },
        "_seq_no": 0,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "stores",
        "_type": "_doc",
        "_id": "14123",
        "status": 400,
        "error": {
          "type": "mapper_parsing_exception",
          "reason": "failed to parse field [location] of type [geo_point]",
          "caused_by": {
            "type": "illegal_argument_exception",
            "reason": "illegal latitude value [151.2265675] for location"
          }
        }
      }
    }
}

and here the stack trace of the issue: https://zerobin.net/?40302902d974c13e#C/R5tQ74Hjf3oy6guycaBnmiE6/0azCqBN8TXMPEWVw= Password for reading: tonylook

dextercai commented 2 years ago

I have the same problem.

juliends75 commented 2 years ago

@tonylook I had the same issue and found a solution. I used the software CleanMyMac X (trial version) to help me Delete the file ./Library/Preferences/com.yuki.DevToys.plist Delete the folder /Volumes/Macintosh\ HD/private/var/folders/8c/krdwkn115rqc0phg_8t60s9c0000gn/C/com.yuki.DevToys/

For the folder, i can't confirm that it will be at the same location on you Mac If you don't find it, download CleanMyMac X.

After you deleted the file and folder, relaunch the software

kioipp commented 2 years ago

It works for me, here is my steps.

  1. Direct remove the file:
$ rm ~/Library/Preferences/com.yuki.DevToys.plist
  1. Run command to find the private folder:
# Find
$ find /Volumes/Macintosh\ HD/private/var/folders/ -name "com.yuki.DevToys" 2> /dev/null
/Volumes/Macintosh HD/private/var/folders//js/dmhwmtvs4qzd5tq3ky_f3jhh0000gn/C/com.yuki.DevToys
# Remove
cd /Volumes/Macintosh HD/private/var/folders//js/dmhwmtvs4qzd5tq3ky_f3jhh0000gn/C/ && rm -rf com.yuki.DevToys
veler commented 3 weeks ago

Hi,

DevToysMac is now archived and deprecated. We just released DevToys 2.0 for Windows, Mac and Linux. This issue may or may have not been addressed in the new version. If the issue persist, we encourage to open a new issue on https://github.com/DevToys-app/DevToys or https://github.com/DevToys-app/DevToys.Tools

See more information about DevToys 2.0 here: https://devtoys.app/blog/announcing-devtoys-2.0-preview