Closed henrywright closed 9 years ago
Whats in the nodebb logs? Also did you go tru the setup process detailed in the readme?
Yes, I created a new Imgur app and went through the readme steps. What is the command to output the NodeBB logs? I'll copy them to here
./nodebb log
in your nodebb directory then try to upload an image and see what happens. the file is in logs/output.log
Thanks, this is the entire NodeBB log output:
error: Unable to parse Imgur json response. [<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>
] Unexpected token <
13/8 18:13 [26374] - error: [plugins] filter:uploadImage, Unexpected token <
That usually means imgur is not responding. I just tested with 1.0.0 and it worked for me.
Yes, it seems it wasn't responding when I tried to upload that first time. I just tried uploading a test image again and got this in the logs:
13/8 18:51 [26674] - error: TypeError: Cannot call method 'hasOwnProperty' of undefined
at appendFormValue (nodebb/node_modules/request/request.js:340:17)
at Request.init (nodebb/node_modules/request/request.js:354:11)
at new Request (nodebb/node_modules/request/request.js:140:8)
at request (nodebb/node_modules/request/index.js:55:10)
at Function.post (nodebb/node_modules/request/index.js:63:12)
at refreshToken (nodebb/node_modules/nodebb-plugin-imgur/index.js:87:11)
at Request._callback (nodebb/node_modules/nodebb-plugin-imgur/index.js:189:13)
at Request.self.callback (nodebb/node_modules/request/request.js:198:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (nodebb/node_modules/request/request.js:1057:14)
Published 1.0.1 with better error messages give that one a try.
Also check your database for the key nodebb-plugin-imgur
It should have access_token, refresh_token etc.
Update: I just uninstalled 1.0.0 and installed 0.1.4 and the problem disappeared. I can now upload images again.
Update 2: I reinstalled 1.0.0 and noticed my Imgur secret doesn't seem to be saving in Installed Plugins > Imgur. Perhaps that's the issue?
If I enter the client ID, then enter the secret, then click save and then navigate away from the page, when I go back to Installed Plugins > Imgur, the secret is missing from the text box.
That sounds like a cache issue, install 1.0.0 clear cache try again. 0.1.4 doesn't have a secret field
That sounds like a cache issue, install 1.0.0 clear cache try again. 0.1.4 doesn't have a secret field
I'm actually testing in 1.0.0 again now. I just cleared my cache and the secret still doesn't save. I think that could be the problem.
Give 1.0.2 a try.
1.0.2 doesn't seem to be available in the NodeBB admin area. What's the recommended way to upgrade via the terminal?
npm i nodebb-plugin-imgur
will do.
Success! Many thanks for your help. Working perfectly now. No errors in the logs either.
No problem :)
Since upgrading to version 1.0.0 (from 0.1.4) I'm unable to upload images. I get a 502 bad gateway error. Also, here's the error message I get when running
tail /var/log/nginx/error.log