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

Controller 8.0.2 #202

Closed
aroundmyroom opened this issue Nov 2, 2023 · 13 comments
Closed

Controller 8.0.2 #202

aroundmyroom opened this issue Nov 2, 2023 · 13 comments

Comments

@aroundmyroom
Copy link

8.0.2 is early access and I do not expect that this is going to work yet, but it seems that the login procedure for this API looks changed

I cannot logon anymore..

@malle-pietje
Copy link
Collaborator

I haven’t tested this yet. Was this on UniFi OS or was it a software-based controller?

@aroundmyroom
Copy link
Author

Unifi OS 3.2.5 with controller 8.02 (Cloudkey gen2 plus)
it's not biggy that it is not working and possibly my mistake but it was working before I updated to 8.0.2 ..

@malle-pietje
Copy link
Collaborator

I upgraded our test software-based controller to 8.0.2, and I see no issues whatsoever. Here is the about modal from the API Browser with details of the controller and the API client version:
image

I think you have another issue, or you were using port 8443 instead of 443 as required for UniFi OS-based consoles.

I'll see when I have time to replicate this with a UniFi OS console.

@malle-pietje
Copy link
Collaborator

malle-pietje commented Nov 3, 2023

If you want to help troubleshoot this, please share the sanitized debug output after enabling debug mode.

@malle-pietje
Copy link
Collaborator

malle-pietje commented Nov 3, 2023

I've tested the API client here with an even newer Network Application version (8.0.4) on a UDR, and it works fine. Here's a screenshot from one of our applications:
image

@malle-pietje
Copy link
Collaborator

I am closing this issue now. Please re-open if needed.

@thib3113
Copy link

thib3113 commented Nov 9, 2023

Hello @malle-pietje I do some debug on this .

And it come with unifi OS 3.2.X . In fact this part https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/src/Client.php#L172-L178 doesn't works with unifi OS > 3.2.X ( unifios stop sending x-csrf-token )

@malle-pietje
Copy link
Collaborator

Hello @malle-pietje I do some debug on this .

And it come with unifi OS 3.2.X . In fact this part https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/src/Client.php#L172-L178 doesn't works with unifi OS > 3.2.X ( unifios stop sending x-csrf-token )

Not to be rude, but I don't believe there is an issue with 3.2X. Here's a screenshot from a test with a UDR running 3.2.5 and Network Application 8.0.4:
image

Please provide more details and proof about what isn't working. Are you perhaps not using port 443 but using 8443 instead?

@malle-pietje malle-pietje reopened this Nov 9, 2023
@malle-pietje
Copy link
Collaborator

image

@thib3113
Copy link

thib3113 commented Nov 9, 2023

@malle-pietje hum ... my bad, re-reading, your library doesn't check the header x-csrf-token ... So I don't know why it crash here ... (I got a notification about this issue, and use it to extract the version of the OS/network)

( I'm digging on another libraries , on another language, and it seems that 3.2 stop sending the header x-csrf-token, so if the library check on this header to detect unifios/controller, it will stop working on 3.2 ) .

@malle-pietje
Copy link
Collaborator

@thib3113 Okay, please share the full, sanitised, debug output when logging in and for example fetching the sites. Since I can't reproduce this, I'll have to wait for further data.

@thib3113
Copy link

thib3113 commented Nov 9, 2023

@malle-pietje no no ... that's my bad ... I didn't reproduce with this library ... I wrote too fast .

( as I said, I'm digging this bug, because I got the same with node.js libraries ... and I think the bug here was the same as us ... so "no x-csrf-token header" . But, you are not checking it ... so I don't reproduce the same bug )

@malle-pietje
Copy link
Collaborator

Thanks, understood. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants