Updating emoji plugin to 3.5.0 breaks categories view


  • When I logged in to the ACP it said I should update the plugin:

    nodebb-plugin-emoji to the latest 3.5.0

    I click on the update button, and since then now I can no longer view by categories:

    10fa8534-7749-41bb-954b-4f89c3c568db-image.png

    When I run ./nodebb log I am seeing lots of errors regarding the emoji plugin:

    
    Hit Ctrl-C to exit
    
    
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/                                                                                                           parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plug                                                                                                           in-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:                                                                                                           13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34                                                                                                           )
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T19:42:58.116Z [4567/2211] - error: [emoji] Failed to retrieve data fo                                                                                                           r parse ENOENT: no such file or directory, open '/home/tirpc/nodebb/node_modules                                                                                                           /nodebb-plugin-emoji/build/emoji/table.json' {"errno":-2,"code":"ENOENT","syscal                                                                                                           l":"open","path":"/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoj                                                                                                           i/table.json","stack":"Error: ENOENT: no such file or directory, open '/home/tir                                                                                                           pc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json'"}
    2021-03-13T19:44:35.859Z [4567/2211] - error: /categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T19:44:49.394Z [4567/2211] - error: /api/categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T19:45:30.609Z [4567/2211] - error: /categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T19:46:06.216Z [4567/2211] - error: [emoji] Failed to retrieve data for parse ENOENT: no such file or directory, op                                                              en '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json' {"errno":-2,"code":"ENOENT","syscall":"open",                                                              "path":"/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json","stack":"Error: ENOENT: no such file or d                                                              irectory, open '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json'"}
    2021-03-13T19:46:06.217Z [4567/2211] - error: [emoji] Failed to retrieve data for parse ENOENT: no such file or directory, op                                                              en '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json' {"errno":-2,"code":"ENOENT","syscall":"open",                                                              "path":"/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json","stack":"Error: ENOENT: no such file or d                                                              irectory, open '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json'"}
    2021-03-13T19:46:06.218Z [4567/2211] - error: [emoji] Failed to retrieve data for parse ENOENT: no such file or directory, op                                                              en '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json' {"errno":-2,"code":"ENOENT","syscall":"open",                                                              "path":"/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json","stack":"Error: ENOENT: no such file or d                                                              irectory, open '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json'"}
    2021-03-13T19:46:06.219Z [4567/2211] - error: [emoji] Failed to retrieve data for parse ENOENT: no such file or directory, op                                                              en '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json' {"errno":-2,"code":"ENOENT","syscall":"open",                                                              "path":"/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json","stack":"Error: ENOENT: no such file or d                                                              irectory, open '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json'"}
    2021-03-13T19:46:06.219Z [4567/2211] - error: [emoji] Failed to retrieve data for parse ENOENT: no such file or directory, op                                                              en '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json' {"errno":-2,"code":"ENOENT","syscall":"open",                                                              "path":"/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json","stack":"Error: ENOENT: no such file or d                                                              irectory, open '/home/tirpc/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json'"}
    2021-03-13T19:46:11.193Z [4567/2211] - error: /api/categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T19:46:51.772Z [4567/2211] - error: /api/categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    
    
    

    I tried logging back into the ACP and clicking on deactivate for the emoj plugin but it doesn't seem to do anything.


  • Is there a command I can run from SSH to deactivate or uninstall the emoji plugin since clicking the deactivate or uninstall buttons in the ACP do not work?

  • Global Moderator Plugin & Theme Dev

    @dcook I suggest upgrading Node.js to Node 14

    You can disable the plugin with this command

    ./nodebb reset -p emoji
    

  • @pitaj Can you let me know the command to update to Node 14 ?

    Normally I just do ./nodebb upgrade which I did but it didn't resolve the issue


  • @PitaJ I was able to disable the emoji plugin, but the the categories link is still showing the error page:

    def7bd56-1b4e-4ebb-883d-2a2a5cb15c57-image.png

    Every other link in the menu works fine, its only categories that is broken, however since I have that set as the homepage its causing big issues.

    2021-03-13T20:54:55.150Z [4567/1830] - error: /categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T20:55:02.533Z [4567/1830] - error: /api/categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T20:56:10.444Z [4567/1830] - error: /api/categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    2021-03-13T20:56:12.231Z [4567/1830] - error: /api/categories
    TypeError: Object.fromEntries is not a function
        at Object.parse [as default] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parse.ts:41:26)
        at parseRaw (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:20:22)
        at Object.parsePost [as method] (/home/tirpc/nodebb/node_modules/nodebb-plugin-calendar/src/lib/parseFilters.ts:34:28)
        at /home/tirpc/nodebb/src/plugins/hooks.js:129:28
        at eachOfSeries$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:1631:13)
        at replenish (/home/tirpc/nodebb/node_modules/async/dist/async.js:440:21)
        at /home/tirpc/nodebb/node_modules/async/dist/async.js:445:13
        at eachOfLimit$1 (/home/tirpc/nodebb/node_modules/async/dist/async.js:471:34)
        at awaitable (/home/tirpc/nodebb/node_modules/async/dist/async.js:208:32)
        at eachOfSeries (/home/tirpc/nodebb/node_modules/async/dist/async.js:658:16)
    
    
  • Global Moderator Plugin & Theme Dev

    @dcook what OS are you on? How did you install Node.js in the first place?

    It was never the emoji plugin, but the calendar plugin (as shown in the error message). You can use the same command as before to disable it for now:

    ./nodebb reset -p calendar
    

  • @pitaj

    Ubuntu 18.04.4 LTS \n \l

    I followed these setups when I installed NodeBB several years ago:

    Prior to upgrading NodeBB I always run first:
    sudo apt-get update
    sudo apt-get upgrade

    Once the server is rebooted, I then follow these upgrade instructions:

    Most recently I updated to 1.16.2 a couple months ago now.

    It was working fine until this morning, when I logged into the ACP and seen the alert that I should upgrade the emoji plugin which I did, I then did the "Rebuild & Restart" since then, the categories has been showing the error.

  • Global Moderator Plugin & Theme Dev

    @dcook try this is upgrade node

    curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
    sudo apt-get install -y nodejs
    

  • @pitaj said in Updating emoji plugin to 3.5.0 breaks categories view:

    sudo apt-get install -y nodejs

    Thanks that seemed to resolve the issue, should those commands be done as part of the NodeBB upgrade steps? As it was not mentioned in the Instructions: https://docs.nodebb.org/configuring/upgrade/


  • @PitaJ running those commands fixed the categories issue, but has created a new issue:

    I have 2 NodeBB servers both are Ubuntu 18.04.4 and have NodeBB 1.16.2, on the server that I ran those 2 commands on:

    Now whenever someone clicks on upload an image to a post, no matter what image or size of image they get: error-invalid files

    d809f02e-a21d-4df7-8e29-8db6b9140ddf-image.png

    On the other server that I have not run those commands on yet, upload image works normally.

    /nodebb log shows:

    2021-03-14T16:19:21.629Z [4567/3418] - error: /api/post/upload
    Error: [[error:invalid-files]]
        at validateFiles (/home/bgc/nodebb/src/middleware/index.js:106:15)
        at Layer.handle [as handle_request] (/home/bgc/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/home/bgc/nodebb/node_modules/express/lib/router/route.js:137:13)
        at Form.<anonymous> (/home/bgc/nodebb/node_modules/connect-multiparty/index.js:114:7)
        at Form.emit (events.js:315:20)
        at emitCloseNT (internal/streams/destroy.js:87:10)
        at processTicksAndRejections (internal/process/task_queues.js:79:21)
    2021-03-14T16:19:30.900Z [4567/3418] - error: /api/post/upload
    Error: [[error:invalid-files]]
        at validateFiles (/home/bgc/nodebb/src/middleware/index.js:106:15)
        at Layer.handle [as handle_request] (/home/bgc/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/home/bgc/nodebb/node_modules/express/lib/router/route.js:137:13)
        at Form.<anonymous> (/home/bgc/nodebb/node_modules/connect-multiparty/index.js:114:7)
        at Form.emit (events.js:315:20)
        at emitCloseNT (internal/streams/destroy.js:87:10)
        at processTicksAndRejections (internal/process/task_queues.js:79:21)
    
    
  • NodeBB

    See here https://community.nodebb.org/topic/15075/nodebb-v1-15-0-rc-0-release-candidate-published/8?_=1615739118416, you need to run npm i multiparty@4.2.2 to update that dependency.


  • @baris thank you, I will try that command

    I really wish you guys would get your s**t together, I shouldn't need to do all these manual steps to have working NodeBB, isn't that what ./nodebb upgrade command is supposed to do?

  • NodeBB

    Yes, but for some reason the package manager npm doesn't upgrade that dependency during ./nodebb upgrade.

    I have manually added the dependency to our list maybe that will fix the issue.

    https://github.com/NodeBB/NodeBB/commit/ef3ec96af235de796160ef28ad03b84b3f1b9820

  • Global Moderator Plugin & Theme Dev

    ./nodebb upgrade doesn't handle pulling the latest code from git, nor does it handle upgrading system packages like Node.


  • @pitaj Prior to running ./nodebb upgrade I always do apt-get-update apt-get-upgrade so the server is already fully updated.

    If there is something else that NodeBB requires then it should be part of the nodebb upgrade command.

Suggested Topics

| |