Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"Invalid session token" for Ampache clients since Nextcloud 20 upgrade #791

Closed
gloomytrousers opened this issue Oct 17, 2020 · 9 comments
Closed
Labels

Comments

@gloomytrousers
Copy link

Since (I think) the upgrade to Nextcloud 20, Power Ampache has failed to connect to the Music app. The error is:

Ampache error
code:401
error: Invalid Login - invalid session token

I tried generating a new app password and using that, but got the same result.

I've also just installed AmDroid to try it; that gives "Error: Invalid Login - invalid session token" too.

The Nextcloud log contains lots of these (just a warning):

{"reqId":"X4r9Dxf1VONOiH-9LhY3SwAAARQ","level":0,"time":"2020-10-17T14:17:51+00:00","remoteAddr":"xxxxxxxxx","user":"--","app":"twofactor_totp","method":"GET","url":"/nextcloud/index.php/apps/music/ampache/server/xml.server.php?auth=","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Dalvik/2.1.0 (Linux; U; Android 9; SM-G900F Build/PQ3A.190801.002)","version":"20.0.0.9"}

And one of these for each failing request:

{"reqId":"X4r9Dxf1VONOiH-9LhY3SwAAARQ","level":0,"time":"2020-10-17T14:17:51+00:00","remoteAddr":"xxxxxxxxx","user":"--","app":"music","method":"GET","url":"/nextcloud/index.php/apps/music/ampache/server/xml.server.php?auth=","message":"Invalid Login - session token missing","userAgent":"Dalvik/2.1.0 (Linux; U; Android 9; SM-G900F Build/PQ3A.190801.002)","version":"20.0.0.9"}

This is with the latest release of the Music app, 0.16.0.

@paulijar
Copy link
Collaborator

@gloomytrousers Thanks for the report. There seems to be a weird bug in Nextcloud 20, which I just reported for the server: One of the URL arguments from the Ampache client is eaten up by the Nextcloud server before it reaches the Music app. Without this argument, none of the Ampache API calls can work.

Which application is "AmDroid", or did you mean Amproid? Note that Music 0.16.0 does not support Amproid because it requires Ampache API v4.x, while Music currently implements API v3.5. This will change with Music v0.17.0 which should be released very soon.

@gloomytrousers
Copy link
Author

@paulijar thanks for the speedy reply - I'll watch the other bug.

AmDroid is https://github.com/Dejvino/amdroid installed from the f-droid app store for Android. It's pretty old actually - I just wanted another app to test with.

@stefangweichinger
Copy link

Updated the Music App right now, I still get the "session token" error when I try to connect/sync via SubMusic on my Garmin Fenix 6X Pro:

memen45/SubMusic#6

Yes, NC20.

@paulijar
Copy link
Collaborator

@stefangweichinger Yes, updating the Music app doesn't help here because this issue is in the NC20 core.

@stefangweichinger
Copy link

@paulijar Ah, I see, so I have to wait for nextcloud/server#23544 to be fixed, right? thanks

@paulijar
Copy link
Collaborator

paulijar commented Oct 19, 2020

@stefangweichinger Yes, nothing will happen to this bug before there is some resolution for nextcloud/server#23544. But once that happens, I will post an update here, too.

@paulijar paulijar added the Bug label Nov 1, 2020
@paulijar
Copy link
Collaborator

paulijar commented Dec 2, 2020

If you are interested to monkey patch you Nextcloud installation, see nextcloud/server#23544 (comment) for a possible solution. This comes with no guarantees, but it seems to fix the issue. Please report if you do this and notice any side effects.

@paulijar
Copy link
Collaborator

The fix for the root cause of this problem has been merged to the stable20 branch yesterday. I believe that this means that the fix will make it to the Nextcloud version 20.0.5 which is scheduled to be released on 2021-01-14.

@paulijar
Copy link
Collaborator

The Nextcloud version 20.0.5 is now out and it has been verified that the Ampache API works on it. Closing.

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

No branches or pull requests

3 participants