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

Invalid parameters - Your request is missing a required parameter #40

Closed
laMudri opened this issue May 17, 2021 · 14 comments
Closed

Invalid parameters - Your request is missing a required parameter #40

laMudri opened this issue May 17, 2021 · 14 comments

Comments

@laMudri
Copy link

laMudri commented May 17, 2021

As of today, cmusfm is failing to scrobble any tracks. Here is the relevant bit of logging (with API key removed):

$ cmusfm server
DEBUG server.c:318: Starting server
DEBUG server.c:357: Entering server main loop
DEBUG server.c:365: New client accepted: 5
DEBUG server.c:365: New client accepted: 6
DEBUG server.c:139: Payload: PENs+ - Pens+ / Leer split - 1. North Park (139s)
DEBUG server.c:143: Location: /sharedhome/home/james/Music/albums/Various-PENs+_Leer_split/01-North_Park.flac
DEBUG server.c:147: Server hiccup test (5s)
DEBUG libscrobbler2.c:330: Session validation wrapper
DEBUG libscrobbler2.c:292: Now playing: 0
DEBUG libscrobbler2.c:293: Payload:  - (null) ((null)) - 0.  (0s)
DEBUG libscrobbler2.c:166: Signature data: api_key${api_key}artistmethodtrack.updateNowPlayingsk6rjZqK84wtrack
DEBUG libscrobbler2.c:201: Params: api_key=${api_key}&artist=&method=track.updateNowPlaying&sk=6rjZqK84w&track=&api_sig=3fa185890638906d8242fcf206b8e4de
DEBUG libscrobbler2.c:57: Read: size: 160, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="failed">
  <error code="6">Invalid parameters - Your request is missing a required parameter</error>
</lfm>

DEBUG libscrobbler2.c:117: Check: status: 0, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="failed">
  <error code="6">Invalid parameters - Your request is missing a required parameter</error>
</lfm>

DEBUG libscrobbler2.c:312: Now playing status: 3
DEBUG utils.c:126: Get cover (case-insensitive): ^cover\.(jpg|png)$
DEBUG utils.c:151: Cover lookup: 04-Out.flac
DEBUG utils.c:151: Cover lookup: ..
DEBUG utils.c:151: Cover lookup: cover.jpg
DEBUG utils.c:164: Cover: /sharedhome/home/james/Music/albums/Various-PENs+_Leer_split/cover.jpg
@toniz4
Copy link

toniz4 commented May 18, 2021

I'm having the same issue, and when using the cmusfm.debug script everything seems to be fine, indicating that it is really a problem with the API.

here is the file in /tmp/cmusfm.debug:

1621372033
--- status paused file /mnt/hdd/Music/Daughters/Daughters - 2018 - You Won't Get What You Want (FLAC)/01 - City Song.flac artist Daughters albumartist Daughters album You Won't Get What You Want tracknumber 01 title City Song date 2018 duration 355
---
1621372033
--- status playing file /mnt/hdd/Music/Daughters/Daughters - 2018 - You Won't Get What You Want (FLAC)/01 - City Song.flac artist Daughters albumartist Daughters album You Won't Get What You Want tracknumber 01 title City Song date 2018 duration 355
---

@worbgge
Copy link

worbgge commented May 18, 2021

Having the same issue as everyone else above, cmusfm init returns
Checking previous session (user: worbgge) ...failed. Fetch new session key [yes/NO]:
when yes, a url is sent but that doesn't change the session key

@arkq
Copy link
Owner

arkq commented May 19, 2021

OK, I will look at this today/tomorrow (currently I have not access to my PC with cmus). But, please make sure that you are not affected by the bug caused by libcurl: #34 (do not use libcurl-7.71.0).

@laMudri
Copy link
Author

laMudri commented May 19, 2021

I'm on libcurl-7.74.0.

@arkq arkq closed this as completed in cbc61fc May 19, 2021
@arkq
Copy link
Owner

arkq commented May 19, 2021

Please check current master. It seems that Last.fm has fixed their API to actually work as in the documentation :D

EDIT: Please give me some feedback whether the fix actually works for you. If there is no other issues, I will release a new version of cmusfm, so Linux distributions might update packages.

@toniz4
Copy link

toniz4 commented May 19, 2021

Here is working now, in 0.3.3.

@worbgge
Copy link

worbgge commented May 19, 2021

still isn't working for me, i did cmus init and gave permission on last.fm, did :set status_display_program=cmusfm but that doesn't make it scrobble, it says i have curl-7.75.0-1 when i do sudo pacman -S curl.

@arkq
Copy link
Owner

arkq commented May 20, 2021

@worbgge I assume that you are using fresh master build of cmusfm, am I right? Could you type cmusfm init again? If it will not report any issue, i.e. the output will be as follows:

$ cmusfm init
Checking previous session (user: Arkq) ...OK.
Fetch new session key [yes/NO]: no

it means that everything works correctly regarding this issue (problem with "required parameter").

If cmusfm init works as above, please type pkill cmusfm and try to play a song again.

@worbgge
Copy link

worbgge commented May 20, 2021

Yes this worked, tysm

jonringer pushed a commit to NixOS/nixpkgs that referenced this issue May 20, 2021
Bug fix for arkq/cmusfm#40.
Add self as maintainer.
@bnsv
Copy link

bnsv commented May 31, 2021

@worbgge I assume that you are using fresh master build of cmusfm, am I right? Could you type cmusfm init again? If it will not report any issue, i.e. the output will be as follows:

$ cmusfm init
Checking previous session (user: Arkq) ...OK.
Fetch new session key [yes/NO]: no

it means that everything works correctly regarding this issue (problem with "required parameter").

If cmusfm init works as above, please type pkill cmusfm and try to play a song again.

I have the same problem with worbgge, ie failed checking previous version, no scrobbling. I already using cmusfm 0.4.0 and libcurl 7.65. But still when I do cmus init its still throw this:

cmusfm init
Checking previous session (user: bensisva) ...failed.
Fetch new session key [yes/NO]:

When I fetched a new session, it seems working (recognized and added as a new application in last.fm.) . I already set status display to cmusfm in cmus too. But still no scrobbling, and when I cmusfm init again it still says failed.

@arkq
Copy link
Owner

arkq commented May 31, 2021

@bnsv please compile with debug enabled and post the output of init here.

@bnsv
Copy link

bnsv commented May 31, 2021

Here you go:

../configure --enable-libnotify --enable-debug
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking pkg-config m4 macros... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBCRYPTO... yes
checking openssl/md5.h usability... yes
checking openssl/md5.h presence... yes
checking for openssl/md5.h... yes
checking for LIBCURL... yes
checking for LIBNOTIFY... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands

and this:

cmusfm-0.4.0/build
❯ ./src/cmusfm init
Checking previous session (user: bensisva) ...DEBUG ../../src/libscrobbler2.c:348: Session validation wrapper
DEBUG ../../src/libscrobbler2.c:310: Now playing: 0
DEBUG ../../src/libscrobbler2.c:313: Payload:  - (null) ((null)) - 0.  (0s)
DEBUG ../../src/libscrobbler2.c:174: Signature data: api_key670820e45dab1f6433da72a00e3bc037aartistmethodtrack.updateNowPlayingskxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtrack02fcbc90341a01f21c3bfc05b636e3ae
DEBUG ../../src/libscrobbler2.c:218: Request: api_key=670820e45dab1f6433da72a00e3bc037a&artist=&method=track.updateNowPlaying&sk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&track=&api_sig=471d576ce4a4b89f0c8f277af87a4d5f
DEBUG ../../src/libscrobbler2.c:117: Check: status: 28, body: (null)
DEBUG ../../src/libscrobbler2.c:330: Now playing status: 2
failed.
Fetch new session key [yes/NO]:

@arkq
Copy link
Owner

arkq commented May 31, 2021

DEBUG ../../src/libscrobbler2.c:117: Check: status: 28, body: (null)

status 28 => CURLE_OPERATION_TIMEDOUT

It seems that you've got some kind of network related issue. Please check if https://ws.audioscrobbler.com/2.0/ (or whichever service you've got defined in the cmusfm.conf file) is reachable from your host.

EDIT:
Also, please report this issue as a separate one, because it's not related to "missing required parameter" topic.

@bnsv
Copy link

bnsv commented Jun 1, 2021

Thank you @arkq for your time and efforts. You're right, It turns out my internet provider issue. For days some sites are unreachable but right now is back to normal and my scrobbling is working again. And I love how this plugin keep my playing history while I am out of reach and reporting when I connected back. Also how its not losing the played history while I updated cmusfm to the newest version in the progress.

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

5 participants