Can't logout from Surfer
-
N nebulon marked this topic as a question on
-
How does your setup look like? It seems strange that the cli tool tries to connect to 127.0.0.1 From where are you running this?
@nebulon It did seem strange to me too... I'm connecting from my home computer where I installed cloudron-surfer CLI, onto my VPS where my main Cloudron is installed, with Surfer.
I just thought of the fact that I'm using OpenVPN on my home wifi, and the server for that is on the same Cloudron and IP address as Surfer. Could that be causing a problem?
Had no trouble connecting, though, by entering the url.
[EDIT: same behavior without the VPN]
-
@nebulon It did seem strange to me too... I'm connecting from my home computer where I installed cloudron-surfer CLI, onto my VPS where my main Cloudron is installed, with Surfer.
I just thought of the fact that I'm using OpenVPN on my home wifi, and the server for that is on the same Cloudron and IP address as Surfer. Could that be causing a problem?
Had no trouble connecting, though, by entering the url.
[EDIT: same behavior without the VPN]
-
@abargel there is really nothing different from the logout logic to any other requests to the server. They use the same domain/URL in the code. Can you run this maybe with
DEBUG=*
and see if something unexpected comes up? -
$ DEBUG=* surfer logout superagent POST /api/logout?access_token=login-ef8c6c81aa72058b11c72dd84d1368ab +0ms connect ECONNREFUSED 127.0.0.1:80
I have not set up an access token on surfer/_admin. Should I have?
-
@abargel so looks like the origin is simply missing in the local surfer config. That file is in
~/.surfer.json
and to logout you can also just delete the file for a start. In your case I guess theserver
property got emptied for some reason.@nebulon Deleting
~.surfer.json
did log me out. Here are its contents before deletion:{ "server": "https://surfer.openbargel.com", "accessToken": "login-ef8c6c81aa72058b11c72dd84d1368ab" }
I logged in again, ran a couple of commands, tried logging out: same problem. Current content of
~.surfer.json
is same with just a different accessToken. Output from DEBUG=* is same with just a different accessToken. -
@nebulon Deleting
~.surfer.json
did log me out. Here are its contents before deletion:{ "server": "https://surfer.openbargel.com", "accessToken": "login-ef8c6c81aa72058b11c72dd84d1368ab" }
I logged in again, ran a couple of commands, tried logging out: same problem. Current content of
~.surfer.json
is same with just a different accessToken. Output from DEBUG=* is same with just a different accessToken. -
@abargel I think I found the bug, I have released a new version of the app and the cli tool, which should fix it. Thanks for reporting!
-
N nebulon has marked this topic as solved on