Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

users avatar not saving when installed on a subpath #16

Open
Olm-e opened this issue Feb 18, 2019 · 20 comments

Comments

Projects
None yet
2 participants
@Olm-e
Copy link

commented Feb 18, 2019

hi,
either with stable or with testing branch, there seems to have no way to have users upload and use custom avatar image.
the system seems to work well up to the "upload image" where you select you image, it shows in the preview in the dialog, but when saving, bim!, back to neutral zero avatar image...
the system complains with this error :

(testing seems to work well otherwise btw)

the error at the given time (with testing)

MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb

`/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.0.1/lib/logster/logger.rb:101:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.0.1/lib/logster/logger.rb:52:in `add'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/logger.rb:534:in `warn'
/var/www/discourse/lib/discourse_ip_info.rb:23:in `rescue in mmdb_load'
/var/www/discourse/lib/discourse_ip_info.rb:19:in `mmdb_load'
/var/www/discourse/lib/discourse_ip_info.rb:15:in `open_db'
/var/www/discourse/lib/discourse_ip_info.rb:10:in `initialize'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:141:in `new'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:141:in `block in instance'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:139:in `synchronize'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:139:in `instance'
/var/www/discourse/lib/discourse_ip_info.rb:91:in `get'
/var/www/discourse/app/serializers/concerns/user_auth_tokens_mixin.rb:23:in `location'
(eval):5:in `_fast_attributes'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:468:in `rescue in attributes'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:455:in `attributes'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in `_serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in `serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:89:in `block in _serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:79:in `map'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:79:in `_serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:73:in `serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:53:in `as_json'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:96:in `jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `block in jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `map'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `block in jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `map'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:35:in `encode'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:22:in `encode'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:41:in `to_json'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:25:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json.rb:139:in `dump'
/var/www/discourse/app/controllers/application_controller.rb:453:in `render_json_dump'
/var/www/discourse/app/controllers/users_controller.rb:88:in `block (2 levels) in show'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/mime_responds.rb:203:in `respond_to'
/var/www/discourse/app/controllers/users_controller.rb:80:in `show'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/base.rb:194:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:132:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/callbacks.rb:41:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/rescue.rb:22:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/notifications.rb:168:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/notifications.rb:168:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.2/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/base.rb:134:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionview-5.2.2/lib/action_view/rendering.rb:32:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal.rb:191:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal.rb:252:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/journey/router.rb:35:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/journey/router.rb:35:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/routing/route_set.rb:840:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:32:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/tempfile_reaper.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/conditional_get.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:216:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:98:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.0.1/lib/logster/middleware/reporter.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/static.rb:127:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/message_bus-2.2.0.pre.1/lib/message_bus/rack/middleware.rb:57:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:182:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/railtie.rb:190:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/railtie.rb:190:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/urlmap.rb:68:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:606:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:701:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:142:in `start'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `<top (required)>'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
/opt/rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/opt/rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
/opt/rbenv/versions/2.6.0/bin/bundle:23:in `load'
/opt/rbenv/versions/2.6.0/bin/bundle:23:in `<main>'`
@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2019

Hi,
Can you confirm your problem occurred at installation time (not upgrade)?
What processor architecture (x86 or ARM)?

@Olm-e

This comment has been minimized.

Copy link
Author

commented Feb 19, 2019

it's happening after install, both with stable 2.1.8 and testing 2.2.1 version of ynh_discourse on x86

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Feb 23, 2019

OK, got it reproduced, and it only occurs when installing in a subpath.
I would say it looks like an upstream bug (it seems to surprisingly use the URL subpath when accessing the image file on the disk, which is inappropriate); but I can't confirm for sure...

It would be interesting to confirm that by trying the official way of installing Discourse with Docker... any volunteer? 🙂

@JimboJoe JimboJoe changed the title users avatar not saving users avatar not saving when installed on a subpath Feb 23, 2019

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2019

I had another look at it, and found out missing specific actions at installation for subfolder installations. So, a fix is on the way 😉

@JimboJoe JimboJoe closed this in de467cf Mar 17, 2019

@Olm-e

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

hi, my instance is in 2.2.3 testing and this is still not working ...

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

Did you upgrade it via YunoHost?
What's the content of /var/www/discourse/public/forum?

@JimboJoe JimboJoe reopened this Mar 17, 2019

@Olm-e

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

yes I upgraded through yunohost,
there is no forum dir in /var/www/discourse/public/

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

Had you tried the testing in the meanwhile...?

@Olm-e

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

it's on testing yes ... I don't know how to go back on master actually

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

Sorry, I was speaking about the "discourse" testing... Where you on 2.2.2 before applying the update?

@Olm-e

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

yes ... I did each update since 2.2.1 incrementally and tested each time ...

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

Could you please share your upgrade logs?

@Olm-e

This comment has been minimized.

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

The fix I included in the 2.2.3 release isn't executed in the logs... Hmm... How come your 2.2.3 upgrade logs are dated on the 11th, whereas I released the update today? 🤔

@Olm-e

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

could it be the testing branch is on 2.2.3 sooner already without the patch ?

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

Yep, I think the mystery's solved 🙂

You upgraded to the testing branch when I was still testing the 2.2.3 version, and I added the "avatar fix" afterwards.

So 2 conclusions:

  • I'll try to put a "pending" tag on my testing PR's so you'll know I'm still testing them 😉
  • as the fix only gets applied on an upstream upgrade, you should get it at the 2.2.4 release
    In the meanwhile, it's quite simple to apply, see here

So, I'll close that issue for now... but don't hesitate to re-open it if needed 😉

@JimboJoe JimboJoe closed this Mar 17, 2019

@Olm-e

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

mm... ok ....
I've added the forum dir by hand (with user admin and sudo, then sudo chown discourse: ) and the symlinks but... still no luck....

after reboot (never knows) there are still the same error in the webconsole when trying to upload a jpg as avatar for a user :

 MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb

 MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb 

with last one detail :


/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.0.1/lib/logster/logger.rb:101:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.0.1/lib/logster/logger.rb:52:in `add'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/logger.rb:534:in `warn'
/var/www/discourse/lib/discourse_ip_info.rb:23:in `rescue in mmdb_load'
/var/www/discourse/lib/discourse_ip_info.rb:19:in `mmdb_load'
/var/www/discourse/lib/discourse_ip_info.rb:15:in `open_db'
/var/www/discourse/lib/discourse_ip_info.rb:10:in `initialize'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:141:in `new'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:141:in `block in instance'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:139:in `synchronize'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/singleton.rb:139:in `instance'
/var/www/discourse/lib/discourse_ip_info.rb:91:in `get'
/var/www/discourse/app/serializers/concerns/user_auth_tokens_mixin.rb:23:in `location'
(eval):5:in `_fast_attributes'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:468:in `rescue in attributes'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:455:in `attributes'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in `_serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in `serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:89:in `block in _serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:79:in `map'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:79:in `_serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:73:in `serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/array_serializer.rb:53:in `as_json'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:96:in `jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `block in jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `map'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `block in jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `map'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:92:in `jsonify'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:35:in `encode'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/json/encoding.rb:22:in `encode'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:41:in `to_json'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:25:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json.rb:139:in `dump'
/var/www/discourse/app/controllers/application_controller.rb:453:in `render_json_dump'
/var/www/discourse/app/controllers/users_controller.rb:88:in `block (2 levels) in show'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/mime_responds.rb:203:in `respond_to'
/var/www/discourse/app/controllers/users_controller.rb:80:in `show'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/base.rb:194:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:132:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/callbacks.rb:41:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/rescue.rb:22:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/notifications.rb:168:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/notifications.rb:168:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.2/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/abstract_controller/base.rb:134:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionview-5.2.2/lib/action_view/rendering.rb:32:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal.rb:191:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_controller/metal.rb:252:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/journey/router.rb:35:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/journey/router.rb:35:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/routing/route_set.rb:840:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:32:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/tempfile_reaper.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/conditional_get.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:216:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:98:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.0.1/lib/logster/middleware/reporter.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/static.rb:127:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/message_bus-2.2.0.pre.1/lib/message_bus/rack/middleware.rb:57:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:182:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/railtie.rb:190:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-5.2.2/lib/rails/railtie.rb:190:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/urlmap.rb:68:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:606:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:701:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:142:in `start'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.0/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `<top (required)>'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
/opt/rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
/opt/rbenv/versions/2.6.0/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/opt/rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
/opt/rbenv/versions/2.6.0/bin/bundle:23:in `load'
/opt/rbenv/versions/2.6.0/bin/bundle:23:in `<main>'
@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

It should work instantaneously (I tested it by hand first)...
The result on my server:

root:~# ll /var/www/discourse/public/forum/
total 0
lrwxrwxrwx 1 discourse discourse 10 mars  16 19:36 backups -> ../backups
lrwxrwxrwx 1 discourse discourse 10 mars  16 19:36 uploads -> ../uploads
@Olm-e

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

admin@olme:~$ sudo ls -l /var/www/discourse/public/forum/
total 0
lrwxrwxrwx 1 discourse discourse 10 Mar 17 22:08 backups -> ../backups
lrwxrwxrwx 1 discourse discourse 10 Mar 17 22:08 uploads -> ../uploads

but still no avatars ... :/ ....

@JimboJoe

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2019

Then maybe you're having another additional issue...? 🤔
Could you please install a second Discourse instance on the same server to confirm a similar behavior?
Also, are you logging in to Discourse via LDAP or a plain user (LDAP in my case)? Could you try via LDAP if not tried?
What customizations did you apply to you instance (e.g. plugin, theme, configuration items, etc.)?

And I confirm I also get the GeoLite warnings with no impact on my side.

@JimboJoe JimboJoe reopened this Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.