500 error on post/edit [Procourse Static Pages]

Had an issue updating, built a new instance, restored backup to new instance.

Everything seems to be working except for posting. Whenever I post or edit a post, I am getting a 500 error in the client, with this in the logs.

Any ideas?

Message (3 copies reported)

MiniRacer::RuntimeError (TypeError: Cannot read properties of undefined (reading 'throwOnUnhandled'))
lib/pretty_text.rb:231:in `block in markdown'
lib/pretty_text.rb:660:in `block in protect'
lib/pretty_text.rb:660:in `synchronize'
lib/pretty_text.rb:660:in `protect'
lib/pretty_text.rb:172:in `markdown'
lib/pretty_text.rb:297:in `cook'
lib/new_post_manager.rb:239:in `block in perform'
lib/new_post_manager.rb:238:in `any?'
lib/new_post_manager.rb:238:in `perform'
app/controllers/posts_controller.rb:201:in `create'
app/controllers/application_controller.rb:423:in `block in with_resolved_locale'
app/controllers/application_controller.rb:423:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:64:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:393:in `call'
lib/middleware/gtm_script_nonce_injector.rb:10:in `call'
config/initializers/008-rack-cors.rb:14:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:233:in `call'

Backtrace

JavaScript at deprecated (discourse-common/lib/deprecated:61:103)
JavaScript at API.whiteList (discourse-markdown-it/setup:325:31)
JavaScript at setup (discourse/plugins/procourse-static-pages/lib/discourse-markdown/whitelist-tags.js:9:12)
JavaScript at Setup._setupFeature2 (discourse-markdown-it/setup:134:5)
JavaScript at Setup.run (discourse-markdown-it/setup:46:70)
JavaScript at setupIt (discourse-markdown-it/setup:20:11)
JavaScript at DiscourseMarkdownIt.withOptions (discourse-markdown-it/index:33:26)
JavaScript at Object.withOptions (discourse-markdown-it/index:19:43)
JavaScript at <anonymous>:27:109
mini_racer (0.8.0) lib/mini_racer.rb:228:in `eval_unsafe'

I’m also seeing this error in my logs:

Message (80 copies reported)

Job exception: TypeError: Cannot read properties of undefined (reading 'throwOnUnhandled')


Backtrace

JavaScript at deprecated (discourse-common/lib/deprecated:61:103)
JavaScript at API.whiteList (discourse-markdown-it/setup:325:31)
JavaScript at setup (discourse/plugins/procourse-static-pages/lib/discourse-markdown/whitelist-tags.js:9:12)
JavaScript at Setup._setupFeature2 (discourse-markdown-it/setup:134:5)
JavaScript at Setup.run (discourse-markdown-it/setup:46:70)
JavaScript at setupIt (discourse-markdown-it/setup:20:11)
JavaScript at DiscourseMarkdownIt.withOptions (discourse-markdown-it/index:33:26)
JavaScript at Object.withOptions (discourse-markdown-it/index:19:43)
JavaScript at <anonymous>:29:109
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/mini_racer-0.8.0/lib/mini_racer.rb:228:in `eval_unsafe'```

Looks like it’s the Procourse Static Pages plugin. There’s some discussion in the topic: ProCourse Static Pages - #71 by Hifihedgehog

4 Likes

OK – that can cause issues even if it is disabled?

So remove from app.yml and rebuild?

1 Like

Yup, that’s it :+1:

3 Likes

That worked – thank you!

1 Like

If you really need it, the other topic links to a forked version that works. If you don’t really need it, now it’s a good time to stop using it.

1 Like

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