Discourse solved plugin throwing 500 error

I recently upgraded my discourse version and all of my plugins are up to date.
After upgrade I am now getting 500 error when trying to mark a reply as solution.

Below are the error details I am getting in console.

    Failed to load resource: the server responded with a status of 500 ()
_application-ed0ac69…88e883e0db.js:11141 SyntaxError: Unexpected token < in JSON at position 0
    at Function.parse [as parseJSON] (<anonymous>)
    at n (_application-ed0ac69…88e883e0db.js:11137)
    at e.popupAjaxError (_application-ed0ac69…88e883e0db.js:11180)
    at E (ember_jquery-8e338e1…8f98e499a037a9.js:1)
    at w (ember_jquery-8e338e1…8f98e499a037a9.js:1)
    at g (ember_jquery-8e338e1…8f98e499a037a9.js:1)
    at t.invoke (ember_jquery-8e338e1…8f98e499a037a9.js:1)
    at e.t.flush (ember_jquery-8e338e1…8f98e499a037a9.js:1)
    at e.t.flush (ember_jquery-8e338e1…8f98e499a037a9.js:1)
    at e.t._end (ember_jquery-8e338e1…8f98e499a037a9.js:1)
ember_jquery-8e338e1…8f98e499a037a9.js:1 Uncaught 
Object
jqXHR: {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
textStatus: "error"
errorThrown: ""
_discourse_displayed: true
__proto__: Object
1 Like

do you have unofficial plugins installed? Is it working in safe mode with only official plugins and themes?

1 Like

Yes I do have unofficial plugin installed and I haven’t checked in safemode (I dont know how to do it :noobface:)

Though I checked logs and it showed this
ArgumentError (unknown keyword: duration) /var/www/discourse/app/models/topic.rb:1138:in 'set_or_create_timer'
(Backtrace if you’re interested: https://pastebin.com/chKtDTeL.)

Then I went to solved settings and set auto close hours to 0 (Previous value 72) and it works now but I really want to use this feature. Any help?

1 Like

just go to /safe-mode on your site to access safe mode settings. Looks like this:

1 Like

Ok someone from my team has tried this already
· Disabling unofficial plugins (e.g. our badges plugin) did not resolve the issue.
· Disabling our theme (e.g. custom JavaScript) did not resolve the issue.
· Disabling unofficial plugins and theme together did not resolve the issue.
Using safe-mode.

Didn’t try disabling all plugin cause you know it will disable solved also :grin:

1 Like

do you have any pavilion plugins?

1 Like

It seems related to what I found in logs. Last update made by plugin author is this
https://github.com/discourse/discourse-solved/commit/329d8aff30bf21e59e2c2ddcbc0e5a51bc8ef70d

1 Like

No plugins from pavilion

2 Likes

I just updated my personal site to latest and enabled the solved plugin, and it works fine for me. I am not able to replicate.

2 Likes

I think I got the issue. We are on stable release (Not the default tests-passed) which doesn’t have the ‘duration’ change yet.

1 Like

Thankyou for looking into it, really appreciate it! I think we will just wait until the stable branch is updated to use this feature.

1 Like

Hello i have the same problem:

Discourse version:

My extensions:

I have try in safe mode, it’s same.

The log

Message

ArgumentError (unknown keyword: duration)
/var/www/discourse/app/models/topic.rb:1138:in `set_or_create_timer'

Backtrace

/var/www/discourse/app/models/topic.rb:1138:in `set_or_create_timer'
/var/www/discourse/plugins/discourse-solved/plugin.rb:126:in `accept_answer!'
/var/www/discourse/plugins/discourse-solved/plugin.rb:206:in `accept'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/abstract_controller/base.rb:196:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:135:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/rescue.rb:22:in `process_action'

Thanks for your help

Hello evorybody,
Have toi for an Idea ?

You’re on a specific discourse version which probably doesn’t have the feature backported. The solved plugin works fine with latest tests-passed branch so consider upgrading to that.

1 Like

why ?
I 'm un stable version.

So if i understand, stable version is not a good version for discourse production server ???

  ## Which Git revision should this container use? (default: tests-passed)
  version: stable

It is Good but generally very very old and lacking new features. You should really be using tests-passed as it’s stable enough and contains all new features and performance improvements.

ok thanks for your response.

I made a fix yesterday. Could you update discourse-solved plugin and confirm if the issue is solved for you?

4 Likes

Hello @kris.kotlarek,
that’s good for me with this version:

image

Thanks

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.