danielfm/smudge

HTTP 403 and Void Function Errors After Installing in Doom

vaidyafamily opened this issue · 8 comments

I followed the instructions on this website and installed smudge. The relevant portion of my config reads

(setq smudge-oauth2-client-secret "********")
(setq smudge-oauth2-client-id "********")
(map! :map smudge-mode-map "M-p" #'smudge-command-map)

I'm using Doom Emacs, so in my packages.el I also have

(package! smudge)
(package! simple-httpd)

I setup the spotify app in the spotify developer dashboard as instructed. I have also downloaded the spotify app from the AUR, and spotifyd (and enabled it). I have run these at the same time and separately. Without the official spotify client active, or spotifyd activated through systemctl, I get a "No Active Device Error". If I open up the official spotify client and begin playing a song, Emacs detects what song is playing, but if I try to play a different song I get an HTTP 403 error. Same thing happens if I have both the official client and spotifyd running. If I only have spotifyd activated through systemctl I get a "No Active Device" error. I'm not sure how to make this work so that I can play songs from directly within Emacs.

I made sure to install and enable simple-httpd from within Emacs, as the github site mentions using it. These errors persisted.

Also, upon running smudge-controller-player-status I get a Error running timer ‘smudge-controller-player-status’: (void-function smudge-connect-player-status) message. This particular error only began happening upon updating Doom Emacs yesterday, before that smudge-controller-player-status gave no errors (the prior update to Doom Emacs was 6 weeks ago.)

Help would be appreciated.

Tried this in vanilla Emacs, but I'm getting the same issue:

(scroll-bar-mode -1)           
(tool-bar-mode -1)             
(set-fringe-mode 10)           
(menu-bar-mode -1)             
(load-theme 'wombat)

(require 'package)

(setq package-archives '(("melpa" . "https://melpa.org/packages/")
			 ("org" . "https://orgmode/elpa/")
			 ("elpa" . "https://elpa.gnu.org/packages/")))


(package-initialize)
(unless package-archive-contents
  (package-refresh-contents))

(unless (package-installed-p 'use-package)
  (package-install 'use-package))

(require 'use-package)
(setq use-package-always-ensure t)

(use-package smudge)
(use-package simple-httpd)

(setq smudge-oauth2-client-secret "*****")
(setq smudge-oauth2-client-id "*****")

From here I entered global-smudge-remote-mode and tried smudge-controller-toggle-play with the Spotify client playing and got the same 403 error.

Facing the same issue. The error message is not helpful :(

Same error on doom-emacs. Got error: (error http 403

I also experience the same problem

Upon debugging, I found that the error occur at this line

Reason: The function smudge-connect-player-status doesn't exist in smudge-controller.el but it does exist in smudge-connect.el

This 403 error doesn't happen in my setup. If anyone has any suggestion on how to fix this, I'm willing to test the change and release a new version.

My config is like this:

(use-package smudge
  :ensure t
  :config (progn
            (setq smudge-oauth2-client-secret "xxx")
            (setq smudge-oauth2-client-id "xxx")
            (define-key smudge-mode-map (kbd "M-p") 'smudge-command-map)
            (global-smudge-remote-mode)))

One thing you might try is deleting the .emacs.d/.cache/smudge directory and run the auth flow again. If your token is old, it might not have some of the newly added scopes this plugin needs.

Are you guys with the 403 error sure that you have a spotify premium account? I have just realized that I didn't after having this same type of problem on another spottily controller app with similar functionality.

I'm using Doom and have no 403 errors while using smudge, so I'm closing this.