yariplus / minecraft-nodebb-integration

A plugin for Minecraft servers for integration with a NodeBB forum.
Creative Commons Zero v1.0 Universal
9 stars 4 forks source link

Connect to forum using localhost #30

Open jeremygturpin opened 7 years ago

jeremygturpin commented 7 years ago

I keep getting this error every so often when my server is running. I have nodebb running locally with the plugins installed.

image

yariplus commented 7 years ago

Is the forum using SSL?

jeremygturpin commented 7 years ago

I am unsure, I'm running a brand new install of nodebb with mogodb. The only thing I installed was this plugin. Is there a way to check?

yariplus commented 7 years ago

It sounds like you don't have SSL. You need to set it up through a company such as Let's Encrypt (Free). The plugin requires SSL, which is probably causing the error. SSL makes the data exchanged between the sever and forum secure.

jeremygturpin commented 7 years ago

Just so you are aware this is currently a localhost website with no domain, I hope to eventually make it live but it isn't right now. Is there like a nodebb plugin that will encrypt it, or something that is simple to setup?

yariplus commented 7 years ago

Hmm, you're right, it should be possible to use localhost without SSL. I should be able to do this in the plugin.

jeremygturpin commented 7 years ago

Do you know when you might be able to add this to the plugin?

yariplus commented 7 years ago

I should have time tomorrow.

jeremygturpin commented 7 years ago

Cool, thanks for helping me.

yariplus commented 7 years ago

@OmegaJT22 What is the output of /nodebb url and /nodebb live

jeremygturpin commented 7 years ago

I am away from my computer for the next hour. I know the URL was localhost:4567 and I can check the live later.

jeremygturpin commented 7 years ago

here are the nodebb url and live nodebb url and live

yariplus commented 7 years ago

is localhost:4567 accessible from your browser? and can you navigate the site?

jeremygturpin commented 7 years ago

Yes it is. And if I'm on a different device on the same network I can type the machines up address 192.168.2.139:4567 and it works.

jeremygturpin commented 7 years ago

Ip address*

yariplus commented 7 years ago

Holy crap, was finally able to reproduce.

It is the stupidest thing, it just wants the full url. Set /nodebb url http://localhost:4567/ and /nodebb live http://localhost:4567/ and it should just work.

jeremygturpin commented 7 years ago

nice!! I got it to work!! btw do the widgets work better on a certain theme? mine are a bit strange.

jeremygturpin commented 7 years ago

Like for one thing, player heads do not show up.

yariplus commented 7 years ago

possibly, I've only tested them on persona, screenshot?

jeremygturpin commented 7 years ago

image

jeremygturpin commented 7 years ago

soooo, every time i do the /register [key] command it crashes my website :(

( I'm sorry if iI'm asking a lot of questions, you are helping me out so much, idk what I would do without you )

yariplus commented 7 years ago

No problem at all!

The avatars look like it might have the wrong url. Check that your forums config.json has the correct url, http://localhost:4567 (without a / at the end) If that looks good, check the browser console F12 for any errors.

jeremygturpin commented 7 years ago

image

yariplus commented 7 years ago

Click on the bar there where it says console

jeremygturpin commented 7 years ago

image

yariplus commented 7 years ago

derp. Looks like the mojang api changed, go to the Minecraft Integration admin page, click on settings, and change the avatar cdn to cravatar or minotaur and save. Click on maintenance, then clear avatar cache, then refresh the home page.

jeremygturpin commented 7 years ago

I'm now on cravatar image

yariplus commented 7 years ago

Check the output of http://localhost:4567/api/minecraft-integration/server/0 for players.

It should have something like this:

"players": [
        {
            "name": "yariplus",
            "id": "f19cb1605bc24838835a07757d60ce80"
        }
    ],
jeremygturpin commented 7 years ago

image

jeremygturpin commented 7 years ago

I'm off for the night. Pick it up tomorrow. Bye.

yariplus commented 7 years ago

Let me know if updating the forum plugin to 0.8.0-alpha.12 changes anything.

jeremygturpin commented 7 years ago

OK, I'll be able to do that in 4 hours.

yariplus commented 7 years ago

No hurry. ;) Thanks.

jeremygturpin commented 7 years ago

I'm now able to link my minecraft account to the website. But player heads are still not showing up :/ image image

jeremygturpin commented 7 years ago

image image

yariplus commented 7 years ago

Could you right-click on the area where the blank image is supposed to be and click inspect?

Does the players name show up when you however over where the image should be?

jeremygturpin commented 7 years ago

image

jeremygturpin commented 7 years ago

image image

phit commented 7 years ago

perspective aynthing isn't working for me either, most other stuff is working fine though both on cravatar and minotar looks like the base encoded images are too big for mongodb

Fetching avatar from CDN: http://minotar.net/cube/Trondy/32
Fetching avatar from CDN: http://minotar.net/cube/phit/32
Fetching avatar from CDN: http://minotar.net/cube/fede1122/32
{ [MongoError: Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 1684 { : "mi:avatar:Trondy", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEmklEQVR4nOxXz2tjVRi9aV5/pb+mnalMUUZHp7Y6ascpVkVUMKltQVBcCbqdjSCIigtXgjsXBf8AhaKj7uqiotF0oWDBLlRmOpFCZ7..." }]
  name: 'MongoError',
  message: 'Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 1684 { : "mi:avatar:Trondy", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEmklEQVR4nOxXz2tjVRi9aV5/pb+mnalMUUZHp7Y6ascpVkVUMKltQVBcCbqdjSCIigtXgjsXBf8AhaKj7uqiotF0oWDBLlRmOpFCZ7..." }',
  driver: true,
  index: 0,
  code: 17280,
  errmsg: 'Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 1684 { : "mi:avatar:Trondy", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEmklEQVR4nOxXz2tjVRi9aV5/pb+mnalMUUZHp7Y6ascpVkVUMKltQVBcCbqdjSCIigtXgjsXBf8AhaKj7uqiotF0oWDBLlRmOpFCZ7..." }' }
{ [MongoError: Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 2230 { : "mi:avatar:phit", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGNElEQVR4nOxXTWwcRRZ+/TM93WOPp+fPMx6P8+so8Wbzs2MpOUTJKrv25pJdaY+r3fPCgQsHBBw4wJVjFCSEFAgkgQsHiCUwcWKhoI..." }]
  name: 'MongoError',
  message: 'Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 2230 { : "mi:avatar:phit", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGNElEQVR4nOxXTWwcRRZ+/TM93WOPp+fPMx6P8+so8Wbzs2MpOUTJKrv25pJdaY+r3fPCgQsHBBw4wJVjFCSEFAgkgQsHiCUwcWKhoI..." }',
  driver: true,
  index: 0,
  code: 17280,
  errmsg: 'Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 2230 { : "mi:avatar:phit", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGNElEQVR4nOxXTWwcRRZ+/TM93WOPp+fPMx6P8+so8Wbzs2MpOUTJKrv25pJdaY+r3fPCgQsHBBw4wJVjFCSEFAgkgQsHiCUwcWKhoI..." }' }
{ [MongoError: Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 2446 { : "mi:avatar:fede1122", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAG1UlEQVR4nOxXXWwUbRU+887Mzv62292lhZa2gMXSQpFILKIXBCg0Icb4c4EmJhK98coLDYk3JF4ZiYFoYqI3GtMriIk3NpraNvEvMR..." }]
  name: 'MongoError',
  message: 'Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 2446 { : "mi:avatar:fede1122", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAG1UlEQVR4nOxXXWwUbRU+887Mzv62292lhZa2gMXSQpFILKIXBCg0Icb4c4EmJhK98coLDYk3JF4ZiYFoYqI3GtMriIk3NpraNvEvMR..." }',
  driver: true,
  index: 0,
  code: 17280,
  errmsg: 'Btree::insert: key too large to index, failing nodebb.objects.$_key_1_value_-1 2446 { : "mi:avatar:fede1122", : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAG1UlEQVR4nOxXXWwUbRU+887Mzv62292lhZa2gMXSQpFILKIXBCg0Icb4c4EmJhK98coLDYk3JF4ZiYFoYqI3GtMriIk3NpraNvEvMR..." }' }
jeremygturpin commented 7 years ago

i got this to work, image but this still doesnt image

phit commented 7 years ago

clear avatar cache under maintenance in the plugin options or try to clear your browser cache with ctrl + f5

jeremygturpin commented 7 years ago

tried both, didnt work

yariplus commented 7 years ago

Hmm, okay, so it is getting the avatar, the template must be messed up on the widget.

phit commented 7 years ago

it's working fine here, using latest plugin and nodebb https://forums.stonebound.net/servers

yariplus commented 7 years ago

Yeah, I'm not sure what's going on.

jeremygturpin commented 7 years ago

phit can i ask, how were able to make new custom pages? like the one that shows server stats

phit commented 7 years ago

https://github.com/psychobunny/nodebb-plugin-custom-pages

yariplus commented 7 years ago

@OmegaJT22 Does the avatar appear on the linked accounts profile page now that the cache is cleared?

jeremygturpin commented 7 years ago

i cleared cache and they are still there yes

jeremygturpin commented 7 years ago

phit, thanks!

yariplus commented 7 years ago

I'm out of ideas.