danielfm / smudge

Control the Spotify app from within Emacs.
https://asciinema.org/a/218654
GNU General Public License v3.0
309 stars 47 forks source link

spotify-get-item-id: Wrong type argument: hash-table-p, nil #51

Closed idmyn closed 9 months ago

idmyn commented 4 years ago

Hi, I'm pretty confident that this is an issue with my machine, but I'd really appreciate your help in troubleshooting!

If I run spotify-my-playlists I get spotify-get-item-id: Wrong type argument: hash-table-p, nil in the messages buffer. Sometimes when I run it there's no output in the messages buffer and no sign of anything happening at all. If I run spotify-track-search, a Track Search buffer is created for my search term, but the buffer is empty (and nothing in the messages buffer). I've seen and fixed the web callbacks like Missing required parameter: client_id and missing callback url, so I don't think they are the issue.

I've set up an application through the Spotify Developers site to get a client id and secret, and I've set those to spotify-oauth2-client-id and spotify-oauth2-client-secret. I've also set the redirect url to http://localhost:8591/. I'm not sure where I'm going wrong here...

I've also tried counsel-spotify and I haven't been able to get that working either, so it likely isn't an issue with your package. I've tried two different spotify accounts, so it's unlikely to be an account-specific issue.

Any ideas what might be going wrong? Thank you!

idmyn commented 4 years ago

If it helps, I tried running spotify-my-playlists again just now and my browser opened a spotify page prompting me to authorise the application (encouraging!), which I confirmed. The next time I ran the function, though, my browser opened a callback url (http://localhost:8591/?code=****) but was unable to connect to localhost.

a13 commented 3 years ago

I get the same error, here's the BT

Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
  gethash(item nil)
  #f(compiled-function (status) #<bytecode 0x18e6cb5>)(nil)
  #f(compiled-function (_) #<bytecode 0x1df156d>)((:peer (:certificate (:version 3 :serial-number "05:2f:06:e2:03:e1:42:d2:1e:3e:d1:2f:d8:ce:e9:9f" :issuer "C=US,O=DigiCert Inc,CN=DigiCert SHA2 Secure Server CA" :valid-from "2020-06-23" :valid-to "2021-09-02" :subject "C=SE,L=Stockholm,O=Spotify AB,CN=*.spotify.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4b:8e:2b:b6:41:ff:5f:01:48:9b:ac:d3:8f:bd:0a:5c:d9:78:5b:a3" :certificate-id "sha1:b9:79:6b:ce:fd:61:21:97:a7:02:90:ee:da:cd:f0:a0:44:13:0e:eb") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "CHACHA20-POLY1305" :mac "AEAD")))
  apply(#f(compiled-function (_) #<bytecode 0x1df156d>) (:peer (:certificate (:version 3 :serial-number "05:2f:06:e2:03:e1:42:d2:1e:3e:d1:2f:d8:ce:e9:9f" :issuer "C=US,O=DigiCert Inc,CN=DigiCert SHA2 Secure Server CA" :valid-from "2020-06-23" :valid-to "2021-09-02" :subject "C=SE,L=Stockholm,O=Spotify AB,CN=*.spotify.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4b:8e:2b:b6:41:ff:5f:01:48:9b:ac:d3:8f:bd:0a:5c:d9:78:5b:a3" :certificate-id "sha1:b9:79:6b:ce:fd:61:21:97:a7:02:90:ee:da:cd:f0:a0:44:13:0e:eb") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "CHACHA20-POLY1305" :mac "AEAD")))
  url-http-activate-callback()
  url-http-wait-for-headers-change-function(1 633 632)
  url-http-generic-filter(#<process api.spotify.com<2>> "HTTP/1.1 204 No Content\015\ncache-control: private, max-age=0\015\nx-robots-tag: noindex, nofollow\015\naccess-control-allow-origin: *\015\naccess-control-allow-headers: Accept, App-Platform, Authorization, Content-Type, Origin, Retry-After, Spotify-App-Version, X-Cloud-Trace-Context, client-token, content-access-token\015\naccess-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE, PATCH\015\naccess-control-allow-credentials: true\015\naccess-control-max-age: 604800\015\nstrict-transport-security: max-age=31536000\015\nx-content-type-options: nosniff\015\ndate: Tue, 29 Dec 2020 15:33:58 GMT\015\nserver: envoy\015\nVia: HTTP/2 edgeproxy, 1.1 google\015\nAlt-Svc: clear\015\n\015\n")
jkdufair commented 3 years ago

@idmyn with the last PR merge, this issue should be resolved