Import from SMF failing with "callFn.apply is not a function error"

Technical Support
  • #1

    It imports the users just fine. But, it looks like it's failing when importing messages:

    [nodebb-plugin-import] importer.success [2018-07-20T03:24:23.135Z] Importing 2934 messages.
    [nodebb-plugin-import-smf] getPaginatedMessages
    exporter.log [2018-07-20T03:24:23.137Z] getPaginatedMessages
    2018-07-20T03:24:23.392Z [25675] - error: message=callFn.apply is not a function, stack=TypeError: callFn.apply is not a function
    at /home/ubuntu/nodebb/node_modules/async/dist/async.js:473:16
    at next (/home/ubuntu/nodebb/node_modules/async/dist/async.js:5329:29)
    at /home/ubuntu/nodebb/node_modules/async/dist/async.js:969:16
    at Object.Messaging.checkContent (/home/ubuntu/nodebb/src/messaging/create.js:31:11)
    at /home/ubuntu/nodebb/src/messaging/create.js:49:15
    at nextTask (/home/ubuntu/nodebb/node_modules/async/dist/async.js:5324:14)
    at Object.waterfall (/home/ubuntu/nodebb/node_modules/async/dist/async.js:5334:5)
    at Object.Messaging.addMessage (/home/ubuntu/nodebb/src/messaging/create.js:47:9)
    at addMessage (/home/ubuntu/nodebb/node_modules/nodebb-plugin-import/server/importer/index.js:963:31)
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/server/importer/index.js:940:25
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/server/augmented/messages.js:92:11
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:251:17
    at done (/home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:132:19)
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:32:16
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:248:21
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:572:34
    2018-07-20T03:24:23.394Z [25675] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.

  • #2

    I disabled all plugins using nodebb reset -p. Then I uninstalled the import and import-smf plugin. Restarted nodebb, reinstalled the import plugin, and allowed it to install the import-smf plugin. I ran the import again with the flush option, and I'm still getting the same error.

    Note that ALL plugins are disabled except for the import and import-smf plugin.

    Any ideas here?

  • #3

    This looks like the offending code:

    function once(fn) {
        return function () {
            if (fn === null) return;
            var callFn = fn;
            fn = null;
            callFn.apply(this, arguments);
  • Global Moderator Plugin & Theme Dev

    @signal15 nothing about that code looks wrong to me. If you're pointing to this because an error occurred there, it's most likely because of code somewhere else.

  • #5

    @pitaj, after looking more into it, you're right. But, I still have no idea what the problem might be. My SMF database has NOT been converted to UTF-8. Is the importer expecting UTF-8 content?

  • #6

    Have you read the readme of the import plugin? Especially that giant section saying:


    I don't know if it is that but at least that might be a possibility since you're saying in the opened issue that you're using the latest NodeBB? 🙂

  • #7


    Doh! I did not see that. I just installed 1.7.5 and everything has been imported just fine. Maybe I should read the manual. 🙂


  • #8

    Thinking about this further, it seems like the functionality of this plugin should probably be merged/maintained with master since it's such a core component influencing adoption of NodeBB.

Suggested Topics

| | | |