Comments (11)
Hi prabhu, can you post your config.json file? Seems like the base url isn't set properly.
from nodebb.
Prabhu,
In addition to posting your config.json file, I'd also like to point out that the README.md contains installation instructions that apply to an older version of NodeBB.
After cloning the repository, and running npm install
to resolve deps, you should just need to run node app --setup
to initiate the setup script.
from nodebb.
Hi Guys,
Thanks for coming back quickly!
I noticed the bug in your config generation code, where it was generating url with http:// in it, whereas src/app.js was prefixing http:// at line 15. I quietly tried fixing it. Still getting the same error. Here is my modified config.json.
public/config.json
{
"socket": {
"address": "localhost",
"port": 4567
},
"api_url": "http://localhost:4567/api/"
}
config.json
{
"secret": "secret",
"base_url": "http://localhost",
"port": 4567,
"use_port": true,
"upload_path": "/public/uploads/",
"redis": {
"host": "127.0.0.1",
"port": 6379
}
}
Not to mention getting the same error, while trying from a fresh checkout from git with no modifications.
Hope it helps.
from nodebb.
Hey Prabhu, welcome to NodeBB :)
Am wondering if you're getting any errors serverside - typically a 500 coming back means something crashed in node.js
If you can provide the node.js stack trace we'll look into it. Thanks!
from nodebb.
By comparing our config files, it looks to be your public/config.json
that is misconfigured (which is odd, as the socket address should match base_url
in the server configuration.)
Try restoring the code to the latest version (back up any changes as necessary!) and try prepending http://
to the "socket address" value in public/config.json
, or by running node app --setup
again.
$ git reset --hard HEAD
$ git pull
$ node app --setup
from nodebb.
I had manually changed the url, since src/app.js was also prefixing http:// resulting in an invalid url.
// Problematic line 15
socket = io.connect('http://' + config.socket.address + config.socket.port? ':' + config.socket.port : '');
I have reset everything like you suggested, still no luck. There is nothing in the console even though there is 500 being returned. Let me try to produce a stack trace somehow.
from nodebb.
Hi Prabhu,
Thanks for being patient with us! Looks like there was an improper usage of the tertiary if in line 15 of public/src/app.js
. I've added the proper parenthesis around it which might help, and removed the vestigial "http://".
Fingers crossed this was the issue!
from nodebb.
I had suspected this too and tried adding the parenthesis last night. Still the same (Just tried as well). Other things I tried are:
- Increasing and decreasing node and socket.io versions
Can you let me know what version of node you are using?
from nodebb.
Some logs after enabling logging in websockets.js
Info: Base Configuration OK.
info - socket.io started
Info: Checking categories...
Info: Good.
debug - authorized
warn - handshake error No cookie transmitted
debug - authorized
warn - handshake error No cookie transmitted
from nodebb.
ok silly me. Chrome content settings was set to block cookies. Not sure if this is the default setting for this version of chrome. Changing the setting in chrome resolved the issue. Closing this issue.
from nodebb.
Glad you figured it out. For future reference the minimum version of nodejs required is 0.8.
from nodebb.
Related Issues (20)
- Send urls captured by `link-preview` plugin into `attachment` property via `mocks.note` HOT 1
- better unblock UX
- Save note urls in post hash HOT 2
- Skip value must be non-negative, but received: -1 HOT 1
- Images detected in posts should be added to attachments
- Unable to recover account when hCaptcha not loading HOT 3
- Relative URLs need to be rewritten to be absolute when federated out
- World (Curated) & World (All) menu items for Guests HOT 2
- remote ActivityPub representation of Category "avatars" HOT 2
- wrong css added around the url in remote fediverse post
- Invalid request, anonymous access is not allowed in place of poll box HOT 1
- Block ActivityPub user to hide opening post
- `Flag(Note)`
- Plugin hook for `Topics.updateTopicTags`
- Local & ActivityPub accounts by the same user HOT 2
- user mentions in chat rooms not working HOT 1
- `name` (topic title) in AP S2S mock contains escaped characters HOT 1
- escaped characters showing up on mobile composer HOT 1
- Webfinger queries require %-encoded parameters HOT 1
- refreshed page after changing a post owner
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodebb.